logicite Posted November 1, 2016 Posted November 1, 2016 Hello everyone, This is my first post, but i've been using armbian for almost one year (https://twitter.com/logicite/status/682267764384501760), so : thank you for your work ! I use armbian ubuntu on Olimex A20 lime 2, and on LeMaker Banana Pro. So far no difficulty, or i was able to find the answers on the forum. This time, i can't find anything, so i'm asking for your help : A few months ago i was able to use the onboard sound card on the BananaPro. It was showing up in alsamixer and in aplay -l. The sound was not good so i used a USB sound card instead. Today, i can't find this onboard sound card any longer. I suspect this is due to some update in between, as i cannot find it on any of the 3 BananaPro i've got at home... According to http://forum.armbian.com/index.php/topic/688-no-sound-card-on-50-trusty-vanilla-but-it-works-on-jessie/#entry5012, i tried : modprobe sun4i-codec but the sound card doesn't show up... I tried to add it in /etc/modules, but no change. According to http://wiki.lemaker.org/BananaPro/Pi:Audio, i tried to create /etc/asound.conf : pcm.!default { type hw card 0 //If you want to set HDMI as output ,turn 0 to 1. device 0 } ctl.!default { type hw card 0 //If you want to set HDMI as output ,turn 0 to 1. } but no change either... According to https://github.com/LeMaker/sunxi-boards/commit/c8be2f0b32fa0e41dc4b46fb384479bebb68ca6e, i tried to change /boot/script.bin : -audio_pa_ctrl = port:PH15<1><default><default><1> +audio_pa_ctrl = port:PH26<1><default><default><1> but it didn't change anything (again). I though i would revert this one, when i found http://forum.armbian.com/index.php/topic/452-no-audio-on-35-jack-with-bananapi-m1-and-debian-jessie/#entry2912: looks like PH15 is somehow connected to wireless module power and i don't see the link with sound card. Anyway, the board is still ok (and the wifi also :-), so it doesn't matter here. Well, i don't know what to do now : this on board sound card on the Banana Pro was working, and it is no longer. Do you have any leads for me please ? Thank you My config : dpkg -l | grep armbian : ii armbian-firmware 5.22 armhf Linux firmware ii armbian-hostapd-xenial 5.14 armhf Patched hostapd for xenial ii armbian-tools-xenial 5.22 armhf Armbian tools, temper, Cubie bt utils (below there is USB sound card, that don't want to use any more) : $ cat /proc/asound/cards 1 [S2 ]: USB-Audio - Sound Blaster Play! 2 Creative Technology Ltd Sound Blaster Play! 2 at usb-1c14400.usb-1, full speed $ cat /proc/asound/devices 32: [ 1] : control 33: : timer 48: [ 1- 0]: digital audio playback 56: [ 1- 0]: digital audio capture $ cat /proc/asound/version Advanced Linux Sound Architecture Driver Version k4.8.4-sunxi.k $ lsmod Module Size Used by dm_crypt 18660 1 algif_skcipher 9052 0 af_alg 5792 1 algif_skcipher dm_mod 98924 3 dm_crypt ir_lirc_codec 5048 0 lirc_dev 7589 1 ir_lirc_codec snd_usb_audio 120024 0 nvmem_sunxi_sid 2159 0 nvmem_core 9078 1 nvmem_sunxi_sid snd_hwdep 5663 1 snd_usb_audio sun4i_ts 3990 0 snd_usbmidi_lib 19867 1 snd_usb_audio snd_rawmidi 17995 1 snd_usbmidi_lib evdev 12164 1 input_leds 2676 0 sunxi_cir 3735 0 snd_pcm 77587 1 snd_usb_audio snd_timer 19698 1 snd_pcm snd 47943 6 snd_hwdep,snd_usb_audio,snd_timer,snd_rawmidi,snd_usbmidi_lib,snd_pcm soundcore 922 1 snd sun4i_ss 16066 0 cpufreq_dt 3432 0 thermal_sys 59134 2 sun4i_ts,cpufreq_dt uio_pdrv_genirq 3164 0 uio 8000 1 uio_pdrv_genirq bonding 105334 0 brcmfmac 186006 0 brcmutil 5661 1 brcmfmac cfg80211 434524 1 brcmfmac rfkill 10687 3 cfg80211 realtek 2775 0
logicite Posted November 4, 2016 Author Posted November 4, 2016 Hi again, After some investigation, this is what i am currently trying : dtc -I dtb -O dts /boot/dtb/sun7i-a20-bananapro.dtb -o /tmp/anyfile.dts I have looked for any entry with "sound" and found this one : codec@01c22c00 { #sound-dai-cells = <0x0>; compatible = "allwinner,sun7i-a20-codec"; reg = <0x1c22c00 0x40>; interrupts = <0x0 0x1e 0x4>; clocks = <0x38 0x0 0x3f>; clock-names = "apb", "codec"; dmas = <0x1f 0x0 0x13 0x1f 0x0 0x13>; dma-names = "rx", "tx"; status = "disabled"; linux,phandle = <0x9b>; phandle = <0x9b>; }; I change "disabled" to "okay", and now aplay is showing the onboard sound card : $ aplay -l **** List of PLAYBACK Hardware Devices **** card 0: sun4icodec [sun4i-codec], device 0: CDC PCM Codec-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: S2 [Sound Blaster Play! 2], device 0: USB Audio [USB Audio] Subdevices: 1/1 Subdevice #0: subdevice #0 It's too late for me to try the sound with a headset but i will do it tomorrow and tell you if it really works. In any case, i am not sure to understand exactly what is happening; it's only that i read the Device Tree was to be used now. If anyone can explain.... :-) Thank you again.
logicite Posted November 6, 2016 Author Posted November 6, 2016 Good morning, With the try above, sound was not working : the bananapro sound card was visible, but not usable (speaker-test and cie)... Here's what i have done after that. It happens that i have a few previous versions of Armbian for this board. I installed them, and the sound is working each time on the onboard card ! Good news I copy-paste below the content of the "sound" section of sun7i-a20-bananapro.dtb each time : Armbian_5.14_Bananapipro_Ubuntu_xenial_4.6.2 : codec@01c22c00 { #sound-dai-cells = <0x0>; compatible = "allwinner,sun7i-a20-codec"; reg = <0x1c22c00 0x40>; interrupts = <0x0 0x1e 0x4>; clocks = <0x31 0x0 0x35>; clock-names = "apb", "codec"; dmas = <0x18 0x0 0x13 0x18 0x0 0x13>; dma-names = "rx", "tx"; status = "okay"; }; Armbian_5.20_Bananapipro_Ubuntu_xenial_4.7.3 : codec@01c22c00 { #sound-dai-cells = <0x0>; compatible = "allwinner,sun7i-a20-codec"; reg = <0x1c22c00 0x40>; interrupts = <0x0 0x1e 0x4>; clocks = <0x34 0x0 0x39>; clock-names = "apb", "codec"; dmas = <0x1b 0x0 0x13 0x1b 0x0 0x13>; dma-names = "rx", "tx"; status = "okay"; linux,phandle = <0x8c>; phandle = <0x8c>; }; Then i ran the whole update process (60+ packages, including headers files...), to go to : $ uname -a Linux mozart 4.8.4-sunxi #6 SMP Sun Oct 23 15:55:47 CEST 2016 armv7l armv7l armv7l GNU/Linux And i'm back at the beginning : no sound card showing in aplay -l. Plus the entry codec@01c22c00 in the Device Tree is as the first one above. My thoughs : I know already that writing "okay" instead of "disabled" is not enough I have the feeling the other values for this entry are important. I was willing to copy-paste the ones from the previous versions of Armbian, but they are not the same in each version (see above) I am not even sure that what i am looking at (codec@01c22c00 section in DT) is even relevant Why is it "disabled" in armbian now ? What are the correct values ? Anyone with the good expertise that could lighten me ??? Thank you to you
zador.blood.stained Posted November 6, 2016 Posted November 6, 2016 Why is it "disabled" in armbian now ? What are the correct values ? Anyone with the good expertise that could lighten me ??? Banana Pi Pro DT file doesn't have audio codec enabled, so it had to be patched manually. Unfortunately the patch fell out after switching to another DT file. This should be fixed in new release. 1
logicite Posted November 6, 2016 Author Posted November 6, 2016 Okay, that is good news : there will be sound again ! I will be waiting because i am not skilled enough to do it myself : i have tried current version with DT values from the old ones... and it simply don't work (with messages in dmesg like "could not get clock /soc...."). I guess you guys understand what is happening (and this is my luck of course : you know what you're doing ). At least i tried something. If you need some testing sometime on a BananaPro, just tell me... Thank you
logicite Posted February 2, 2017 Author Posted February 2, 2017 Hello everyone, I just updated to 5.25 and the sound is working on the jack connector. So i thought i should drop by on the forum to share 2 things : your last update was successfull (and useful) thank you to you for the job
Recommended Posts