Discussion:
Bug#856505: No sound in Raspberry Pi 2, missing module?
eHenry Berg
2017-03-01 18:53:48 UTC
Permalink
Package: linux-image-4.9.0-2-armmp-lpae
Version: 4.9.0-2

My Raspberry Pi 2 does not give any sound from the 3.5 mm jack.

# cat /etc/apt/sources.list
deb http://ftp.fi.debian.org/debian sid main contrib non-free
deb-src http://ftp.fi.debian.org/debian sid main contrib non-free

# ls /proc/asound
ls: cannot access '/proc/asound': No such file or directory
# modprobe snd-bcm2835
modprobe: FATAL: Module snd-bcm2835 not found in directory
/lib/modules/4.9.0-2-armmp-lpae

In Rasbian configuration:
https://github.com/raspberrypi/linux/blob/rpi-4.9.y/arch/arm/configs/bcm2709_defconfig
CONFIG_SND_BCM2835=m

In Debian configuration:
/boot/config-4.9.0-2-armmp-lpae
I do not have "CONFIG_SND_BCM2835=m".

I think the sound does not work for me because the module snd-bcm2835
does not exist.
Can you configure kernel version 4.10 to include snd-bcm2835 as a
module, when it comes to sid.

Best Regards,
Evald
Ben Hutchings
2017-03-30 00:13:39 UTC
Permalink
Control: retitle -1 No driver for BCM2835 audio output
Control: reassign -1 src:linux 4.9.10-1
Control: severity -1 important
Control: tag -1 upstream

On Wed, 2017-03-01 at 18:53 +0000, eHenry Berg wrote:
[...]
Post by eHenry Berg
I think the sound does not work for me because the module snd-bcm2835
does not exist.
Can you configure kernel version 4.10 to include snd-bcm2835 as a
module, when it comes to sid.
This driver has still not been added upstream, so we cannot enable it
yet.

Ben.
--
Ben Hutchings
In a hierarchy, every employee tends to rise to his level of
incompetence.
Debian Bug Tracking System
2017-03-30 00:15:07 UTC
Permalink
Post by Ben Hutchings
retitle -1 No driver for BCM2835 audio output
Bug #856505 [linux-image-4.9.0-2-armmp-lpae] No sound in Raspberry Pi 2, missing module?
Changed Bug title to 'No driver for BCM2835 audio output' from 'No sound in Raspberry Pi 2, missing module?'.
Post by Ben Hutchings
reassign -1 src:linux 4.9.10-1
Bug #856505 [linux-image-4.9.0-2-armmp-lpae] No driver for BCM2835 audio output
Bug reassigned from package 'linux-image-4.9.0-2-armmp-lpae' to 'src:linux'.
No longer marked as found in versions 4.9.0-2.
Ignoring request to alter fixed versions of bug #856505 to the same values previously set
Bug #856505 [src:linux] No driver for BCM2835 audio output
Marked as found in versions linux/4.9.10-1.
Post by Ben Hutchings
severity -1 important
Bug #856505 [src:linux] No driver for BCM2835 audio output
Severity set to 'important' from 'normal'
Post by Ben Hutchings
tag -1 upstream
Bug #856505 [src:linux] No driver for BCM2835 audio output
Added tag(s) upstream.
--
856505: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=856505
Debian Bug Tracking System
Contact ***@bugs.debian.org with problems
eHenry Berg
2018-09-19 20:31:27 UTC
Permalink
Hello,

snd-bcm2835 has reached the staging section of the linux kernel,
according to these links:
https://www.raspberrypi.org/forums/viewtopic.php?f=50&t=222946
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c?h=v4.14

# uname -r
4.18.0-1-arm64

# /sbin/modprobe snd-bcm2835
modprobe: FATAL: Module snd-bcm2835 not found in directory
/lib/modules/4.18.0-1-arm64

# grep -i SND_BCM2835 /boot/config-4.18.0-1-arm64
CONFIG_SND_BCM2835_SOC_I2S=m
# CONFIG_SND_BCM2835 is not set

Is it possible to add staging driver snd-bcm2835 in Debian?
I use flavour amd64, armmp and armmp-lpae.

Best Regards,
Evald
Santiago Garcia Mantinan
2018-11-29 13:36:11 UTC
Permalink
Hi!

This module is now included in the 4.19 kernel recently uploaded to
experimental (linux-image-4.19.0-trunk-arm64 4.19.5-1~exp1), you can add
experimental to your sources.list like this:

