Github messages for voidlinux
 help / color / mirror / Atom feed
* [ISSUE] sof-firmware doesn't install alsa-ucm-conf, a necessary package for sof audio driver initialization
@ 2020-11-16  0:29 lane-brain
  2020-11-24  0:26 ` cinerea0
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: lane-brain @ 2020-11-16  0:29 UTC (permalink / raw)
  To: ml

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

New issue by lane-brain on void-packages repository

https://github.com/void-linux/void-packages/issues/26419

Description:
Hi! After getting an X1C7 last year I became very familiar with issues relating to poor support for the audio chipset in the snd_hda_intel driver. Proper support was being taken up by Intel's sof audio driver project, and since the end of 2019 it has come a long way. The drivers work how you'd expect any other driver to work provided the firmware blobs are installed, which they are by default on at least ubuntu based distros.

I recently installed Void and expected that I'd be able to install the sof-firmware in the official repo and be good to go, but still couldn't initialize the card, it kept falling back on snd_hda_intel. Audio playback works fine on that driver, but it has no support for the directional mic on the laptop which is especially a problem in these times. The way things stand, it could lead to the illusion that the proper audio driver is being loaded when actually this is a regression from the state of the art support of the chipset.

Luckily, I spent a lot of time diagnosing this issue when info was scarce and was quickly able to determine why sof couldn't initialize, it has to do with sof needing the ucm topology config files put out by alsa. I wrote a template to pull the current alsa-ucm-conf release and install its contents to /usr/share/alsa/, which fixed the issue upon installation.

Initially I was worried that Void's pulseaudio wouldn't be able to handle it because it remains on the 13.0 release, because ucm2 was only properly supported by the new code supposed to debut in 14.0. However it appears that this part of the code may have been backported in advance of the new release, as autodetection of the sof module with working playback/capture was smooth and worked exactly like you'd expect.

I would recommend that sof-firmware be updated to include a new alsa-ucm-conf package as a dependency. I can create a PR for my alsa-ucm-conf template after I polish the template, but I wanted to submit this issue beforehand because it was so trivial to package this that I wondered whether there may have been some reason why sof-firmware was packaged but not alsa-ucm-conf that I wasn't aware of. 

(PS, for what its worth, I'm using a custom kernel because void doesn't compile in support for the Comet Lake chipset for its kbuild and primarily because I do audio production and need the low-latency patchset. Rest assured, everything I've stated is reproducible on the stock kernel.)

### System
* xuname:  
  Void 5.9.8-xanmod1_1 x86_64 GenuineIntel notuptodate rFFFFFFFFF
* package:  
  sof-firmware-1.5.1_1

### Expected behavior
Installing sof-firmware should install all packages necessary to properly load the sof kernel modules.

### Actual behavior
Because the alsa ucm topologies are not installed, sof kernel drivers cannot successfully initialize.

### Steps to reproduce the behavior
Install sof-firmware, `modprobe snd_sof_pci`. Or after a fresh reboot, `sudo dmesg | grep sof`.


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

* Re: sof-firmware doesn't install alsa-ucm-conf, a necessary package for sof audio driver initialization
  2020-11-16  0:29 [ISSUE] sof-firmware doesn't install alsa-ucm-conf, a necessary package for sof audio driver initialization lane-brain
@ 2020-11-24  0:26 ` cinerea0
  2020-11-24  2:33 ` lane-brain
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: cinerea0 @ 2020-11-24  0:26 UTC (permalink / raw)
  To: ml

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

New comment by cinerea0 on void-packages repository

https://github.com/void-linux/void-packages/issues/26419#issuecomment-732504276

Comment:
FYI, there's also an issue with the `sof-firmware` package that's supposed to be solved in #26003, but it hasn't been merged yet for unknown reasons. If you could let me know where those 'alsa-ucm-conf' files are supposed to be installed, I can write up a template for it and include it in the previously mentioned PR before it gets merged.

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

* Re: sof-firmware doesn't install alsa-ucm-conf, a necessary package for sof audio driver initialization
  2020-11-16  0:29 [ISSUE] sof-firmware doesn't install alsa-ucm-conf, a necessary package for sof audio driver initialization lane-brain
  2020-11-24  0:26 ` cinerea0
@ 2020-11-24  2:33 ` lane-brain
  2020-11-24  2:35 ` lane-brain
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: lane-brain @ 2020-11-24  2:33 UTC (permalink / raw)
  To: ml

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

