On Fri, Apr 24, 2020 at 09:43:12AM +0200, Damien Thiriet wrote: > Hi misc@, > > > I am trying to make audio records from my web cam but > cannot succeed in doing it. > I read the FAQ, aucat(1), audioctl(1) and sndiod(8) man pages (but I > certainly misunderstood them) and searched the mailing list. > I think they are obvious things I simply don't understand, any help > welcome. > > Looks like my webcam is recognized by the system > > $ dmesg|grep audio > audio0 at azalia1 > uaudio0 at uhub0 port 3 configuration 1 interface 3 "Logitech product 0x0808" > rev 2.00/0.09 addr 2 > uaudio0: class v1, high-speed, sync, channels: 0 play, 1 rec, 2 ctls > audio1 at uaudio0 > > I switched recording on, as advised in the FAQ > $ /usr/bin/doas /usr/sbin/sysctl kern.audio.record=1 > kern.audio.record: 1 -> 1 > > $ aucat -f /dev/audio1 -o test.wav > /dev/audio1: couldn't open audio device > > $ audioctl -f /dev/audio1 > audioctl: /dev/audio1: Device not configured > > I understand I should use sndiod, but doing > # sndiod -f /dev/audio1 > did not help, even after > # rcctl restart sndiod > > What did I miss? My user is member of wheel, I understand he should have > access to /dev/audio1 >
You don't need special privileges to use audio, you only need to enable the device in sndiod. To use both of your devices (internal and USB), you could run: rcctl set sndiod flags -f rsnd/0 -f rsnd/1 rcctl restart sndiod At this point you could run: aucat -f snd/1 -o test.wav and /tmp/foo.wav Note that this device is not full-duplex, it is suitable for recording but not for telephony in web browsers. -- Alexandre

