How to switch the default audio device

From Orange Pi
Jump to: navigation, search

the file(/etc/asound.conf ) controls the default audio device.
the default audio device is the hdmi in cubieboard2 image.
so if we want to switch the audio to the headphone, we may change the settings.
the original content of the file is:
1. pcm.!default {
2.     type hw
3.     card 1   
4.     device 0
5.   }
6.   ctl.!default {
7.     type hw
8.     card 1   
9.   }
if we modified the card vaule from 1 to 0, the audio device will change to headphone.
1. pcm.!default {
2.     type hw
3.     card 0    #If you want to set HDMI as output ,turn 0 to 1.
4.     device 0
5.   }
6.   ctl.!default {
7.     type hw
8.     card 0   #If you want to set HDMI as output ,turn 0 to 1.
9.   }

the setting will be work after you reboot the system.

of course, you can use the player such as smplayer to change the audio device.