You are not logged in.

#1 2017-09-30 15:00:39

djrollins
Member
From: Leeds, UK
Registered: 2016-07-11
Posts: 6
Website

ALSA: help setting default sound device to surround51

Hi all,

I've got a USB 5.1 surround headset that I am trying to use with ALSA, displayed in the terminal output below as Sirus Headset.

$ aplay -l            
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Generic [HD-Audio Generic], device 0: ALC892 Analog [ALC892 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: Headset [Sirus Headset], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

I set as the default device in /etc/alsa.conf like so:

$ cat /etc/asound.conf     
pcm.headset { type hw; card Headset }
ctl.headset { type hw; card Headset }

pcm.!default pcm.headset
ctl.!default ctl.headset

With this set, aplay ouputs the sound to the headset. Unfortunately the audio sounds incredibly robotic and unpleasant. It isn't working as intended.

It can be seen with aplay -L that there are a number of configurations for the headset. Some of the surroundXX configs work correctly, however rest do not, see my #comments in the output below.

$ aplay -L | grep Headset
sysdefault:CARD=Headset         # robotic
    Sirus Headset, USB Audio
front:CARD=Headset,DEV=0        #robotic
    Sirus Headset, USB Audio
surround21:CARD=Headset,DEV=0   # works
    Sirus Headset, USB Audio
surround40:CARD=Headset,DEV=0   # robotic
    Sirus Headset, USB Audio
surround41:CARD=Headset,DEV=0   # works
    Sirus Headset, USB Audio
surround50:CARD=Headset,DEV=0   # works
    Sirus Headset, USB Audio
surround51:CARD=Headset,DEV=0   # works
    Sirus Headset, USB Audio
surround71:CARD=Headset,DEV=0   # works
    Sirus Headset, USB Audio
iec958:CARD=Headset,DEV=0       # robotic
    Sirus Headset, USB Audio

$ aplay -D surround51:CARD=Headset piano2.wav 
Playing WAVE 'piano2.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo

Please could someone explain to me how I can get alsa to use one of the working configs above (surround51 seems most sensible as that is the actual config of my headset) in my /etc/alsa.conf.

Many thanks,

Daniel

Last edited by djrollins (2017-09-30 15:01:51)

Offline

#2 2017-10-07 14:54:45

djrollins
Member
From: Leeds, UK
Registered: 2016-07-11
Posts: 6
Website

Re: ALSA: help setting default sound device to surround51

Ok, so I tried setting the channels to 6 in the PCM device and got errors in aplay about an invalid argument.

After a bit of searching I tried creating a 'plug' pcm device with the headset as slave and set the channels there. That seems to work correctly, though I am unsure why. If any one has any suggestions please let me know.

For those that are also looking for a solution, take a look at the following /etc/asound.conf

pcm.headset { type hw; card Headset; }
ctl.headset { type hw; card Headset; }

pcm.headset51 {
	type plug;
	slave {
		pcm headset;
		channels 6;
	};
}

pcm.!default headset51
ctl.!default headset

Thanks,

Daniel

Last edited by djrollins (2017-10-07 14:55:04)

Offline

Board footer

Powered by FluxBB