Jump to content

Set default audio card


Recommended Posts

Hi, I'm trying use USB Audio card it's works fine in this cammand

 aplay -D hw:2,0 test.wav

hardware Orange pi one

version Armbian 5.11

root@orangepione:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: audiocodec [audiocodec], device 0: SUNXI-CODEC sndcodec-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: sndhdmi [sndhdmi], device 0: SUNXI-HDMIAUDIO sndhdmi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: Audio [USB Audio], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

use portaudio library and get this error 

root@orangepione:~/portaudio/bin# ./paex_sine
PortAudio Test: output sine wave. SR = 44100, BufSize = 64
Error: No default output device.
An error occured while using the portaudio stream
Error number: 0
Error message: Success

I try find solution create file ~/.asoundrc and edit it but no result

pcm.!default {
    type hw
    card 2
}


ctl.!default {
    type hw
    card 2
}

Thanks for any help

Link to comment
Share on other sites

Did you install libasound-dev as noted in official installation instructions here? You can check whether this package is installed with "dpkg -s libasound-dev libasound2-dev"

 

If it wasn't installed at the time of compilation, you have to install it and run compilation process again (including ./configure step).

Link to comment
Share on other sites

Did you install libasound-dev as noted in official installation instructions here? You can check whether this package is installed with "dpkg -s libasound-dev libasound2-dev"

 

If it wasn't installed at the time of compilation, you have to install it and run compilation process again (including ./configure step).

 

Thanks , I forgot do make clean.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines