Date: Fri, 4 Oct 2024 22:57:17 +0200 From: Alfonso Sabato Siciliano <alfix86@gmail.com> To: multimedia@freebsd.org Subject: New meaning oss_sysinfo.nummixers Message-ID: <CAPJrGM0-ptpwZg8nB1MMJhbUr2tMuTG=Tnagce8UXQJjp2nDyw@mail.gmail.com>
index | next in thread | raw e-mail
[-- Attachment #1 --]
Hi guys!
I was inactive for months, one week ago I reinstalled CURRENT on my main
laptop (and others). The meaning of "struct oss_sysinfo.nummixers"
changed. Let's say:
#include <sys/soundcard.h>
#include <fcntl.h>
#include <stdio.h>
#include <unistd.h>
int main()
{
int fd;
struct oss_sysinfo si;
const char *mixer="/dev/mixer0"; //or your mixer
if ((fd = open(mixer, O_RDWR)) == -1) {
printf("Error open()\n");
return (-1);
}
if (ioctl(fd, SNDCTL_SYSINFO, &si) == -1) {
printf("Error SNDCTL_SYSINFO\n");
return (-1);
}
close(fd);
printf("nummixers: %d\n", si.nummixers);
return (0);
}
Output "nummixers: 7", But
% sysctl dev.pcm
... prints 6 devices dev.pcm.[0-5].*
% ls /dev/mixer*
/dev/mixer0 /dev/mixer1 /dev/mixer2 /dev/mixer3 /dev/mixer4 /dev/mixer5
6 mixers from 0 to 5. But now oss_sysinfo.nummixers is 7, it was 6 until
some months ago.
I thought the new value could be the max index, in the case some mixers
are closed, example /dev/mixer0 /dev/mixer2 /dev/mixer5. But in this
case 'nummixers' should be 5 not 7.
Maybe the hidden /dev/mixer is in the count (6 + 1 = 7).
Same situation on 3 laptops. So, what is the new meaning for
oss_sysinfo.nummixers?
Thank you in advance for any reply (now I am working/busy on another
subsystem, I hope to look at audio(4) again in the future).
Best regards,
Alfonso
[-- Attachment #2 --]
<div dir="ltr">Hi guys!<br><br>I was inactive for months, one week ago I reinstalled CURRENT on my main<br>laptop (and others). The meaning of "struct oss_sysinfo.nummixers"<br>changed. Let's say:<br><br>#include <sys/soundcard.h><br>#include <fcntl.h><br>#include <stdio.h><br>#include <unistd.h><br><br>int main()<br>{<br> int fd;<br> struct oss_sysinfo si;<br> const char *mixer="/dev/mixer0"; //or your mixer<br><br> if ((fd = open(mixer, O_RDWR)) == -1) {<br> printf("Error open()\n");<br> return (-1);<br> }<br><br> if (ioctl(fd, SNDCTL_SYSINFO, &si) == -1) {<br> printf("Error SNDCTL_SYSINFO\n");<br> return (-1);<br> }<br><br> close(fd);<br> printf("nummixers: %d\n", si.nummixers);<br> return (0);<br>}<br><br>Output "nummixers: 7", But<br><br>% sysctl dev.pcm<br>... prints 6 devices dev.pcm.[0-5].*<br><br>% ls /dev/mixer*<br>/dev/mixer0 /dev/mixer1 /dev/mixer2 /dev/mixer3 /dev/mixer4 /dev/mixer5<br><br>6 mixers from 0 to 5. But now oss_sysinfo.nummixers is 7, it was 6 until<br>some months ago.<br><br><span class="gmail-HwtZe" lang="en"><span class="gmail-jCAhz gmail-ChMk0b"><span class="gmail-ryNqvb">I thought </span></span></span>the new value could be the max index, in the case some mixers<br>are closed, example /dev/mixer0 /dev/mixer2 /dev/mixer5. But in this<br>case 'nummixers' should be 5 not 7.<br><br>Maybe the hidden /dev/mixer is in the count (6 + 1 = 7).<br><br>Same situation on 3 laptops. So, what is the new meaning for<br>oss_sysinfo.nummixers?<br><br>Thank you in advance for any reply (now I am working/busy on another <br>subsystem, I hope to look at audio(4) again in the future).<br><br>Best regards,<br>Alfonso<br></div>
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPJrGM0-ptpwZg8nB1MMJhbUr2tMuTG=Tnagce8UXQJjp2nDyw>