New comment by lane-brain on void-packages repository

https://github.com/void-linux/void-packages/issues/26419#issuecomment-732547623

Comment:
Here is my template, it was based off of your template for `sof-firmware`. 

One last word, in my troubleshooting last year I learned that pulseaudio makes use of these ucm config files to autoconfigure detected cards, I'm not sure what decision would be proper to make considering dependencies on pulseaudio because in certain cases it still works out of the box without the ucm conf files. For example, using snd_hda_intel I had speakers working but no mic, but that driver doesn't fully support my laptop's dsp so that's to be expected. But definitely they should be deps for sof-firmware.

```
# Template file for 'alsa-ucm-conf'
pkgname=alsa-ucm-conf
version=1.2.4
revision=1
archs="i686* x86_64*"
depends="alsa-lib"
wrksrc=${pkgname}-${version}
short_desc="ALSA Use Case Manager topology configurations"
maintainer="lane-brain <lane@mailbox.org>"
license="BSD-3-Clause"
homepage="https://github.com/alsa-project/alsa-ucm-conf"
distfiles="https://www.alsa-project.org/files/pub/lib/${pkgname}-${version}.tar.bz2"
checksum=2c3b535c77dcb9aaf62a61f4f8324f1ab184162f105f7ec9ed1e37c742fcd340

do_install() {
    cd ${wrksrc}
    find ucm2 -type f -iname "*.conf" -exec install -vDm 644 {} "${DESTDIR}/usr/share/alsa/"{} \;
    find ucm2 -type l -iname "*.conf" -exec cp -dv {} "${DESTDIR}/usr/share/alsa/"{} \;
    install -vDm 644 README.md -t "${DESTDIR}/usr/share/doc/${pkgname}"
    install -vDm 644 ucm2/README.md -t "${DESTDIR}/usr/share/doc/${pkgname}/ucm2"
    vlicense LICENSE
}
```

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

* Re: sof-firmware doesn't install alsa-ucm-conf, a necessary package for sof audio driver initialization
  2020-11-16  0:29 [ISSUE] sof-firmware doesn't install alsa-ucm-conf, a necessary package for sof audio driver initialization lane-brain
  2020-11-24  0:26 ` cinerea0
  2020-11-24  2:33 ` lane-brain
@ 2020-11-24  2:35 ` lane-brain
  2020-11-24  2:35 ` lane-brain
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: lane-brain @ 2020-11-24  2:35 UTC (permalink / raw)
  To: ml

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

New comment by lane-brain on void-packages repository

https://github.com/void-linux/void-packages/issues/26419#issuecomment-732547623

Comment:
Here is my template, it was based off of your template for `sof-firmware` and seeing other package. 

One last word, in my troubleshooting last year I learned that pulseaudio makes use of these ucm config files to autoconfigure detected cards, I'm not sure what decision would be proper to make considering dependencies on pulseaudio because in certain cases it still works out of the box without the ucm conf files. For example, using snd_hda_intel I had speakers working but no mic, but that driver doesn't fully support my laptop's dsp so that's to be expected. Definitely they should be deps for sof-firmware.

```
# Template file for 'alsa-ucm-conf'
pkgname=alsa-ucm-conf
version=1.2.4
revision=1
archs="i686* x86_64*"
depends="alsa-lib"
wrksrc=${pkgname}-${version}
short_desc="ALSA Use Case Manager topology configurations"
maintainer="lane-brain <lane@mailbox.org>"
license="BSD-3-Clause"
homepage="https://github.com/alsa-project/alsa-ucm-conf"
distfiles="https://www.alsa-project.org/files/pub/lib/${pkgname}-${version}.tar.bz2"
checksum=2c3b535c77dcb9aaf62a61f4f8324f1ab184162f105f7ec9ed1e37c742fcd340

do_install() {
    cd ${wrksrc}
    find ucm2 -type f -iname "*.conf" -exec install -vDm 644 {} "${DESTDIR}/usr/share/alsa/"{} \;
    find ucm2 -type l -iname "*.conf" -exec cp -dv {} "${DESTDIR}/usr/share/alsa/"{} \;
    install -vDm 644 README.md -t "${DESTDIR}/usr/share/doc/${pkgname}"
    install -vDm 644 ucm2/README.md -t "${DESTDIR}/usr/share/doc/${pkgname}/ucm2"
    vlicense LICENSE
}
```

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

