zador.blood.stained Posted November 4, 2015 Posted November 4, 2015 Looks like A10/A20 audio codec support got merged to linux-next tree. Igor, can you please add these patches? I'll try to find all related bits. There are too many commits to link them one by one. Here is merge commit, it's easier to remove not needed bcm2835 and sun6i stuff from it. https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/commit?id=2030deefd5bfb68317732d8f64c69c7cb5169e9d
Igor Posted November 7, 2015 Posted November 7, 2015 I adjusted and compiled the kernel but haven't got time for test yet. I hope I haven't remove too much https://github.com/igorpecovnik/lib/blob/second/patch/kernel/allwinner-audio-4.x.patch First try: http://mirror.igorpecovnik.com/test/linux-image-next-sunxi_4.6_armhf-1.deb http://mirror.igorpecovnik.com/test/linux-dtb-next-sunxi_4.6_armhf-1.deb
zador.blood.stained Posted November 7, 2015 Author Posted November 7, 2015 Thanks. Looks like driver itself (sun4i-codec) was merged separately. https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/sound/soc/sunxi Posted kernel itself, of course, works, but without includes I won't be able to quickly compile and test this module and without required CONFIG_SND_SOC* options especially Edit: compiled 4.3 with all these patches, looks like it's not ready yet [ 8.380136] sun4i-codec 1c22c00.codec: Missing dma channel for stream: 0 [ 8.380164] sun4i-codec 1c22c00.codec: ASoC: pcm constructor failed: -22 [ 8.380176] sun4i-codec 1c22c00.codec: ASoC: can't create pcm CDC PCM :-22 [ 8.380186] sun4i-codec 1c22c00.codec: ASoC: failed to instantiate card -22 [ 8.380423] sun4i-codec 1c22c00.codec: Failed to register our card [ 8.380519] sun4i-codec: probe of 1c22c00.codec failed with error -22 Edit 2: Of course DMA engine is not enabled by default... really, who needs to make CONFIG_SND_SUN4I_CODEC depend on CONFIG_DMA_SUN4I if you can just spend another 2 hours recompiling kernel?
zador.blood.stained Posted November 8, 2015 Author Posted November 8, 2015 Okay. Kernel 4.3 + allwinner-audio-4.x patch + 6 patches related to sun4i-codec + enabling CONFIG_DMA_SUN4I (and of course enabling CONFIG_SND_SUN4I_CODEC) in kernel config + understanding new weird mixer controls = onboard sound works. ➜ ~ % dmesg | grep sun4i-codec [ 8.566444] sun4i-codec 1c22c00.codec: Codec <-> 1c22c00.codec mapping ok ➜ ~ % aplay -l **** List of PLAYBACK Hardware Devices **** card 0: sun4icodec [sun4i-codec], device 0: CDC PCM Codec-0 [] Subdevices: 0/1 Subdevice #0: subdevice #0 Edit: for reference, proper mixer config looks like this right now: Edit 2: Patches for sun4i-codec [file removed] 2
h-yamamo Posted November 22, 2015 Posted November 22, 2015 Hello,I wrote an alternative "sun4i-codec.c" supported capture and so on.Please tryhttps://gist.github.com/h-yamamo/72ef520058b7971ff02d Thank you,Hiroyuki
martijn Posted December 9, 2015 Posted December 9, 2015 Sorry for hijacking this topic, i'v been trying to get i2s working on the mainline kernel. Tried the kernel that Igor supplied in this topic but it stil doesnt work. What would be the best way to apply the patches that zador.blood.stained supplied ?
zador.blood.stained Posted December 9, 2015 Author Posted December 9, 2015 These patches add support only for analog audio output (BTW, they are already merged into 4.4-rc4 kernel tree). I2S driver is still WiP, you can find link to it here: https://linux-sunxi.org/Linux_mainlining_effort
Bernie_O Posted December 27, 2015 Posted December 27, 2015 Hi, I'd quite like to switch from legacy to mainline due to various improvements I read about. I need adio-output via the 3,5mm-audio-jack though. Do I understand this thread correctly that audio will work with Mainline-Kernel 4.4 (once it is released) on Banana-Pi 3,5mm-audio-jack? Cheers, Bernie_O.
zador.blood.stained Posted December 27, 2015 Author Posted December 27, 2015 It should work on kernel 4.4 with this patch (which is planned for 4.5). 2
Bernie_O Posted December 27, 2015 Posted December 27, 2015 Thank you very much for clarifying this for me. I will wait for an Armbian-release with Kernel 4.5 for my switch to mainline-kernel then. Cheers, Bernie_O.
Bernie_O Posted July 21, 2016 Posted July 21, 2016 Hi, meantime I switched to mainline kernel (4.6.3) and audio output via 3,5mm jack works. However: when I stop playing music, there is quite some noise coming out of the speakers which is not the case with legacy kernel. Muting the devices and turning volume to zero (like the default-setting right after armbian-installation) doesn't help. Is this a known issue? Cheers, Bernie_O.
Bernie_O Posted August 12, 2016 Posted August 12, 2016 I found a solution: There seems to be a voltage difference between ground on AV jack and actual ground on Banana Pro which is responsible for that noise: http://forum.lemaker.org/forum.php?mod=viewthread&tid=23054&page=1#pid91781 My device is a Banana Pi, but I suspected that there is a similar voltage difference. By connecting a cable from ground pin on AV jack and GPIO-ground (PIN 9) the noise is gone :-) Cheers, Bernie_O 1
Fourdee Posted January 28, 2017 Posted January 28, 2017 Hi, Apologies for bringing up an old topic. Has anyone been successful obtaining a working HDMI audio output with BPi Pro + Mainline 4.9? I tried various mixer settings, 3.5mm works fine, but not HDMI.Thanks.
zador.blood.stained Posted January 28, 2017 Author Posted January 28, 2017 @Fourdee HDMI audio is not supported on any of the SoCs in mainline Linux. It pre-depends on HDMI DRM driver, which is not done yet (please note that status matrix does not separate LCD DRM from HDMI DRM, and LCD DRM in slowly being implemented on some platforms): https://linux-sunxi.org/Linux_mainlining_effort#Status_Matrix
Fourdee Posted January 28, 2017 Posted January 28, 2017 @zador.blood.stainedThank you for the info, much appreciated!
Bernie_O Posted May 30, 2017 Posted May 30, 2017 On 12.8.2016 at 6:20 PM, Bernie_O said: I found a solution: There seems to be a voltage difference between ground on AV jack and actual ground on Banana Pro which is responsible for that noise: http://forum.lemaker.org/forum.php?mod=viewthread&tid=23054&page=1#pid91781 My device is a Banana Pi, but I suspected that there is a similar voltage difference. By connecting a cable from ground pin on AV jack and GPIO-ground (PIN 9) the noise is gone :-) Cheers, Bernie_O Just for the record: the noise is actually a result of the mainline kernel powering down the audio subsystem when not in use. Disabling this as described in the below quoted post works also with my Banana Pi. With using a cable (as described above) the noise is gone, but still there is quite a loud "plop" when the audio-subsystem changes its power-state. Disabling the powering down of the audio subsystem removes also the "plop" - so I removed my cable.... and the "plop" :-) Cheers, Bernie_O 1
Szitányi András Posted March 30, 2018 Posted March 30, 2018 Hi, "audio subsystem removes" Would I be interested in turning this off?
Recommended Posts