LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   Alsa configuration on Raspberry Pi (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/alsa-configuration-on-raspberry-pi-4175601601/)

pabloparis 03-12-2017 09:21 AM

Alsa configuration on Raspberry Pi
 
Hello all,

On a new Jessie install, the system can see my soundcard but is unable to play any sound through it (a Presonus Audiobox USB).
It works fine on my laptop with Debian Jessie though, so I'm guessing there would be a way to make it work on Raspbian, wouldn't it ?

This my configuration and the content of .asoundrc
I tried many thing from documentations of alsa and looking at sample rate and hwparams but couldn't get it to work.

Thank you
Pablo


Code:

pi@raspberrypi:~ $ dmesg | grep Audio
[    3.955481] usb 1-1.5: Product: AudioBox USB
[    3.955494] usb 1-1.5: Manufacturer: PreSonus Audio

Code:

pi@raspberrypi:~ $ lsusb
Bus 001 Device 004: ID 194f:0302 PreSonus Audio Electronics, Inc.
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Code:

pi@raspberrypi:~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: USB [AudioBox USB], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Code:

pi@raspberrypi:~ $ cat /home/pi/.asoundrc
pcm.!default {
    type hw
    card 1
}

ctl.!default {
    type hw
    card 1
}

Code:

pi@raspberrypi:~ $ speaker-test

speaker-test 1.0.28

Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
Sample format not available for playback: Invalid argument
Setting of hwparams failed: Invalid argument


ferrari 03-13-2017 08:19 PM

Is PulseAudio in use? If so, what is reported by the following?
Code:

pactl list short sources
Code:

pactl list short sinks

pabloparis 03-17-2017 06:57 AM

Hello Ferrari and thank you for your answer,
I am not sure to understand completely what is pulseaudio. I have looked it up but I'm still confused. I would be interested in an explanation :)
These are the result for the 2 commands you asked me :
Code:

pactl list short sources
Connection failure: Connection refused
pa_context_connect() failed: Connection refused

Code:

pactl list short sinks
Connection failure: Connection refused
pa_context_connect() failed: Connection refused

Also, I'm sorry but I am new to LQ and first thought my thread didn't get posted since it didn't appear in my profile and the forum, even a couple of hours after posting, so I guessed I must have had posted it in the wrong section, and ended up double posting ... Here is the second thread where I also got an answer : turns out it was a .asoundrc syntax problem
http://www.linuxquestions.org/questi....php?p=5682936
Thank you for your help anyways

ferrari 03-17-2017 03:31 PM

I'll just refer you to the Debian PulseAudio Wiki. When installed it sits above the ALSA layer as a sound server.
Quote:

It's main purpose is to provide a high level interface for controlling how multiple "sources" (programs that want to play sounds) are connected to "sinks" (sound cards).


All times are GMT -5. The time now is 08:28 AM.