Skip to main content
Topic: update to linux-raspberrypi4-5.10.73-1-aarch64 has problems with sound changes (Read 1027 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

update to linux-raspberrypi4-5.10.73-1-aarch64 has problems with sound changes

I updated today from linux-raspberrypi4-5.10.63-13-aarch64 to  linux-raspberrypi4-5.10.73-1-aarch64 and find my sound setup fails. First off th pkg now seems to own config.txt which it didn't previously; thats a problem going forward as config.txt is where the local changes are stored.

I don't run uboot so am trying to copy/change the setup to be more like raspbian/manjaro arm.

My config is like this
Quote
# See /boot/overlays/README for all available options
device_tree=broadcom/bcm2711-rpi-4-b.dtb

gpu_mem=64
initramfs initramfs-linux-rpi4.img followkernel
#kernel=kernel8.img
arm_64bit=1
enable_gic=1
disable_overscan=1

#enable sound
dtparam=audio=on
hdmi_drive=2

#uart on pins 14 15
dtoverlay=disable-bt

#enable vc4
dtoverlay=vc4-fkms-v3d
max_framebuffers=2
the standard kernel8.img is copied from the pkg's rpi4Image; this approach works well until now.

In the previous working kernel aplay -l showed
Code: [Select]
**** List of PLAYBACK Hardware Devices ****
card 0: b1 [bcm2835 HDMI 1], device 0: bcm2835 HDMI 1 [bcm2835 HDMI 1]
  Subdevices: 4/4
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
card 1: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
  Subdevices: 4/4
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
in the non-working one I see this from aplay -l
Code: [Select]
pikat:~
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
so something has changed about the alsa view of the system. I seem to get sound back if I change my startup code and set the volume for channel 0 & modify .asoundrc.

Anyone know exactly what's going on here?

Re: update to linux-raspberrypi4-5.10.73-1-aarch64 has problems with sound changes

Reply #1
First off th pkg now seems to own config.txt which it didn't previously; thats a problem going forward as config.txt is where the local changes are stored.
There was a change in kernel PKGBUILDs layout recently, i missed the part about config.txt and cmdline.txt while applying it to rpi4 one. Sorry for inconvenience, the fixed kernel is being built now.

In the previous working kernel aplay -l showed
Code: [Select]
**** List of PLAYBACK Hardware Devices ****
card 0: b1 [bcm2835 HDMI 1], device 0: bcm2835 HDMI 1 [bcm2835 HDMI 1]
  Subdevices: 4/4
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
card 1: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
  Subdevices: 4/4
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
in the non-working one I see this from aplay -l
Code: [Select]
pikat:~
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
so something has changed about the alsa view of the system. I seem to get sound back if I change my startup code and set the volume for channel 0 & modify .asoundrc.

Anyone know exactly what's going on here?
Sound config wasn't changed between these versions, i don't know what could go wrong here
ARMtix

Re: update to linux-raspberrypi4-5.10.73-1-aarch64 has problems with sound changes

Reply #2
There was a change in kernel PKGBUILDs layout recently, i missed the part about config.txt and cmdline.txt while applying it to rpi4 one. Sorry for inconvenience, the fixed kernel is being built now.
Sound config wasn't changed between these versions, i don't know what could go wrong here
No problem re config.txt etc. I keep a backup of that stuff so it's easy to fix.
It seems to be a change in the Kernel; I have manjaro  on another rpi4 and that also has the same listing for alsa playback devices.

Re: update to linux-raspberrypi4-5.10.73-1-aarch64 has problems with sound changes

Reply #3
Hello,

I had a similar problem and found some very useful information on:
https://wiki.archlinux.org/title/Advanced_Linux_Sound_Architecture#Set_the_default_sound_card

I found how to work around the problem so that my usb sound card is not in position 0 in /proc/asound/cards

I want my two HDA-Intel cards to always be in position 0 and 1 and my USB-Audio card in position 2

To see the names of the loaded modules:
$ cat/proc/asound/modules
 0 snd_hda_intel
 1 snd_hda_intel
 2 snd_usb_audio

To set snd_usb_audio position 2 in all cases:

sudo nano /etc/modprobe.d/alsa-base.conf
I put this in there:
options snd_usb_audio index = 2

*******

To see the cards and their numbers:
$ cat /proc/asound/cards
 0 [HDMI]: HDA-Intel - HDA ATI HDMI
                      HDA ATI HDMI at 0xfce60000 irq 96
 1 [Generic]: HDA-Intel - HD-Audio Generic
                      HD-Audio Generic at 0xfc900000 irq 98
 2 [Camera]: USB-Audio - USB 2.0 Camera
 
******

To set map 1 as the default, I put this in ~ /.asoundrc (or in /etc/asound.conf):
mousepad ~ /.asoundrc or nano ~ /.asoundrc
defaults.pcm.card 1
defaults.ctl.card 1

Re: update to linux-raspberrypi4-5.10.73-1-aarch64 has problems with sound changes

Reply #4
Hello,

I had a similar problem and found some very useful information on:
https://wiki.archlinux.org/title/Advanced_Linux_Sound_Architecture#Set_the_default_sound_card

I found how to work around the problem so that my usb sound card is not in position 0 in /proc/asound/cards

I want my two HDA-Intel cards to always be in position 0 and 1 and my USB-Audio card in position 2

To see the names of the loaded modules:
$ cat/proc/asound/modules
 0 snd_hda_intel
 1 snd_hda_intel
 2 snd_usb_audio
.............
that might be useful for intel machine, but on the manjaro which I use I already started to use a usb sound device. On this machine also running linux 5.10.73 I only see one broadcom card
Code: [Select]
$ cat /proc/asound/modules 
 0 snd_bcm2835
 1 snd_usb_audio
my guess is they merged the two devices or jammed them together somehow. At any rate on the armtix machine I had to change my default card number from 1 to 0 (in .asoundrc) to get sound out of the headphones.

Re: update to linux-raspberrypi4-5.10.73-1-aarch64 has problems with sound changes

Reply #5
that might be useful for intel machine, but on the manjaro which I use I already started to use a usb sound device. On this machine also running linux 5.10.73 I only see one broadcom card
Code: [Select]
$ cat /proc/asound/modules 
 0 snd_bcm2835
 1 snd_usb_audio
my guess is they merged the two devices or jammed them together somehow. At any rate on the armtix machine I had to change my default card number from 1 to 0 (in .asoundrc) to get sound out of the headphones.
Yes, I saw that in one case aplay -l detects a mix of two cards ...

Have you tried this to set snd_usb_audio to position 0 in all cases:

sudo nano /etc/modprobe.d/alsa-base.conf
And indicate this:
options snd_usb_audio index = 0

Re: update to linux-raspberrypi4-5.10.73-1-aarch64 has problems with sound changes

Reply #6
I won't touch the manjaro it works for me. I messed only with ~/.asoundrc on artix and changed cardnumber to 0. This link
https://raspberrypi.stackexchange.com/questions/112954/how-to-restore-audio-output-after-updating-raspbian-buster-on-pi4
appears to be talking about the original split into two. phoronix_king_rus is the expert on where the kernel derives from so he may know if they have reversed this change. I can check with latest raspbian and see what they are doing.

Re: update to linux-raspberrypi4-5.10.73-1-aarch64 has problems with sound changes

Reply #7
The raspbian I had installed shows this
Code: [Select]
pi@raspberrypi:~ $ uname -a
Linux raspberrypi 5.10.11-v7l+ #1399 SMP Thu Jan 28 12:09:48 GMT 2021 armv7l GNU/Linux
pi@raspberrypi:~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: b1 [bcm2835 HDMI 1], device 0: bcm2835 HDMI 1 [bcm2835 HDMI 1]
  Subdevices: 4/4
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
card 1: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
  Subdevices: 4/4
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3

after updating I find myself on 5.10.63 so no change in the result
Code: [Select]
pi@raspberrypi:~ $ uname -a
Linux raspberrypi 5.10.63-v7l+ #1459 SMP Wed Oct 6 16:41:57 BST 2021 armv7l GNU/Linux
pi@raspberrypi:~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: b1 [bcm2835 HDMI 1], device 0: bcm2835 HDMI 1 [bcm2835 HDMI 1]
  Subdevices: 4/4
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
card 1: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
  Subdevices: 4/4
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3


Re: update to linux-raspberrypi4-5.10.73-1-aarch64 has problems with sound changes

Reply #9
I solved this by commenting out hdmi_drive=2 in my config so it now reads

Code: [Select]
# See /boot/overlays/README for all available options
device_tree=broadcom/bcm2711-rpi-4-b.dtb

#dtoverlay=vc4-kms-v3d
#initramfs initramfs-linux-rpi4.img followkernel
#kernel=rpi4Image

gpu_mem=64
initramfs initramfs-linux-rpi4.img followkernel
#kernel=kernel8.img
arm_64bit=1
enable_gic=1
disable_overscan=1

#enable sound
dtparam=audio=on
#hdmi_drive=2

#uart on pins 14 15
dtoverlay=disable-bt

#enable vc4
dtoverlay=vc4-fkms-v3d
max_framebuffers=2
after that I see two bcm spund devices again.
Code: [Select]
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: b1 [bcm2835 HDMI 1], device 0: bcm2835 HDMI 1 [bcm2835 HDMI 1]
  Subdevices: 4/4
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
card 1: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
  Subdevices: 4/4
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
of course I then had to change the card number in various places :(