pabloparis
Posts: 3
Joined: Wed Feb 22, 2017 3:19 pm

[SOLVED] alsa configuration

Wed Feb 22, 2017 3:29 pm

Hello,

I am trying to get my usb audio card to work with my raspberry, it is a Presonus Audiobox. I have tried a lot of different configuration but none could get it to make any sound. The soundcard is seen by the system though.
I have searched some forum and alsa documentation but couldn't find how to make it work.

The strange thing is that it works just fine and is basically plug and play on my laptop with debian.

This is what the raspberry returns for aplay -l :

Code: Select all

card 1: USB [AudioBox USB], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
and the content of my .asoundrc :

Code: Select all

pcm.!default {
        type hw
        card 1
}

ctl.!default {
        type hw
        card 1
}
Do you have any idea how to configure it ? I can provide any other information if needed.

Thank you for your time !

Pablo
Last edited by pabloparis on Fri Mar 17, 2017 12:15 pm, edited 1 time in total.

pabloparis
Posts: 3
Joined: Wed Feb 22, 2017 3:19 pm

Re: alsa configuration

Sat Mar 11, 2017 6:33 pm

Hello all,

I still couldn't find a way to get the sound card to work.
There should be a way to make it work though since it works fine on my laptop with debian, shoudn't there be ?

I spent a lot of time trying some things I found on documentations, but nothing worked it out (also on the sample rate and hwparams - parameters which are reported to be a problem)

Here is more detail about my configuration (tried on a fresh install of raspbian) :
The card is seen by the system and I configured .asoundrc but playback is not working as it should.

Code: Select all

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

Code: Select all

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: Select all

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: Select all

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

ctl.!default {
    type hw
    card 1
}

Code: Select all

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

pabloparis
Posts: 3
Joined: Wed Feb 22, 2017 3:19 pm

Re: alsa configuration

Fri Mar 17, 2017 12:05 pm

Found a solution.

It turns out this syntax of .asoundrc was the problem (even though it came from alsa documentation : https://www.alsa-project.org/main/index.php/Asoundrc)

I tried this and it worked :

defaults.pcm.card 1
defaults.pcm.device 0
defaults.ctl.card 1

If anyone has a clue chy tis was so, I owuld be interested !

ABPosauner
Posts: 1
Joined: Mon Nov 06, 2017 2:44 am

Re: [SOLVED] alsa configuration

Tue Nov 07, 2017 4:09 am

I'm a total noob with linux and the raspberry pi. Can you tell me all the steps to get the Audiobox USB running? I have one powering some Yamaha monitors that I used with my old computer. I don't need to record with it, just play all the audio from the Rpi. I'm running the most up to date (I hope) version of Raspbian (I think).

Return to “Troubleshooting”