-
Notifications
You must be signed in to change notification settings - Fork 315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial WM8960 Support #2126
base: buster/dev
Are you sure you want to change the base?
Initial WM8960 Support #2126
Conversation
@@ -56,7 +56,8 @@ | |||
{"id":"st400-dac-amp","name":"ST400 Dac (PCM5122) - Amp","overlay":"iqaudio-dacplus","alsanum":"2","mixer":"Digital","modules":"","script":"","needsreboot":"yes"}, | |||
{"id":"taudac","name":"TauDAC - DM101","overlay":"taudac","alsanum":"2","mixer":"","modules":"","script":"","eeprom_name":"TauDAC-DM101","needsreboot":"yes"}, | |||
{"id":"terraberry-dac2","name":"Terra-Berry DAC 2/3","overlay":"i-sabre-q2m","alsanum":"2","alsacard":"DAC","mixer":"","modules":"","script":"","needsreboot":"yes"}, | |||
{"id":"es90x8q2m-dac","name":"Volumio ESS 9028QM","overlay":"es90x8q2m-dac","alsanum":"2","mixer":"Digital","modules":"","script":"","i2c_address":"48","needsreboot":"no"} | |||
{"id":"es90x8q2m-dac","name":"Volumio ESS 9028QM","overlay":"es90x8q2m-dac","alsanum":"2","mixer":"Digital","modules":"","script":"","i2c_address":"48","needsreboot":"no"}, | |||
{"id":"wm8960-soundcard","name":"Waveshare - WM8960","overlay":"wm8960-soundcard,i2s-mmap","alsanum":"1","alsacard":"wm8960soundcard","mixer":"Playback","modules":["i2c-dev","snd-soc-wm8960","snd-soc-wm8960-soundcard"],"script":"","i2c_address":"1a","needsreboot":"yes"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alsanum
varies across different SBC (1 on pi zero, 2 on pi 3B+/4). I think it is used for collecting amixer
from console, but amixer
can also take alsacard
as an argument, e.g.:
volumio@voluzero:~$ amixer -c wm8960soundcard
Simple mixer control 'Headphone',0
Capabilities: pvolume
Playback channels: Front Left - Front Right
Limits: Playback 0 - 127
Mono:
Front Left: Playback 109 [86%] [-12.00dB]
Front Right: Playback 109 [86%] [-12.00dB]
...
I believe we could deprecate alsanum
field?
Small request for clarity down the line - could you move your changes to Out of curiosity, why does this DAC require both modules and the overlay? The device tree should technically load the modules right? |
Well... Yes and no. I reached this thread and checked the default kernel configuration. Turns out CONFIG_SND_SOC_WM8960 is not set by default and I believe the majority of Volumio users wouldn't bother (or don't know how) to build their own kernel for the device. |
Correct, but that is to compile the kernel module, which thanks to your other PR in the build repo will bake the required modules into the image. The overlay normally should then be able to pick the compiled modules up, without having to additionally manually load them right? |
Just confirmed simply loading the overlay will also pull in the related kernel module, which is
This kernel option is kinda likely being overlooked, because
|
Great work, sorry if my comments have led you down the rabbit hole ;-) Ideally, option 3 would be best, as Until it's fixed upstream, we could use the modules that you have built. I would really like to avoid custom kernels for the pi, will be less maintenance effort, we (well @gkkpch) already has multiple platforms that use special kernels. |
I poked around and was trying to figure out the "no sound" problem on my board while waiting reposes from the issue filed upstream. Turns out in addition to kernel modules (which the two PRs mentioned above have it implemented properly), wm8960_asound.state from official repo has to be applied with a refresh ( I've figured out the actual config that mutes both output channels by default, and worked out a new commit to unmute those channels in the init script. |
0f19e97
to
7ba6a57
Compare
Finally this works OOB after initial setup wizard + reboot [EDIT] Kernel v5.4.y received this patch. At this moment I made an automated build/package script to deploy kernel modules across multiple platforms to work with another PR. |
@hftsai256 Don't have hardware to test this -- but it looks good to me! |
Added message to get audio outputs from foreign devices.
Get, install and publish plugins for buster
Buster plugins
Plugin publish script hardening
API Url update
Plugins test mode
Prevent beta listings and downloads
Initial Waveshare WM8960 Audio HAT support. Requires a separated archive:
/lib/modules/5.4.83+/kernel/sound/soc/codecs/snd-soc-wm8960.ko
/lib/modules/5.4.83+/kernel/sound/soc/bcm/snd-soc-wm8960-soundcard.ko
/boot/overlays/wm8960-soundcard.dtbo
Can those kernel modules be built under qemu-static environment?