Re: power managing maestro.c 0.14 available.

From: Jens Axboe (axboe@suse.de)
Date: Sat Jan 29 2000 - 10:25:30 EST


On Sat, Jan 29 2000, Jamie Lokier wrote:
> 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"?

Yes ;)

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

Cool, I was unaware that such a system existed! Sounds like just the
thing we need. You don't always need to fire up the audio device when
a CD is played, I frequently just use head phones plugged into the
front of the drive.

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

Sure, we might as well stick with the event based system.

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

Lets not talk IDE, but CD-ROM instead. All volume requests and CD
play operations go through the uniform CD-ROM layer. A drive
can fail the volume request naturally, if it doesn't support it.
At probe time we also detect whether the drive does support CD
audio. Why would you need the specific volume? If there's some
kind of output, fire up the audio device. Some CD drives don't
even support a range of volumes, just on/off.

-- 
*  Jens Axboe <axboe@suse.de>
*  Linux CD-ROM Maintainer
*  http://www.kernel.dk

- 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 : Mon Jan 31 2000 - 21:00:24 EST