On Fri, 24 Apr 2020, 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
I usually don't record audio on my machine, but I'm not sure you should
be using that device directly.
aucat(1) says:
-f device
Use this sndio(7) audio device. Device mode and parameters are
determined from audio files. Default is default.
And sndio(7) says about device names:
From the user's perspective every audio interface, MIDI port, and
sndiod(8) service has a name of the form:
type[@hostname][,unit]/devnum[.option]
maybe something like snd/1 in your case ? (just guessing here, I'm sure
there are more knowledgeable people that can help)
>
> $ 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
>
>
> Damien Thiriet
>
--
Paco Esteban.
0x5818130B8A6DBC03