linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Re: powermac (other ppc?) events
@ 2001-07-20 10:23 Iain Sandoe
  2001-07-20 12:17 ` Michael Schmitz
  0 siblings, 1 reply; 11+ messages in thread
From: Iain Sandoe @ 2001-07-20 10:23 UTC (permalink / raw)
  To: Michael Schmitz; +Cc: Joseph P. Garcia, Michael Schmitz, linuxppc-dev


>> Look, I don't have a proper opinion on how the keys are achieved ...
>>
>> ---
>>
>> all I want is that the sound driver is:
>>
>> 1/ called through the standard ioctl() for volume - however many "volumes"
>> you want to adjust.
>>
>> This is so that *your* interface will work with *any* dmasound-supported
>> hardware (without hacking dmasound for each chipset).
>
> That was my idea in this - have some sound event daemon watch for events
> and call the proper ioctl. What was with the sound driver only permitting
> a single open() at a time? Would aumix running block the sound
> event daemon's ioctl?

The single open() rule is for /dev/dsp ... it is part of the OSS spec.
Actually, it is the opposite of what you've suggested - the OSS rule says
that open() shall *not* block - waiting for the device - but return straight
away with EBUSY.  (we *were* blocking on a sleep queue).

Up until my latest set of patches we were breaking this rule.  As of today
those patches are in Ben's tree but not BK (although they are in my ftp
space on penguinppc.org as well).

/dev/mixerXX can be opened multiple times - so this doesn't affect aumix et.
al.

However, one of the really nasty things about OSS is that you can't
guarantee that /dev/mixer0 belongs to /dev/dsp0  (cute eh?).  So, if you
have a sound dev open and want to be sure that you are sending volume
controls to the same device you have to send the mixer commands to /dev/dsp.

It's, perhaps, a moot point since "mixers" are really User Interface devices
- and there is an identification of which mixer you are talking to supplied
by one of the ioctls() - so, for example, with the latest (patch, benh)
dmasound_pmac - you will see the dmasound mixer identified as "Power Mac
Built-In Sound" on a kmixer tab.

If your GUI/Command Line mixer-of-choice doesn't identify the actual device
- it needs modifying - because otherwise it stores up trouble for the user
where there are multiple devices in the system...

as I have (perhaps wryly) noted ... most of the OSS mixer authors don't seem
to have RTF(OSS)M ;-)))

ciao,
Iain.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: powermac (other ppc?) events
@ 2001-07-19 22:36 Iain Sandoe
  2001-07-20  9:22 ` Michael Schmitz
  0 siblings, 1 reply; 11+ messages in thread
From: Iain Sandoe @ 2001-07-19 22:36 UTC (permalink / raw)
  To: Joseph P. Garcia, Michael Schmitz; +Cc: linuxppc-dev


> work as well.  As is, volume keys seem to rank low in the priority queue.
> something to get practice on.

Look, I don't have a proper opinion on how the keys are achieved ...

---

all I want is that the sound driver is:

1/ called through the standard ioctl() for volume - however many "volumes"
you want to adjust.

This is so that *your* interface will work with *any* dmasound-supported
hardware (without hacking dmasound for each chipset).

We currently support 3 1/2 chipsets - with two more in the pipeline + Apple
is releasing sound hardware variants faster than we can keep up with the
driver already ;-))

also think about how it might interact with USB audio ...

you ***really*** ***don't*** want to go down the road of hacking every sound
driver for volume keys.


2/ Let dmasound handle the headphone insertion - it is already dealing with
the hardware and the appropriate interrupts.

By all means - if there is a consensus that we *need* User Control over
whether headphone insertion disables the internal speaker (or not) - then I
am happy to use one of the OSS "special purpose" ioctl() values to control
this as a PMac-specific feature - which will work properly via the proper
ioctl().

just my 0.02 euro ...

but I am (at least unofficially) maintaining the driver at the moment.

ciao,
Iain.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: powermac (other ppc?) events
@ 2001-07-18 22:36 Iain Sandoe
  0 siblings, 0 replies; 11+ messages in thread
From: Iain Sandoe @ 2001-07-18 22:36 UTC (permalink / raw)
  To: Joseph P. Garcia; +Cc: linuxppc-dev


On Wed, Jul 18, 2001, Joseph P. Garcia wrote:
>[snip]
> - we also have other events we may consider to add, such as headphone
> insert,

this *should properly* be handled by the dmasound driver - it needs to
understand the sound hardware (and on some models shares interrupts with
other sound stuff)

- I just didn't get round to implementing it yet :-(

---

apart from that - as far as sound-related stuff is concerned (e.g. volume
key-presses) - my only care is that controls appear to dmasound through the
ioctl() interface already defined ... to avoid a maintenance nightmare. ...

ciao,
Iain.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: 2.4 - buttons, temperature, ictc
@ 2001-07-18 20:10 Michael Schmitz
  2001-07-18 21:11 ` Bastien Nocera
  0 siblings, 1 reply; 11+ messages in thread
From: Michael Schmitz @ 2001-07-18 20:10 UTC (permalink / raw)
  To: Bastien Nocera; +Cc: Iain Sandoe, Joseph P. Garcia, benh, linuxppc-dev


> >>>Why pmud? For backlight I kind of see how you'd get that notion. But
> >>>volume?
> >>>
>
>
> Why would pmud make sense for the backlight ? because changing the
> backlight settings saves power ? ..Right.

Sort of.

> With Ben's latest changes (the /proc/pmu/* for example), pmud should
> only be a daemon waiting for events, ie:
> - sleep event: execute a bunch of shell commands (the pwrctl script
> should really be split into foo.d directories)

Yep. Plus any other power status change events. /proc/pmu has got nothing
to do with it, neither has /proc/apm.

> - backlight keypress event: change the backlight

Nope. Not power related. Not 'PMU'd.

> - volume keypress event would be a bad idea to implement inside pmud
> because that's the kind of thing you want visual feedback for, and there
> are a lot of different sound implementations that this could be built on
> top of. (aRts/alsa/oss)

Nope. See above.

> - eject keypress event: eject the damn CD !

Neither. Again, see above. Write a general purpose all powerful event
daemon for this. Don't bloat pmud because of some unspecific desire for
feeping creaturitis. This is Linux (Unix), not MockOS.

> Better yet for handling the volume would be to get all these keys
> recognized by the Linux kernel (these keys don't produce any recognized

Nope, not longer an option (kernel bloat, even worse than app bloat).

	Michael


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2001-07-20 12:17 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20010718230301.7A05C2F0F9@apollo.valhalla.net>
2001-07-18 23:22 ` powermac (other ppc?) events Joseph P. Garcia
2001-07-20 10:23 Iain Sandoe
2001-07-20 12:17 ` Michael Schmitz
  -- strict thread matches above, loose matches on Subject: below --
2001-07-19 22:36 Iain Sandoe
2001-07-20  9:22 ` Michael Schmitz
2001-07-18 22:36 Iain Sandoe
2001-07-18 20:10 2.4 - buttons, temperature, ictc Michael Schmitz
2001-07-18 21:11 ` Bastien Nocera
2001-07-18 21:54   ` powermac (other ppc?) events Joseph P. Garcia
2001-07-19 11:20     ` Michael Schmitz
2001-07-19 14:28       ` Joseph P. Garcia
2001-07-19 16:34         ` Michael Schmitz
2001-07-19 17:17           ` Joseph P. Garcia

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).