* Re: sof-firmware doesn't install alsa-ucm-conf, a necessary package for sof audio driver initialization
  2020-11-16  0:29 [ISSUE] sof-firmware doesn't install alsa-ucm-conf, a necessary package for sof audio driver initialization lane-brain
                   ` (2 preceding siblings ...)
  2020-11-24  2:35 ` lane-brain
@ 2020-11-24  2:35 ` lane-brain
  2020-11-24  4:07 ` lane-brain
  2020-12-10 18:48 ` [ISSUE] [CLOSED] " ericonr
  5 siblings, 0 replies; 7+ messages in thread
From: lane-brain @ 2020-11-24  2:35 UTC (permalink / raw)
  To: ml

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

New comment by lane-brain on void-packages repository

https://github.com/void-linux/void-packages/issues/26419#issuecomment-732547623

Comment:
Here is my template, it was based off of your template for `sof-firmware` and seeing other package. 

One last word, in my troubleshooting last year I learned that pulseaudio makes use of these ucm config files to autoconfigure detected cards, I'm not sure what decision would be proper to make considering dependencies on pulseaudio because in certain cases it still works out of the box without the ucm conf files. For example, using snd_hda_intel I had speakers working but no mic, but that driver doesn't fully support my laptop's dsp so that's to be expected. Definitely they should be deps for `sof-firmware`.

```
# Template file for 'alsa-ucm-conf'
pkgname=alsa-ucm-conf
version=1.2.4
revision=1
archs="i686* x86_64*"
depends="alsa-lib"
wrksrc=${pkgname}-${version}
short_desc="ALSA Use Case Manager topology configurations"
maintainer="lane-brain <lane@mailbox.org>"
license="BSD-3-Clause"
homepage="https://github.com/alsa-project/alsa-ucm-conf"
distfiles="https://www.alsa-project.org/files/pub/lib/${pkgname}-${version}.tar.bz2"
checksum=2c3b535c77dcb9aaf62a61f4f8324f1ab184162f105f7ec9ed1e37c742fcd340

do_install() {
    cd ${wrksrc}
    find ucm2 -type f -iname "*.conf" -exec install -vDm 644 {} "${DESTDIR}/usr/share/alsa/"{} \;
    find ucm2 -type l -iname "*.conf" -exec cp -dv {} "${DESTDIR}/usr/share/alsa/"{} \;
    install -vDm 644 README.md -t "${DESTDIR}/usr/share/doc/${pkgname}"
    install -vDm 644 ucm2/README.md -t "${DESTDIR}/usr/share/doc/${pkgname}/ucm2"
    vlicense LICENSE
}
```

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

* Re: sof-firmware doesn't install alsa-ucm-conf, a necessary package for sof audio driver initialization
  2020-11-16  0:29 [ISSUE] sof-firmware doesn't install alsa-ucm-conf, a necessary package for sof audio driver initialization lane-brain
                   ` (3 preceding siblings ...)
  2020-11-24  2:35 ` lane-brain
@ 2020-11-24  4:07 ` lane-brain
  2020-12-10 18:48 ` [ISSUE] [CLOSED] " ericonr
  5 siblings, 0 replies; 7+ messages in thread
From: lane-brain @ 2020-11-24  4:07 UTC (permalink / raw)
  To: ml

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

New comment by lane-brain on void-packages repository

https://github.com/void-linux/void-packages/issues/26419#issuecomment-732547623

Comment:
Here is my template, it was based off of your template for `sof-firmware`. 

One last word, in my troubleshooting last year I learned that pulseaudio makes use of these ucm config files to autoconfigure detected cards, I'm not sure what decision would be proper to make considering dependencies on pulseaudio because in certain cases it still works out of the box without the ucm conf files. For example, using snd_hda_intel I had speakers working but no mic, but that driver doesn't fully support my laptop's dsp so that's to be expected. Definitely they should be deps for `sof-firmware`.

```
# Template file for 'alsa-ucm-conf'
pkgname=alsa-ucm-conf
version=1.2.4
revision=1
archs="i686* x86_64*"
depends="alsa-lib"
wrksrc=${pkgname}-${version}
short_desc="ALSA Use Case Manager topology configurations"
maintainer="lane-brain <lane@mailbox.org>"
license="BSD-3-Clause"
homepage="https://github.com/alsa-project/alsa-ucm-conf"
distfiles="https://www.alsa-project.org/files/pub/lib/${pkgname}-${version}.tar.bz2"
checksum=2c3b535c77dcb9aaf62a61f4f8324f1ab184162f105f7ec9ed1e37c742fcd340

