Gentoo Archives: gentoo-user

From: Alexander Puchmayr <alexander.puchmayr@×××××××.at>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Laptop internal speakers no longer working after recent updates
Date: Wed, 01 Sep 2021 07:32:30
Message-Id: 2662402.BddDVKsqQX@zeus
In Reply to: Re: [gentoo-user] Laptop internal speakers no longer working after recent updates by Michael
1 Am Dienstag, 31. August 2021, 19:24:15 CEST schrieb Michael:
2 > On Tuesday, 31 August 2021 12:08:04 BST Alexander Puchmayr wrote:
3 > > Am Dienstag, 31. August 2021, 00:18:43 CEST schrieb Michael:
4 > > > If the alsa drivers are not compiled as modules, the above file would
5 > > > not
6 > > > have any effect. Anyway, let's try this in /etc/asound.conf:
7 > > >
8 > > > defaults.pcm.card 1
9 > > > defaults.pcm.device 0
10 > > > defaults.ctl.card 1
11 > > >
12 > > > On a reboot your Generic_1 analogue card should be available and
13 > > > recognised
14 > > > as the default audio device. You may need to unmute it, via pactl or
15 > > > kmix.
16 > >
17 > > Sorry, didn't change anything.
18 > >
19 > > I doubt that the problem is wrong default settings of alsa.
20 > >
21 > > I run pulseaudio -vvv and the output was interesting:
22 > >
23 > > Pci0000:00/0000:00:08.1/0000:07:00.1/sound/card0
24 > > and
25 > > pci0000:00/0000:00:08.1/0000:07:00.6/sound/card1
26 > >
27 > > Where the latter one is the one that is not used by pulseaudio.
28 > >
29 > > Both report "UCM available for card HD-Audio Generic"
30 > > Note: the card name "HD-Audio Generic" is identical, and this is reported
31 > > by alsa-libs, as far as I could see from the code.
32 >
33 > Your *card* names according to your 'aplay -l' output are/were:
34 >
35 > card 0: Generic
36 > card 1: Generic_1
37 > card 3: Headset
38 >
39 > You can re-check this with:
40 >
41 > aplay -l | awk -F \: '/,/{print $2}' | awk '{print $1}' | uniq
42 >
43 >
44 > Another way to discover all card name(s) including unused cards is by the
45 > output of:
46 >
47 > cat /sys/class/sound/card*/id
48 >
49 > The alsa-ucm function involves creating use case alsa mixer profiles,
50 > similar to pulseaudio profiles and will work even without pulseaudio
51 > running. If a UCM configuration file exists for a card, then pulseaudio
52 > will ignore built-in profiles and will generate a profile based on the UCM
53 > config file.
54 >
55 > Take a look at:
56 >
57 > /usr/share/alsa/ucm2/README.md
58 >
59 > and for various mixer profiles look under /usr/share/alsa/ucm2/
60 >
61 > However, my usage of pulseaudio has been cursory and don't know much about
62 > its auto-configuration. In any case, I suspect the alsa-ucm output is only
63 > relevant in highlighting the common codec name, as you confirm below.
64 >
65 > > [...]
66 > >
67 > > Alsa-info.sh reveals further info:
68 > > !!Soundcards recognised by ALSA
69 > > !!-----------------------------
70 > >
71 > > 0 [Generic ]: HDA-Intel - HD-Audio Generic
72 > >
73 > > HD-Audio Generic at 0xfd3c8000 irq 91
74 > >
75 > > 1 [Generic_1 ]: HDA-Intel - HD-Audio Generic
76 > >
77 > > HD-Audio Generic at 0xfd3c0000 irq 92
78 > >
79 > > 2 [acp ]: acp - acp
80 > >
81 > > acp
82 > >
83 > > To me it looks like as if pulseaudio is quering card0, getting the name
84 > > "HD- Audio Generic", finding the HDMI channels; then it tries to read
85 > > card1, gets also "HD-Audio Generic" as name and hence the same channels
86 > > as for card0.
87 > >
88 > > I have no idea how to fix this.
89 > >
90 > > Cheers
91 > >
92 > > Alex
93 >
94 > As I understand it, "HD-Audio" is the kernel driver (CONFIG_SND_HDA=m) and
95 > "Generic" is the generic codec parser (CONFIG_SND_HDA_GENERIC=m) used by the
96 > snd-hda-intel module (CONFIG_SND_HDA_INTEL=m) - unless a specific model
97 > codec is (also) configured for a card, e.g. in my case I have
98 > CONFIG_SND_HDA_CODEC_CONEXANT=m
99 >
100 > If in your recent system update/upgrade you did not change your kernel, or
101 > the available options of any audio modules under /etc/modprobe.d/ then the
102 > drivers were always configured so and therefore the problem you experience
103 > now is unlikely to be caused by the generic codec parser.
104 >
105 > Someone more knowledgeable in pulseaudio should chime in, assuming this
106 > problem is being caused by pulseaudio. :-/
107
108 I just downgraded to alsa-utils and alsa-tools 1.2.3, and the problem
109 disappeared. I will keep this combination for a while until the next update.
110
111 However, I'm not sure whether this is an alsa problem or a pulseaudio problem.
112
113 Thanks for your help
114 Alex