lkml.org 
[lkml]   [1999]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: New snapshot of modutils
    Date
    In article <199902241250.HAA22093@furryterror.org>,
    David Woodhouse <David.Woodhouse@mvhi.com> wrote:
    >uixjjji1@umail.furryterror.org said:
    >I wasn't aware that the sound blaster with which I was testing my previous
    >patches had a 'deactivated' state. At power-on, I believe the levels would be
    >set to zero, but on module unloading and soft-reboot, the start of the
    >hardware wouldn't change. You can be quite happily listening to the radio
    >through the 'line in' port of the card while you reboot, or listening to a CD
    >while the module is unloaded and reloaded.

    Hmmm...maybe I'm confusing myself. The bttv driver actually shuts off
    the audio when the device is closed. I think one of the ES1370, GUS,
    or GUS Max shuts down the card at module unload, but unfortunately they're
    all in another building and they aren't cross-wired well enough to test.

    The GUS Max definitely goes silent on a soft reboot though. I haven't
    connected one to an analog input and tested module unloading in a number
    of years and I can't remember what it does in that case. It definitely
    forgets and reloads default values for the mixer when the module _is_
    loaded, however, because I had to work around that behavior in a server
    application.

    >The sb driver then sets up the levels again when it loads, and it is this
    >which causes the problem. If, however, the sb driver initialises the card with
    >the levels which were saved last time the card was unloaded, then the problem
    >is solved. This is what my patches did. First I read the original levels back
    >from the hardware - effectively just not resetting the mixer levels on
    >initialisation. That wasn't particularly reliable, so I changed to using
    >kerneld to store the mixer levels.

    On cards with software mixers (i.e. Linux scales all audio before sending
    it to the card, or uses the card's wavetable synth with a volume setting
    to simulate a mixer control) there is no hardware to read back, and I'd
    imagine that there exist sound cards with write-only mixer controls.

    What happens on laptops with sound hardware and power saving mode? Does
    the sound chipset power down if the sound driver is unloaded? Would that
    be a good idea if it wasn't already happening?

    >This problem could be worked around by adding a parameter to each sound card
    >driver, allowing the startup levels to be set at insmod time. The levels could
    >be recorded by a userspace utility just before unloading the module, and
    >automatically added to the module's arguments by modprobe.

    In the interest of consistent semantics between different modules for
    wildly different sound hardware, I would advocate that the card default
    to silent unless explicitly told otherwise, and not be active (even for
    analog pass-through) if the device driver is unloaded. Of course I'd
    like mixer controls calibrated in dB and better realtime synchronization
    with the sound hardware too. Maybe this is more of a topic for
    the ALSA group.

    --
    Zygo Blaxell, Linux Engineer, Corel Corporation, zygob@corel.ca (work),
    zblaxell@furryterror.org (play). It's my opinion, I tell you! Mine! All MINE!
    Size of 'diff -Nurw [...] winehq corel' as of Wed Feb 24 15:14:01 EST 1999
    Lines/files: In 3729 / 60, Out 8397 / 130, Both 10195 / 157

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:50    [W:5.380 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site