LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 03-12-2017, 09:21 AM   #1
pabloparis
LQ Newbie
 
Registered: Mar 2017
Posts: 6

Rep: Reputation: Disabled
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
 
Old 03-13-2017, 08:19 PM   #2
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,807

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Is PulseAudio in use? If so, what is reported by the following?
Code:
pactl list short sources
Code:
pactl list short sinks
 
Old 03-17-2017, 06:57 AM   #3
pabloparis
LQ Newbie
 
Registered: Mar 2017
Posts: 6

Original Poster
Rep: Reputation: Disabled
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
 
Old 03-17-2017, 03:31 PM   #4
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,807

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
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).
 
  


Reply



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 (usb soundcard can't play sound) pabloparis Linux - Software 2 03-17-2017 06:57 AM
LXer: RecalboxOS – Raspberry Pi Gaming System Installation and Configuration LXer Syndicated Linux News 0 02-10-2017 06:51 PM
[SOLVED] Raspberry Pi3, Alsa, Slackarm.14.2 lambo69 Linux - Embedded & Single-board computer 1 09-11-2016 03:07 AM
ALSA on Raspberry Pi alandouglas Linux - Software 3 05-29-2015 01:27 PM
alsa configuration FirebirdV0273 Linux - Hardware 2 12-21-2003 08:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 07:22 PM.

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