On Wed, Jun 02, 2021 at 10:38:23AM +0200, Peter N. M. Hansteen wrote:
> Another intriguing detail - this machine does not have a headphone jack,
> but comes with a USB-C to audio mini-jack adapter. When I plug in the
> adapter, it is recognized
> 
> Jun  2 10:30:46 zaida /bsd: uaudio0 at uhub1 port 4 configuration 1
> interface 1 "ESS Technology Asus USB DAC" rev 1.01/0.01 addr 4
> Jun  2 10:30:46 zaida /bsd: uaudio0: class v1, full-speed, sync,
> channels: 2 play, 1 rec, 4 ctls
> Jun  2 10:30:46 zaida /bsd: audio1 at uaudio0
> Jun  2 10:30:46 zaida /bsd: uhidev0 at uhub1 port 4 configuration 1
> interface 3 "ESS Technology Asus USB DAC" rev 1.01/0.01 addr 4
> Jun  2 10:30:46 zaida /bsd: uhidev0: iclass 3/0
> Jun  2 10:30:46 zaida /bsd: uhid0 at uhidev0: input=1, output=0, feature=64
> 
> but audio output stays on the internal speaker.
> 
> Is there some (simple) tweak to enable switching audio outputs here?
> 

Hi,

On this machine there seem to be two separate devices, with two
different drivers and with their own parameter set and their own
state. This is very different from analog headsets that only require
wires to be swapped.

You could try:

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

This roughly means "Try to use rsnd/1 but if the latter is not there
use rsnd/0 instead".

If devices are compatible (they probably are), programs can seamlessly
be migrated from one device to another, so if you pull the USB cable,
audio should switch to internal speakers.

There's no hotplug support for audio (yet), so if you plug the USB
device while programs are using the internal device, you need to
manually tell sndiod to switch to it, ex:

sndioctl server.device=1

Reply via email to