Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Mainline A10/A20 audio driver

Featured Replies

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

  • Author

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?

  • Author

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:

post-480-0-45557900-1446976225_thumb.png

 

Edit 2: Patches for sun4i-codec [file removed]

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 ?

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.

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.

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.

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

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.

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

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.