Jump to content

How to set default device in ALSA


bigheart

Recommended Posts

hello,

i am setting up Mopidy in Orange Pi PC2 with armbian.

but i found it only playback to the on-board sound card not the USB DAC i connected.

 

root@orangepipc2:/# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Codec [H3 Audio Codec], device 0: CDC PCM Codec-0 []
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 1: allwinnerhdmi [allwinner,hdmi], device 0: 1c22800.i2s-i2s-hifi i2s-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: Audio [iFi (by AMR) HD USB Audio], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
 

i found there is no asound.conf in /etc ...

 

i tried alsactl store 2, but Mopidy still playback in 0

 

in /etc/modprobe.d/ there is nothing related to sound card neither 

 

how can i set the default alsa device to card 2 ?

thanks!

Joseph

Link to comment
Share on other sites

3 hours ago, bigheart said:

card 2: Audio [iFi (by AMR) HD USB Audio], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
 

i found there is no asound.conf in /etc ...

 

how can i set the default alsa device to card 2 ?

 

put and save the follwing in /etc/asound.conf and reboot:
 

pcm.!default {
    type hw
    card 2
    device 1
}

ctl.!default {
    type hw
    card 2
}

after reboot check the volume-level with alsamixer...

Link to comment
Share on other sites

thanks!

the default now set to the USB DAC now, but i found Mopidy not play to it...... trying to figure out why ....

by the way, can i define card number of the USB DAC? as it will become 1 when plugged before boot, and 2 when it is plugged after the bootup.

thanks!

Joseph

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