Jump to content

Pine64+ A64 Kernel 5.9.x analog sound problem


Go to solution Solved by Levent Erenler,

Recommended Posts

Posted
Armbianmonitor:

Hi, I try to enable sound on headphone jack with pine64+ but i could not :) Alsa says "no sound found" at dmesg Could anyone help me?  Thank you

 

root@pine64:~# dmesg|grep -i sound
[    2.686397]   No soundcards found.
[    6.323086] input: sun50i-a64-audio Headset Jack as /devices/platform/sound/sound/card0/input5

 

root@pine64:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sun50ia64audio [sun50i-a64-audio], device 0: 1c22c00.dai-sun8i-codec-aif1 sun8i-codec-aif1-0 [1c22c00.dai-sun8i-codec-aif1 sun8i-codec-aif1-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: sun50ia64hdmi [sun50i-a64-hdmi], device 0: 1c22800.i2s-i2s-hifi i2s-hifi-0 [1c22800.i2s-i2s-hifi i2s-hifi-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
 

Alsamixer Settings;

mixer_settings.thumb.jpg.e0caa38d2561439def35d96b85a5301b.jpg

Posted
On 11/6/2020 at 12:45 AM, Levent Erenler said:
Alsamixer Settings;

@Levent Erenler

please unmute your muted (MM) Headphone.
Select Headphone and press M to unmute (00 in green) your Headphone-Connector in the alsamixer to get analog-audio ;)

BTW: the dmesg-message isnt right but aplay does show you the soundcard correct :) 

The same here:
 

root@npi-a64-116(192.168.6.116):~# dmesg|grep -i sound
[    1.163817] Advanced Linux Sound Architecture Driver Initialized.
[    2.863443]   No soundcards found.

unmute_headphone.jpg.328f1a55a6dd328035efbb596ea7e5cc.jpg

Posted

@Levent Erenler did you try to adress card 0 ( sun50ia64audio [sun50i-a64-audio] ) directly?

Internet-Radio-stream:
mpg123 -v -b 1024 -a hw:0,0 -@ http://norawebstreams-stream22.radiohost.de/nora-80er_mp3-192

or use a /etc/asound.conf:

root@npi-a64-116(192.168.6.116):~# more /etc/asound.conf
pcm.!default {
    type hw
    card 0
    device 0
}

ctl.!default {
    type hw
    card 0
}

 

Posted

yes exactly, now it works with custom dts. I write a test dts depending your dts file and it worked. Now  i am trying to find why it is now working with original dts than i will create a patch to share with others. Thanks for your effort.

 

  • Solution
Posted

Platform Kernel 5.9.5 Pine64+ A64 buster server

Analog sound working ! After a few days, i figure out the analog sound problem. There is a widget property in sound definition at sun50i-a64-pine64.dts file.  This mainly specifies audio off-codec DAPM widgets (Dynamic Audio Power Management for Portable Devices according to devicetree/bindings/sound/widgets.txt) In my case this widgets disable analog sound and i couldnt find a way to enable it :) I remove widget line and linked routing properties from dts file and rebuild it and it works. If you dont want to rebuild armbian alternate way is using a custom overlay.  Dont forget to unmute HeadPhone with "m" key and increase AIF1 DA0. I hope it will help to someone.  Unfortunately i could not enable microphone input, any ideas?? Thanks

sound_overlay.dts

Posted

Update: Analog sound + mic working

 

I attached overlay for microphone and headphone. Tested with Pine64+ A64 Kernel 5.9.5 and working. You have to add overlay and set alsa configuration. Settings are just for template, you could modify to find best. Thank you. 

amixer cset name='Headphone Playback Switch' on
amixer cset name='Headphone Source Playback Route' DAC
amixer cset name='Line In Playback Switch' off
amixer cset name='Line Out Playback Switch' off
amixer cset name='Line Out Source Playback Route' Mono Differential
amixer cset name='Mic1 Playback Switch' off
amixer cset name='Mic2 Playback Switch' off
amixer cset name='AIF1 DA0 Playback Volume' 160
amixer cset name='AIF1 DA0 Stereo Playback Route' Stereo
amixer cset name='AIF2 DAC Playback Volume' 160
amixer cset name='AIF3 ADC Source Capture Route' None
amixer cset name='AIF2 DAC Source Playback Route' None
amixer cset name='DAC Playback Switch' on
amixer cset name='DAC Playback Volume' 160
amixer cset name='ADC Digital DAC Playback Switch' off
amixer cset name='AIF1 Slot 0 Digital DAC Playback Switch' on
amixer cset name='AIF2 Digital DAC Playback Switch' on
amixer cset name='DAC Reversed Playback Switch' off
amixer cset name='Earpiece Playback Switch' off
amixer cset name='Earpiece Source Playback Route' DACL

amixer cset name='Line In Capture Switch' off
amixer cset name='Mic1 Capture Switch' off
amixer cset name='Mic1 Boost Volume' 0
amixer cset name='Mic1 Playback Volume' 7
amixer cset name='Mic2 Capture Switch' on
amixer cset name='Mic2 Boost Volume' 0
amixer cset name='Mic2 Playback Volume' 7
amixer cset name='Mixer Capture Switch' off
amixer cset name='Mixer Reversed Capture Switch' off
amixer cset name='ADC Capture Volume' 160
amixer cset name='ADC Gain Capture Volume' 7
amixer cset name='AIF1 AD0 Capture Volume' 160
amixer cset name='AIF1 Data Digital ADC Capture Switch' on
amixer cset name='AIF2 ADC Capture Volume' 160
amixer cset name='AIF2 ADC Mixer ADC Capture Switch' on
amixer cset name='AIF2 ADC Mixer AIF1 DA0 Capture Switch' off
amixer cset name='AIF2 ADC Mixer AIF2 DAC Rev Capture Switch' off
amixer cset name='AIF2 ADC Mixer AIF1 DA0 Capture Switch' off
amixer cset name='AIF2 ADC Mixer AIF1 DA0 Capture Switch' off

 

you could test speaker with:

speaker-test -twav -c2

 

you could test microphone with;

arecord -f S16_LE -d 5 -r 16000 -c 2 test.wav 

aplay test.wav

sound_overlay.dts

Posted

Hello,


I would also like to run on a Pine64 (Armbian 22.11.4 Bullseye with Linux 5.15.80-sunxi64)
put the analogue microphone input into operation.

 

Unfortunately I haven't succeeded so far. Could you explain the solution step again here?

Thank you and
greeting

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines