LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - ARM (https://www.linuxquestions.org/questions/slackware-arm-108/)
-   -   A20 Allwinner/Banana PI sound not working on ARM-current out of the box on kernel 4.8.1 and 4.8.4 (https://www.linuxquestions.org/questions/slackware-arm-108/a20-allwinner-banana-pi-sound-not-working-on-arm-current-out-of-the-box-on-kernel-4-8-1-and-4-8-4-a-4175592650/)

SCerovec 11-01-2016 09:22 AM

A20 Allwinner/Banana PI sound not working on ARM-current out of the box on kernel 4.8.1 and 4.8.4
 
Code:

modprobe -av sun4i-codec
is failing silently.

microphone registers on XFCE pulseaudio mixer (shows level of ambient sounds)

any comand using sound "hangs" and won't "run" untill
Code:

kill -9 {PID}
I will report back :)

SCerovec 11-01-2016 12:24 PM

Okay,
i've tried many things so far.
but got it working somehow ???
file:/etc/asound.conf,
Code:

# ALSA system-wide config file
# By default, redirect to PulseAudio:

 pcm.default pulse
 ctl.default pulse

    pcm.!default {
        type hw
        card 0
        device 0
    }
    ctl.!default {
        type hw
        card 0
    }

and chmod +x to rc.pluseaudio and rc.alsa

I need reboot yet and check what's needed and what not...

SCerovec 11-01-2016 12:38 PM

gave few edits to the /etc/asound.conf file:
Code:

# ALSA system-wide config file
# By default, redirect to PulseAudio:

    pcm.!default {
      type hw
      card 1  #If you want to set HDMI as output ,turn 0 to 1.
      device 0
    }
    ctl.!default {
      type hw
      card 1  #If you want to set HDMI as output ,turn 0 to 1.
    }

    pcm.pulse {
      type pulse
    }

    ctl.pulse {
      type pulse
    }

public code from lemaker forum

and it beeps:
Code:

play /usr/share/orage/sounds/KDE_Beep_Digital_1.ogg
works

case closed :D

thecarpy 11-01-2016 01:11 PM

Thanks for the info, I was looking for just this ... great thread, the guy asks question, works out solution and posts the lot.

+1

SCerovec 11-03-2016 04:24 AM

Update:
only alsa needs be executable, pulseaudio manages somehow without?

@thecarpy
Glad it helps, was my aim tho.:hattip:

Did it work out for You?

glorsplitz 02-23-2019 04:19 PM

trying this with bananapi pro
 
SCerovec, trying to follow your foot steps with banana pi pro, not able to get sound.

Code:

ls -al /etc/rc.d/rc.alsa
-rwxr-xr-x 1 root root 2556 Jan  9 10:09 /etc/rc.d/rc.alsa*
aaksr@slackbpp:~$ ls -al /etc/rc.d/rc.pulseaudio
-rw-r--r-- 1 root root 1171 Jan  7  2016 /etc/rc.d/rc.pulseaudio

Code:

groups
users lp floppy audio video cdrom input plugdev power netdev scanner

Code:

lsmod | grep sun4i
sun4i_codec            32768  3
snd_soc_core          139264  1 sun4i_codec
snd_pcm                77824  3 sun4i_codec,snd_pcm_dmaengine,snd_soc_core
sun4i_gpadc            16384  0
sun4i_ss              28672  0
des_generic            28672  1 sun4i_ss
spi_sun4i              16384  0
sun4i_dma              20480  2
phy_sun4i_usb          20480  4

Code:

lsmod | grep snd
snd_soc_core          139264  1 sun4i_codec
snd_compress          20480  1 snd_soc_core
ac97_bus              16384  1 snd_soc_core
snd_pcm_dmaengine      16384  1 snd_soc_core
snd_pcm                77824  3 sun4i_codec,snd_pcm_dmaengine,snd_soc_core
snd_timer              28672  1 snd_pcm
snd                    57344  4 snd_compress,snd_timer,snd_soc_core,snd_pcm
soundcore              16384  1 snd

want sound out of jack
Code:

cat /etc/asound.conf
# ALSA system-wide config file
# By default, redirect to PulseAudio:

    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.
    }

    pcm.pulse {
      type pulse
    }

    ctl.pulse {
      type pulse
    }

Code:

aplay --list-pcms
null
    Discard all samples (playback) or generate zero samples (capture)
pulse
    PulseAudio Sound Server
sysdefault:CARD=sun4icodec
    sun4i-codec,
    Default Audio Device
usbstream:CARD=sun4icodec
    sun4i-codec
    USB Stream Output

Code:

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

alsamixer, Power Amplifier is all the way up

Code:

aplay /usr/share/orage/sounds/Phone.wav
Playing WAVE '/usr/share/orage/sounds/Phone.wav' : Signed 16 bit Little Endian, Rate 11025 Hz, Mono
aplay: pcm_write:2053: write error: Input/output error

Any other info I could provide?


All times are GMT -5. The time now is 05:53 AM.