do_install() {
    cd ${wrksrc}
    find ucm2 -type f -iname "*.conf" -exec install -vDm 644 {} "${DESTDIR}/usr/share/alsa/"{} \;
    find ucm2 -type l -iname "*.conf" -exec cp -dv {} "${DESTDIR}/usr/share/alsa/"{} \;
    install -vDm 644 README.md -t "${DESTDIR}/usr/share/doc/${pkgname}"
    install -vDm 644 ucm2/README.md -t "${DESTDIR}/usr/share/doc/${pkgname}/ucm2"
    vlicense LICENSE
}
```

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

* Re: [ISSUE] [CLOSED] sof-firmware doesn't install alsa-ucm-conf, a necessary package for sof audio driver initialization
  2020-11-16  0:29 [ISSUE] sof-firmware doesn't install alsa-ucm-conf, a necessary package for sof audio driver initialization lane-brain
                   ` (4 preceding siblings ...)
  2020-11-24  4:07 ` lane-brain
@ 2020-12-10 18:48 ` ericonr
  5 siblings, 0 replies; 7+ messages in thread
From: ericonr @ 2020-12-10 18:48 UTC (permalink / raw)
  To: ml

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

Closed issue by lane-brain on void-packages repository

https://github.com/void-linux/void-packages/issues/26419

Description:
Hi! After getting an X1C7 last year I became very familiar with issues relating to poor support for the audio chipset in the snd_hda_intel driver. Proper support was being taken up by Intel's sof audio driver project, and since the end of 2019 it has come a long way. The drivers work how you'd expect any other driver to work provided the firmware blobs are installed, which they are by default on at least ubuntu based distros.

I recently installed Void and expected that I'd be able to install the sof-firmware in the official repo and be good to go, but still couldn't initialize the card, it kept falling back on snd_hda_intel. Audio playback works fine on that driver, but it has no support for the directional mic on the laptop which is especially a problem in these times. The way things stand, it could lead to the illusion that the proper audio driver is being loaded when actually this is a regression from the state of the art support of the chipset.

Luckily, I spent a lot of time diagnosing this issue when info was scarce and was quickly able to determine why sof couldn't initialize, it has to do with sof needing the ucm topology config files put out by alsa. I wrote a template to pull the current alsa-ucm-conf release and install its contents to /usr/share/alsa/, which fixed the issue upon installation.

Initially I was worried that Void's pulseaudio wouldn't be able to handle it because it remains on the 13.0 release, because ucm2 was only properly supported by the new code supposed to debut in 14.0. However it appears that this part of the code may have been backported in advance of the new release, as autodetection of the sof module with working playback/capture was smooth and worked exactly like you'd expect.

I would recommend that sof-firmware be updated to include a new alsa-ucm-conf package as a dependency. I can create a PR for my alsa-ucm-conf template after I polish the template, but I wanted to submit this issue beforehand because it was so trivial to package this that I wondered whether there may have been some reason why sof-firmware was packaged but not alsa-ucm-conf that I wasn't aware of. 

(PS, for what its worth, I'm using a custom kernel because void doesn't compile in support for the Comet Lake chipset for its kbuild and primarily because I do audio production and need the low-latency patchset. Rest assured, everything I've stated is reproducible on the stock kernel.)

### System
* xuname:  
  Void 5.9.8-xanmod1_1 x86_64 GenuineIntel notuptodate rFFFFFFFFF
* package:  
  sof-firmware-1.5.1_1

### Expected behavior
Installing sof-firmware should install all packages necessary to properly load the sof kernel modules.

### Actual behavior
Because the alsa ucm topologies are not installed, sof kernel drivers cannot successfully initialize.

### Steps to reproduce the behavior
Install sof-firmware, `modprobe snd_sof_pci`. Or after a fresh reboot, `sudo dmesg | grep sof`.


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

end of thread, other threads:[~2020-12-10 18:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-16  0:29 [ISSUE] sof-firmware doesn't install alsa-ucm-conf, a necessary package for sof audio driver initialization lane-brain
2020-11-24  0:26 ` cinerea0
2020-11-24  2:33 ` lane-brain
2020-11-24  2:35 ` lane-brain
2020-11-24  2:35 ` lane-brain
2020-11-24  4:07 ` lane-brain
2020-12-10 18:48 ` [ISSUE] [CLOSED] " ericonr

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 NNTP newsgroup(s).