unofficial mirror of 
 help / color / mirror / Atom feed
* chromebook-ucm-conf
@ 2023-11-20 18:28 Caleb Herbert
  0 siblings, 0 replies; 2+ messages in thread
From: Caleb Herbert @ 2023-11-20 18:28 UTC (permalink / raw)
  To: help-guix

[-- Attachment #1: Type: text/plain, Size: 618 bytes --]

Hi Guix,

Can anyone help me get my audio working?

I've been trying to "install" some configuration files for my audio 
setup on a Chromebook. On a normal GNU/Linux system, one installs them 
under /usr/share, but Guix doesn't have that, so I made a package based 
on alsa-ucm-conf.

But packaging the config files is not enough, it seems. You also have to 
modify alsa-lib, which efraim was kind enough to do last night.

But apparently, alsa-lib needs updated to support certain features of 
the config, so the attached Scheme code will not work. Can someone show 
me how to get it to work?


Caleb Herbert

[-- Attachment #2: chromebook-alsa-lib.scm --]
[-- Type: text/x-scheme, Size: 4010 bytes --]

;; chromebook-alsa-lib.scm - Install Chromebook ALSA config
;; Copyright (C) 2023  Caleb Herbert <>
;; Copyright (C) 2023  efraim
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program.  If not, see <>.

(use-modules (guix packages)
             (guix utils)
             (guix git-download)
             (guix build-system copy)
             (guix build-system trivial)
             ((guix licenses) #:prefix license:)
             (gnu packages linux))

(define-public chromebook-ucm-conf
  (let ((commit "1328e46bfca6db2c609df9c68d37bb418e6fe279")
        (revision "1"))
      (name "chromebook-ucm-conf")
      (version (git-version "0.0" revision commit))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                       (url (string-append ""
                       (commit commit)))
                (file-name (git-file-name name version))
      (build-system copy-build-system)
         '(("glk" "share/alsa/ucm2/conf.d")
           ("common" "share/alsa/ucm2"))))
      (home-page "")
      (synopsis "Alsa UCM configuration for chrome devices")
       "A collection of modified ChromeOS UCM configuration files optimized
for mainline Linux")
      (license license:bsd-3))))

(define alsa-bonus-inputs
    (name "alsa-bonus-inputs")
    (version (package-version alsa-lib))
    (source #f)
    (build-system trivial-build-system)
     `(#:modules ((guix build union))
         (use-modules (ice-9 match)
                      (guix build union))
         (match %build-inputs
           (((names . directories) ...)
            (union-build (assoc-ref %outputs "out")
     (list alsa-ucm-conf alsa-topology-conf chromebook-ucm-conf))
    (home-page "")
    (synopsis "")
    (description "")
    (license #f)))

(define chromebook-alsa-lib
    (inherit alsa-lib)
     (substitute-keyword-arguments (package-arguments alsa-lib)
       ((#:phases phases)
        `(modify-phases ,phases
           (replace 'pre-install
             (lambda* (#:key inputs outputs #:allow-other-keys)
               (let* ((alsa (string-append
                              (assoc-ref outputs "out") "/share/alsa"))
                     (bonus-inputs (assoc-ref inputs "alsa-bonus-inputs"))
                     (ucm (string-append bonus-inputs "/share/alsa/ucm"))
                     (ucm2 (string-append bonus-inputs "/share/alsa/ucm2"))
                     (topology (string-append
                                 bonus-inputs "/share/alsa/topology")))
                 (mkdir-p alsa)
                 (symlink ucm (string-append alsa "/ucm"))
                 (symlink ucm2 (string-append alsa "/ucm2"))
                 (symlink topology (string-append alsa "/topology")))))))))
     (modify-inputs (package-inputs alsa-lib)
                    (prepend alsa-bonus-inputs)
                    (delete "alsa-ucm-conf" "alsa-topology-conf")))))


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: chromebook-ucm-conf
@ 2023-12-02 18:12 Caleb Herbert
  0 siblings, 0 replies; 2+ messages in thread
From: Caleb Herbert @ 2023-12-02 18:12 UTC (permalink / raw)
  To: help-guix

[-- Attachment #1: Type: text/plain, Size: 554 bytes --]

Hi Guix,

I still need help getting audio to work.  I recently updated the code to
the package.

I'm still trying to package these ALSA configs, but alsa-lib might need
to be updated.

I haven't packaged anything before.  I don't know how to get this whole
thing to work.


Caleb Herbert
OpenPGP fingerprint: 631C C434 A56B 5CBD FF21  2346 9764 3795 FA3E 4BCE
What's a fingerprint?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 682 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-12-02 18:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-20 18:28 chromebook-ucm-conf Caleb Herbert
  -- strict thread matches above, loose matches on Subject: below --
2023-12-02 18:12 chromebook-ucm-conf Caleb Herbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).