Date: Tue, 30 Nov 2004 21:33:14 +0100 (CET) From: Barry Bouwsma <freebsd-misuser@remove-NOSPAM-to-reply.NOSPAM.dyndns.dk> To: freebsd-hackers@freebsd.org Subject: Soundcard tweaking: `mixer' v. `sysctl' ? Message-ID: <200411302033.iAUKXES02582@Mail.NOSPAM.DynDNS.dK>
next in thread | raw e-mail | index | archive | help
[drop me from replies and I'll catch up from the archives RSN] I seek guidance in my hideous hacking. I have multiple sound cards based on the CMI8738 chip with spdif input in one machine, for which I was using hacked kernel modules to select either optical or coaxial spdif input from both cards. The cmpci driver under NetBSD has far more functionality, allowing one to use mixerctl/audioctl to access much more than FreeBSD's mixer or sysctl can give me. Now that I'm wanting to record from different sources on the two cards, as well as having been spoilt by what NetBSD is able to offer in monitoring and whatnot, I'm wanting to hack comparable functionality into my FreeBSD kernel modules. My first ugly hack makes use of two added mixer inputs to allow me to select one of the two spdif inputs independently of the other card, with `mixer', whee. After I had had no luck with my wish to use a sysctl to select recording source like the NetBSD mixerctl program. First question, am I missing anything that gives sysctl-like control over sound devices, under my FreeBSD4? Secondly, after another attempt to whup the sysctl into submission, I had success. Yow. So I was able to duplicate my `mixer' input source selection hack as a `sysctl' input source selection hack, as well as introduce a handful of other sysctl knobs to be used to tweak things important to me, leaving the door open for others. So, should I give up on `mixer' in favour of `sysctl' to select recording source (the spdif inputs are exclusive), or is it still reasonable/preferable to use `mixer =rec dig1' as my earlier hacks allow (haven't tried to make those disappear from the mixer itself, as the level cannot be adjusted) ? In addition, for something like enabling spdif monitor to the analog outputs (which NetBSD's mixerctl spdif.monitor allows me to do), should this be done with a sysctl, as my later hack does, or by something else? There's already one sysctl for this sound driver to enable spdif playback output, so I would imagine this is the way to go. Apologies for my stupidity. And I'll submit (ugly) patches, when I'm happy with my hacks. If desired. thanks barry bouwsma
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200411302033.iAUKXES02582>