deb http://deb.debian.org/debian ../project/experimental main

However on my first tests this hasn't solved the problem, looks like the
driver is not finding the hardware or similar, I'm getting:

snd_bcm2835: module is from the staging directory, the quality is unknown, you have been warned.

but not the:

bcm2835_alsa bcm2835_alsa: card created with 8 channels

message, so it doesn't work.

We know that the current dtb is broken since at lease 4.18, this breaks wifi
and it might affect the sound so that it is not found, but I don't really know.

If you test it and get it to work just let us know how you managed it.

Regards.
--
Manty/BestiaTester -> http://manty.net
eHenry Berg
2018-11-29 20:40:28 UTC
Permalink
Hi!

This is my souces.list, but I got your message:
# cat /etc/apt/sources.list
deb http://ftp.fi.debian.org/debian sid main contrib non-free
#
I have been working with Dkms with this:
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git/tree/drivers/staging/vc04_services
with branch staging-testing.
I got both vchiq.ko and snd-bcm2835.ko compiled and installed, but I
think I am in the same situation like you.

This is what Raspian give:
nov 24 16:36:03 raspberrypi kernel: snd_bcm2835: module is from the
staging directory, the quality is unknown, you have been warned.
nov 24 16:36:03 raspberrypi kernel: bcm2835_alsa bcm2835_alsa: card
created with 8 channels

Debian armhf with gregkh driver source give this:
Nov 28 21:04:46 irena kernel: vchiq: loading out-of-tree module taints kernel.
Nov 28 21:04:46 irena kernel: vchiq: vchiq_init_state: slot_zero =
61f93cc4, is_master = 0
Nov 28 21:04:46 irena systemd-modules-load[190]: Inserted module 'snd_bcm2835'

lsmod and /proc/modules look okay i.e. modules have been loaded.
/proc/asound is not populated with the new driver i.e. we do not have
communication interface with the hardware.

I just recently got the modules installed. I think like you that the
dtb is the culprit. I have not studied how I can get dts compiled
without the whole kernel yet, but maybe you can test the below.
Here is a link:
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git/tree/drivers/staging/vc04_services/bcm2835-audio/TODO
audio: audio {
compatible = "brcm,bcm2835-audio";
brcm,pwm-channels = <8>;
};

I think the 4 rows with audio should be inserted into this
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git/tree/arch/arm/boot/dts/bcm283x.dtsi
after
vc4: gpu {
compatible = "brcm,bcm2835-vc4";
};

Can you put these 4 rows in bcm283x.dtsi in Debian. Test the new dtb
you got after this. Is /proc/asound populated with the new driver now?

4 °C in Aland Islands regards,
Evald
Santiago Garcia Mantinan
2018-12-06 10:43:42 UTC
Permalink
I've compiled a Debian 4.19 kernel with your sugested patch to enable audio
and reverting another one to fix the WiFi problem and I now have both audio
and WiFi working.

I'll send proper patches as soon as I have time, but it works.

Regards.
--
Santiago García Mantiñán
Santiago Garcia Mantinan
2018-12-06 22:05:19 UTC
Permalink
Hi!

Based on eHenry's instructions I have created this patch which I have tested
on Debian's 4.19 kernel now on experimental, where we have already enabled
the sound driver which was not working.

The result is that with this patch the sound is finally working, so, please
apply this to the 4.19 kernel to enable sound.

--- bcm283x.dtsi.orig 2018-12-03 00:07:55.000000000 +0100
+++ bcm283x.dtsi 2018-12-05 13:36:02.718569539 +0100
@@ -634,6 +634,10 @@
vc4: gpu {
compatible = "brcm,bcm2835-vc4";
};
+audio: audio {
+ compatible = "brcm,bcm2835-audio";
+ brcm,pwm-channels = <8>;
+};
};

clocks {

Regards.
--
Santiago García Mantiñán
Uwe Kleine-König
2018-12-07 08:24:14 UTC
Permalink
Post by Santiago Garcia Mantinan
Based on eHenry's instructions I have created this patch which I have tested
on Debian's 4.19 kernel now on experimental, where we have already enabled
the sound driver which was not working.
The result is that with this patch the sound is finally working, so, please
apply this to the 4.19 kernel to enable sound.
The right thing here is to fix mainline first. So please prepare a patch
against linux.git following
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst

Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Loading...