Sound driver on Raspi 4
Axel Braun
axel.braun at gmx.de
Thu Oct 1 03:50:52 EDT 2020
Dear Max and Stefan,
thank you very much for your explanations.
They are a bit beyond my knowledge level, but can help the (open)SUSE experts
to work on it. I have created a bug https://bugzilla.opensuse.org/
show_bug.cgi?id=1177169 with reference to this thread.
Thanks
Axel
Am Sonntag, 27. September 2020, 22:56:20 CEST schrieb Matt Flax:
> On 27/9/20 10:05 pm, Stefan Wahren wrote:
> > Hi,
> >
> > Am 25.09.20 um 17:37 schrieb Axel Braun:
> >> Hello Stefan,
> >>
> >> Am Freitag, 25. September 2020, 14:13:12 CEST schrieben Sie:
> >>> Am 25.09.20 um 09:39 schrieb Axel Braun:
> >>>> Hi,
> >>>>
> >>>> I was trying to get sound out of a Raspi 4 using openSUSE Tumbleweed
> >>>> (currently 5.8.x kernel), but no driver could be determined that
> >>>> worked.
> >>>
> >>> since this is a mainline kernel list, we cannot give information about
> >>> specific distributions.
> >>
> >> Sure.
> >> The focus was more on the latest kernel than on TW.
> >>
> >>>> Can anyone advise me about the correct driver, and when this hits the
> >>>> standard kernel?
> >>>
> >>> AFAIK mainline kernel won't have audio support for RPi 4 until Linux
> >>> 5.10. The HDMI audio support has been merged in linux-next recently.
> >>>
> >>> bcm2835-audio (VCHIQ audio) for the jack isn't supported yet and i don't
> >>> have any information who is working on this.
> >>
> >> By chance, do you know if the jack output works in Raspian?
> >
> > i assume you mean Raspbian / Raspberry Pi OS incl. the Raspberry Pi
> > kernel (vendor kernel).
> >
> > I would be surprised, if it doesn't work.
>
> To enable the standard onboard jack, the boot/config.txt file needs a
> little modification to add "dtparam=audio=on". There are various options
> for modifying the effect.
>
> Here is some history of the board sound driver :
>
> The file sound/soc/bcm/bcm2835-i2s.c does most of the I2S register
> configurations.
>
> The driver has gone through a few different iterations, starting with a
> dedicated 2 channels setup. You see, the audio handling silicon on the
> Pi is reasonably flexible allowing left and right audio words to be
> shifted within a large bit block (range).
>
> At one point the number of allowed audio channels was increased from 2
> to 8 - this allowed pseudo multichannel operation, where there are
> examples of software channel alignment to overcome the lack of a TDM
> bus. Some users report very stable operation in multichannel mode when
> the audio bus is started at boot time and perpetually on (i.e. using
> jackd to manage the audio fabric in user space).
>
> TDM flexibility was later introduced to allow the I2S bus to lock to a
> TDM bus, shifting the locations of audio words w.r.t. to hardware frame
> clock edge. This shift strangled some modes of operation which broke
> lower sample rates (e.g. 8 kHz and 16 kHz) for certain audio codecs.
>
> That is about where we stand today at the Kernel driver level.
>
> For machine driver configuration, simple sound card setups require only
> a device tree overlay, such as the Audio Injector Ultra simple card
> overlay :
>
> https://github.com/raspberrypi/linux/blob/rpi-5.4.y/arch/arm/boot/dts/overla
> ys/audioinjector-ultra-overlay.dts
>
> While a large number of soundcards use the combination of an overlay and
> a machine driver in C, such as the Audio Injector Isolated soundcard :
>
> https://github.com/raspberrypi/linux/blob/rpi-5.4.y/arch/arm/boot/dts/overla
> ys/audioinjector-isolated-soundcard-overlay.dts
>
> https://github.com/raspberrypi/linux/blob/rpi-5.4.y/sound/soc/bcm/audioinjec
> tor-isolated-soundcard.c
>
> Matt
More information about the linux-rpi-kernel
mailing list