LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-11-2017, 01:01 PM   #1
pabloparis
LQ Newbie
 
Registered: Mar 2017
Posts: 6

Rep: Reputation: Disabled
Alsa configuration on Raspberry Pi (usb soundcard can't play sound)


Hello all,

On a new Jessie install on a Raspberry Pi, 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
 
Old 03-13-2017, 12:29 PM   #2
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Debian
Posts: 5,774

Rep: Reputation: 2133Reputation: 2133Reputation: 2133Reputation: 2133Reputation: 2133Reputation: 2133Reputation: 2133Reputation: 2133Reputation: 2133Reputation: 2133Reputation: 2133
I'm a bit lost with your .asoundrc syntax. When I created one for usb on Debian, mine read
defaults.pcm.card 1
defaults.pcm.device 0
defaults.ctl.card 1

Check that the usb module is installed, using
$ cat /proc/asound/modules

Check that the usb sound isn't blacklisted, as Debian has been known to do. Look in /etc/modprobe.d/ for something like alsa-base.conf and edit it, deleting the line
options snd-usb-audio index=-2
if it's there: it may even occur twice.
 
Old 03-17-2017, 06:57 AM   #3
pabloparis
LQ Newbie
 
Registered: Mar 2017
Posts: 6

Original Poster
Rep: Reputation: Disabled
Hello David, thank you for your answer.

I had found the .asoundrc syntax here : https://www.alsa-project.org/main/index.php/Asoundrc
However, your syntax solves the problem ! Do you know what was the issue with mine ?

$ cat /proc/asound/modules reports :
0 snd_bcm2835
1 snd_usb_audio

This is the content of modprobe.d/ :
blacklist-rtl8192cu.conf fbdev-blacklist.conf libpisock9.conf
blacklist-rtl8xxxu.conf ipv6.conf raspi-blacklist.conf

nothing there seems related to alsa.

Thanks a lot though, as this .asoundrc config solves my problem !
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Alsa configuration on Raspberry Pi pabloparis Linux - Embedded & Single-board computer 3 03-17-2017 03:31 PM
ALSA USB dmix help - hogs soundcard lingon Debian 6 05-06-2014 12:47 PM
[SOLVED] Alsa - problem with hotpluggable USB soundcard deu Linux - Hardware 1 05-13-2013 05:05 PM
Alsa detected my soundcard, but I can't find it in the sound setting. lzyawp Linux - Hardware 10 03-17-2013 04:13 PM
alsa to use usb soundcard efus Linux - Hardware 2 07-09-2007 06:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration