Repository navigation
Closed
Description
Describe the bug
The sBitx radio uses a Pi 4 and a wm8731 audio codec. With the Pi 5, the kernel shows strange messages (same config.txt options used), and the sound card does not work.
Steps to reproduce the behaviour
Just boot the radio with a Pi 5. Error messages appear every 10s.
[ 21.818092] designware-i2s 1f000a4000.i2s: ASoC: error at snd_soc_dai_set_bclk_ratio on 1f000a4000.i2s: -22
[ 21.818113] AudioInjector audio: ASoC: error at snd_soc_link_hw_params on AudioInjector audio: -22
[ 21.818458] AudioInjector audio: ASoC: error at __soc_pcm_hw_params on AudioInjector audio: -22
[ 21.821546] designware-i2s 1f000a4000.i2s: ASoC: error at snd_soc_dai_set_bclk_ratio on 1f000a4000.i2s: -22
[ 21.821553] AudioInjector audio: ASoC: error at snd_soc_link_hw_params on AudioInjector audio: -22
[ 21.821567] AudioInjector audio: ASoC: error at __soc_pcm_hw_params on AudioInjector audio: -22
[ 31.650617] designware-i2s 1f000a4000.i2s: ASoC: error at snd_soc_dai_set_bclk_ratio on 1f000a4000.i2s: -22
[ 31.650625] AudioInjector audio: ASoC: error at snd_soc_link_hw_params on AudioInjector audio: -22
[ 31.650638] AudioInjector audio: ASoC: error at __soc_pcm_hw_params on AudioInjector audio: -22
[ 31.651472] designware-i2s 1f000a4000.i2s: ASoC: error at snd_soc_dai_set_bclk_ratio on 1f000a4000.i2s: -22
[ 31.651478] AudioInjector audio: ASoC: error at snd_soc_link_hw_params on AudioInjector audio: -22
[ 31.651815] AudioInjector audio: ASoC: error at __soc_pcm_hw_params on AudioInjector audio: -22
[ 41.684473] designware-i2s 1f000a4000.i2s: ASoC: error at snd_soc_dai_set_bclk_ratio on 1f000a4000.i2s: -22
[ 41.684483] AudioInjector audio: ASoC: error at snd_soc_link_hw_params on AudioInjector audio: -22
[ 41.684499] AudioInjector audio: ASoC: error at __soc_pcm_hw_params on AudioInjector audio: -22
[ 41.685435] designware-i2s 1f000a4000.i2s: ASoC: error at snd_soc_dai_set_bclk_ratio on 1f000a4000.i2s: -22
[ 41.685440] AudioInjector audio: ASoC: error at snd_soc_link_hw_params on AudioInjector audio: -22
[ 41.685780] AudioInjector audio: ASoC: error at __soc_pcm_hw_params on AudioInjector audio: -22
Device (s)
Other
System
RPi 5 only! Pi 4 works like a charm.
Latest Raspberry OS, with updated kernel 6.1.69-v8+ using 4k page variant (kernel8.img).
2023/12/14 16:43:25
Copyright (c) 2012 Broadcom
version 0f881224 (release) (embedded)
Raspberry Pi reference 2023-12-11
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 2acf7afcba7d11500313a7b93bb55a2aae20b2d6, stage2
kernel:
6.1.69-v8+
Logs
Opening the audio device fails in snd_pcm_hw_params().
Additional context
No response
Metadata
Metadata
Assignees
Labels
No labels
Activity
rafael2k commentedon Jan 2, 2024
Just adding - that in this state the wm8731 is totally unusable.
[-]Kernel error messages just on Pi 5 with Wolfson wm8731 audio codec[/-][+]Pi 5 with Wolfson wm8731 audio codec does not work (Pi 4 works!)[/+]rafael2k commentedon Jan 2, 2024
for the record, the config.txt:
Full dmesg:
rafael2k commentedon Jan 2, 2024
Also, the schematics of the radio (includes the wiring between the wm8731 and the Pi), just in case: https://github.com/afarhan/sbitx/blob/main/sbitx_v3_production.pdf
[-]Pi 5 with Wolfson wm8731 audio codec does not work (Pi 4 works!)[/-][+]Wolfson wm8731 audio codec in Pi 5 does not work (works with Pi 4!)[/+]rafael2k commentedon Jan 2, 2024
Also tested with kernel 6.6.8-v8+, same issue.
ASoC: dwc: Defer bclk_ratio handling to hw_params
ASoC: dwc: Defer bclk_ratio handling to hw_params
pelwell commentedon Jan 3, 2024
That soundcard driver is using unusual bclk_ratio values, apparently aiming to maintain a constant bclk frequency of 12MHz rather than scaling with the sample size and frequency. But reading the dwc_i2s bclk_ratio handling again and comparing it to that of other I2S blocks shows that:
#5819 should address both of those, and may solve the problem with your soundcard. Wait about 45 minutes for the build/checks to complete, then run
sudo rpi-update pulls/5819to install a trial kernel (usualy caveats apply).pelwell commentedon Jan 3, 2024
The build is ready now, if you'd like to give it a try.
rafael2k commentedon Jan 3, 2024
OK, testing now. Thanks @pelwell !!
rafael2k commentedon Jan 3, 2024
Roger that! Loud and clear!
All good, sound card working again. Thanks @pelwell !
pelwell commentedon Jan 3, 2024
Thanks. I should probably do some basic testing of a few other soundcards before merging...
rafael2k commentedon Jan 3, 2024
Cool! Do you close this one when you do these checks?
: )
pelwell commentedon Jan 3, 2024
Will do.
22 remaining items
ASoC: dwc: Defer bclk_ratio handling to hw_params
ASoC: dwc: Defer bclk_ratio handling to hw_params
ASoC: dwc: Defer bclk_ratio handling to hw_params
ASoC: dwc: Defer bclk_ratio handling to hw_params
ASoC: dwc: Defer bclk_ratio handling to hw_params
ASoC: dwc: Defer bclk_ratio handling to hw_params
ASoC: dwc: Defer bclk_ratio handling to hw_params
ASoC: dwc: Defer bclk_ratio handling to hw_params
ASoC: dwc: Defer bclk_ratio handling to hw_params
ASoC: dwc: Defer bclk_ratio handling to hw_params
ASoC: dwc: Defer bclk_ratio handling to hw_params
ASoC: dwc: Defer bclk_ratio handling to hw_params
ASoC: dwc: Defer bclk_ratio handling to hw_params
ASoC: dwc: Defer bclk_ratio handling to hw_params
ASoC: dwc: Defer bclk_ratio handling to hw_params