Soundcard tweaking: `mixer' v. `sysctl' ?

From: Barry Bouwsma (freebsd-misuser_at_remove-NOSPAM-to-reply.NOSPAM.dyndns.dk)
Date: 11/30/04

  • Next message: Christoph Kukulies: "Oracle 9/10g under FreeBSD"
    Date: Tue, 30 Nov 2004 21:33:14 +0100 (CET)
    To: freebsd-hackers@freebsd.org
    
    

    [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

    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"


  • Next message: Christoph Kukulies: "Oracle 9/10g under FreeBSD"

    Relevant Pages

    • Re: 2.6.6-mm2
      ... >> Yeah, it'd require sysctl or similar, and further reduces the security, ... >> unless you only allow bit clearing or something. ... It's an hack and the simplest hack is ... Well it's just basic security issue. ...
      (Linux-Kernel)
    • Re: problems with wi driver.
      ... Robert ... >: cards with sysctl?? ...
      (freebsd-current)
    • Re: [RFD][PATCH 2/2] sysctl: Implement CTL_UNNUMBERED
      ... number that isn't CTL_ANY, CTL_NONE, or a valid sysctl number. ... The only reserved sysctl numbers we have are 0 and -1. ... We can remove the hack that nfs had, because we actually have a clean ... still available to reserve for a new purpose globally but 0 seems perfectly ...
      (Linux-Kernel)
    • Re: problems with wi driver.
      ... : cards with sysctl?? ... Warner ... To unsubscribe, ...
      (freebsd-current)
    • if_ral regression
      ... one suggested "fix" is to turn off netisr? ... sysctl net.isr.direct=0 ... even though I use ath based cards now. ...
      (freebsd-current)