On Tue, Jun 03, 2014 at 06:22:01PM +0200, Remco wrote:
> Johan Svensson wrote:
> 
> > I am trying to change my default output device from my builtin soundcard
> > to an usb soundcard which is an output only device. I have tried:
> > 
> > # audioctl -f /dev/audio1
> > audioctl: /dev/audio1: Device not configured
> > 
> 
> It seems this device does not exist from the kernel's point of view.
> (there's also /dev/audioctl1, but using that probably doesn't make a 
> difference)
> 
> > I think there should be some controller that you configuring the audio
> > device. But i manually tried to change the symlinks in the dev directory:
> > # ls -la * | grep -E "mixer|audio"
> > lrwxr-xr-x  1 root   wheel            6 Jun  3 16:58 audio -> audio1
> > crw-rw-rw-  1 root   wheel      42, 128 Jun  3 17:01 audio0
> > crw-rw-rw-  1 root   wheel      42, 129 May 28 19:07 audio1
> > crw-rw-rw-  1 root   wheel      42, 130 May 28 19:07 audio2
> > lrwxr-xr-x  1 root   wheel            9 Jun  3 16:58 audioctl -> audioctl1
> > crw-rw-rw-  1 root   wheel      42, 192 May 28 19:07 audioctl0
> > crw-rw-rw-  1 root   wheel      42, 193 May 28 19:07 audioctl1
> > crw-rw-rw-  1 root   wheel      42, 194 May 28 19:07 audioctl2
> > lrwxr-xr-x  1 root   wheel            6 Jun  3 16:58 mixer -> mixer1
> > crw-rw-rw-  1 root   wheel      42,  16 May 28 19:07 mixer0
> > crw-rw-rw-  1 root   wheel      42,  17 May 28 19:07 mixer1
> > crw-rw-rw-  1 root   wheel      42,  18 May 28 19:07 mixer2
> > 
> > But it is still defaulting to my builtin soundcard. How can i change the
> > default sounddevice from audio0 to audio1?
> > 
> 
> I think using sndiod(1) is the answer, in the most simplistic form, 
> something like this in your rc.conf.local(8) should suffice:
> sndiod_flags="-f rsnd/0 -s onboard -f rsnd/1 -s default"
> 
> This should make your audio0 device available as "snd/0.onboard" and your 
> audio1 device as the default sound device. (Both should be available as 
> "snd/0" and "snd/1" respectively as well IIRC).
> 

This changed a while ago: the device number in "snd/N" corrsponds
to the number of the -f option of sndiod. And "snd/0" is always the
default. So I'd suggest:

sndiod_flags="-f rsnd/1 -f rsnd/0"

This will kind of "exchange" the first two devices. I.e. this
exposes "snd/0" as sub-device of "rsnd/1" and "snd/1" as sub-device
of "rsnd/0".

-- Alexandre

Reply via email to