NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

audioctl and mixerctl command default device question



Hi

Just trying to understand NetBSD audio system. I understand that with "audiocfg list" command I can list the default configured device marked with an asterisk [*] (and can be changed with "audioctl default x" command):

netbsd-raspa4$ audiocfg list
0: [*] audio1 @ vcaudio0: vchiq auds 3
       playback: 2ch, 48000Hz
       record:   unavailable
       (P-) slinear_le 16/16, 2ch, 48000-48000Hz
1: [ ] audio0 @ uaudio0: USB audio
       playback: unavailable
       record:   2ch, 32000Hz
       (-R) slinear_le 16/16, 2ch, { 16000 }
       (-R) slinear_le 16/16, 2ch, { 24000 }
       (-R) sline

In my case onboard /dev/audio1 device is now the default, it is named as "0: [*]". The other one is a WEBCAM connected to the RaspberryPi 4 USB port that is /dev/audio0 and named "1: [ ]".

And that symbolic links are configured this way:

netbsd-raspa4$ ls -lh /dev/mixer*
lrwxr-xr-x  1 root  wheel     11B May 30 08:14 /dev/mixer -> /dev/mixer1
crw-rw-rw-  1 root  wheel  36, 16 Jun 30  2024 /dev/mixer0
crw-rw-rw-  1 root  wheel  36, 17 Jun 30  2024 /dev/mixer1
crw-rw-rw-  1 root  wheel  36, 18 Jun 30  2024 /dev/mixer2
crw-rw-rw-  1 root  wheel  36, 19 Jun 30  2024 /dev/mixer3
netbsd-raspa4$ ls -lh /dev/audio*
lrwxr-xr-x  1 root  wheel      11B May 30 08:14 /dev/audio -> /dev/audio1
crw-rw-rw-  1 root  wheel  36, 128 Jun 30  2024 /dev/audio0
crw-rw-rw-  1 root  wheel  36, 129 Jun 30  2024 /dev/audio1
crw-rw-rw-  1 root  wheel  36, 130 Jun 30  2024 /dev/audio2
crw-rw-rw-  1 root  wheel  36, 131 Jun 30  2024 /dev/audio3
lrwxr-xr-x 1 root wheel 14B May 30 08:14 /dev/audioctl -> /dev/audioctl1
crw-rw-rw-  1 root  wheel  36, 192 Jun 30  2024 /dev/audioctl0
crw-rw-rw-  1 root  wheel  36, 193 Jun 30  2024 /dev/audioctl1
crw-rw-rw-  1 root  wheel  36, 194 Jun 30  2024 /dev/audioctl2

so the files point to the default configured "1" devices.

but I see a little inconsistency in this:

from "man audioctl":

The -d flag can be used to give an alternative audio control device, the default is /dev/audioctl0.

from "man mixerctl":

The -d flag can be used to give an alternative mixer device. The default is /dev/mixer.


Shouldn't both commands have the same default behavior? I mean, both /dev/audioctl and /dev/mixer?

I assumed that running audioctl and mixerctl without the -d flag would use the default device, but I was mistaken. After reading the man page, I found what seems to be an inconsistency (for me, perhaps I am wrong).

Thanks so much in advance,
Ramiro









Home | Main Index | Thread Index | Old Index