Hi,

On Nov 23 09:43:33, a...@caoua.org wrote:
> On Sun, Nov 22, 2020 at 07:48:14PM +0100, Jan Stary wrote:
> > This is current/amd64 (dmesg below),
> > running /usr/bin/sndiod -f rsnd/0 -F rsnd/1
> > 
> > While the -F feature works with most USB audio devices I have tried,
> > it does not make the switch to use the -F device
> > with this USB camera with a builtin microphone.
> > It's an Audom AF640 and it attaches as follows:
> > 
> > uvideo0 at uhub0 port 1 configuration 1 interface 0 "Sunplus IT Co Full HD 
> > webcam" rev 2.00/0.05 addr 2
> > video0 at uvideo0
> > uaudio0 at uhub0 port 1 configuration 1 interface 3 "Sunplus IT Co Full HD 
> > webcam" rev 2.00/0.05 addr 2
> > uaudio0: class v1, high-speed, sync, channels: 0 play, 1 rec, 2 ctls
> > audio1 at uaudio0
> > 
> > I can confirm that both the camera and the mike themselves work.
> > After plugging it in, sndioctl says
> > 
> > input.level=0.000
> > input.mute=1
> > output.level=0.980
> > output.mute=0
> > server.device=0
> > app/rec0.level=1.000
> > 
> > Notice the server.device=0, meaning it is still using snd/0.
> > Notice the zero input level and the muted input.
> > Is this intended?
> > 
> > If I plug a Sennheiser haedset instead, sndioctl says
> > 
> > input.level=0.800
> > input.mute=0
> > output.level=0.800
> > output.mute=0
> > server.device=1
> > app/rec0.level=1.000
> > 
> > switching to the USB device plugged in.
> > 
> > Is it because the camera's mike has no output channels?
> > "channels: 0 play, 1 rec, 2 ctls" - indeed, it only
> > records mono and has no playback capabilities.
> > 
> > According to the manpage
> > 
> > -F device
> >         Specify an alternate device to use.  If it doesn't work,
> >         the one given with the last -f or -F options will be used.
> >         For instance, specifying a USB device following a PCI device
> >         allows sndiod to use the USB one preferably when it's
> >         connected and to fall back to the PCI one when it's
> >         disconnected. Alternate devices may be switched with the
> >         server.device control of the sndioctl(1) utility.
> > 
> > Is the -F device required to have at least one playback
> > and pne record channel to "work"?
> > 
> > Switching with a manual "sndioctl server.device=1"
> > doesn't work either: sndioctl still shows server.device=0
> > 
> > Is this intended?
> > How can I further debug this?
> > 
> 
> Hi,
> 
> The -F option works only if two devices have the same capabilities,
> this allows to pull the USB cable and continue using the internal
> device.
> 
> In your case the webcam can't play but sndiod is configured to use
> full-duplex mode. From this stand-point, the webcam is not usable and
> sndiod tries the next device.

thank you for the insight.

Do you think a short sentence to that effect
would be an improvement to sndiod.8 ?

        Jan

Index: sndiod.8
===================================================================
RCS file: /cvs/src/usr.bin/sndiod/sndiod.8,v
retrieving revision 1.8
diff -u -p -u -p -r1.8 sndiod.8
--- sndiod.8    28 Jun 2020 05:21:39 -0000      1.8
+++ sndiod.8    23 Nov 2020 17:17:53 -0000
@@ -186,7 +186,10 @@ Examples:
 .Va u8 , s16le , s24le3 , s24le4lsb .
 .It Fl F Ar device
 Specify an alternate device to use.
-If it doesn't work, the one given with the last
+If it doesn't work or doesn't have the capabilities
+required by the current
+.Fl m
+mode, the device given with the last
 .Fl f
 or
 .Fl F




Reply via email to