Re: power managing maestro.c 0.14 available.

From: Jamie Lokier (lkd@tantalophile.demon.co.uk)
Date: Sat Jan 29 2000 - 09:56:38 EST

  • Next message: Steve Underwood: "Re: linux-kernel-digest V1 #113"

    Jens Axboe wrote:
    > > It might be nice to add a notifier chain specifically for CD drivers to
    > > say when they're playing something and when they're not. Something very
    > > simple: notify when audio playing starts, notify when audio playing
    > > stops. Perhaps volume changes too.
    >
    > Sure that sounds like a fine idea. Who do you propose we do this?

    Is that "who" meant to be "how"?

    By using <linux/notifier.h>. A single, global `struct notifier_block *
    cdplay_notifier' is declared somewhere.

    Audio modules register their interest in CD events using
    `notifier_chain_register'. CD says "I am playing" or "I am not playing"
    with the drive number (defaults to zero but set by a command line
    parameter) as the argument.

    Audio drivers can use this for power saving, and also to turn off the
    unused mixer input when it isn't being used to reduce noise in the output.

    There needs to be a clean way for audio drivers to query the status when
    they are loaded. One way is a third notifier event, "Please tell us the
    status", which causes all the CD drivers loaded to broadcast their
    current playing state.

    You could include volume requests, as a range of 101 command values (to
    preserve the parameter as CD number). Can the IDE driver tell when a
    drive doesn't honour volume settings, so the mixer should be doing it?

    enjoy,
    -- Jamie

    -
    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/



    This archive was generated by hypermail 2b29 : Sat Jan 29 2000 - 16:39:54 EST