linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Re: 2.4 - buttons, temperature, ictc
@ 2001-07-18 11:11 Iain Sandoe
  2001-07-18 12:43 ` Joseph P. Garcia
  2001-07-18 12:52 ` Bastien Nocera
  0 siblings, 2 replies; 22+ messages in thread
From: Iain Sandoe @ 2001-07-18 11:11 UTC (permalink / raw)
  To: Joseph P. Garcia; +Cc: benh, linuxppc-dev


On Tue, Jul 17, 2001, Joseph P. Garcia wrote:
> On Tue, 17 Jul 2001 16:40:24 +0200 (CEST)
> Michael Schmitz <schmitz@opal.biophys.uni-duesseldorf.de> wrote:
>> Why pmud? For backlight I kind of see how you'd get that notion. But
>> volume?
> ...
>> handle all this. That way, users could even customize the thing to get
>> particular functions mapped to keys :-)
>
> I agree.  At least at the moment, there are measures to have volume
> controls in the new input layer.  Else, why would there be macros in
> input.h for them.  Assuming that this is generally preferred direction, it
> would require a shell- or X-based handler.  I'm sure that if keycodes are
> set up properly, you could have Sawfish or Enlightenment capture the key
> stroke and use it like macos with the volume bar appear at the bottom (if
> you want that sort of thing).  In console, it would be different.  But
> taken as stated, this starts to put bloat wherever it goes.  Having a
> window manager call aumix isn't very linux like, but I'd argue that its the
> kind of result you would get in a nice integrated environment like kde or
> gnome would like to attain.  if the user doesn't realize its part of the
> wm, and the code is clean, it should be tolerable.

How does the action end up getting routed to the sound driver?

We have some limitations owing to the OSS API:

(a) you can't open /dev/dsp more than once *well, you shouldn't be able to -
and I think I've fixed that - at least in Ben's tree*

(b) linking /dev/mixerXX with a particular piece of h/w can be quite tricky
(it might have to be a user selection - which mixer is controlled by the
keys).

(c) the OSS implementation *might* soon be sitting on top of an ALSA driver
talking to a non-onboard sound card (e.g. a pcmcia card) [although this is
not likely in the immediate future on PPC ... it is quite likely soon on x86
laptops]

(d) AFAICT there is no OSS "increment/decrement" volume function/ioctl().
You'd have to read the vol and then re-write it with an increment.  OSS
specifically says "you can't rely on the return value from the write vol.
ioctl()".

----

I'd definitely favour a daemon that didn't imply dependence on a particular
shell/window manager/gui-toolkit  (although I don't really think you are
suggesting that) ... there are endless toolkit debates on linux-audio-dev.

I've been toying with the idea of a PMac-specific GUI mixer for a while -
the PMac hardware doesn't map well onto OSS.

- that is, we have several capabilities (and growing with tumbler etc.) that
cannot be reached from the normal OSS interface.

Perhaps (at least the sound part) it could be integrated with eSound & aRts
so that coverage would come as part of a standard install?

ciao,
Iain.

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

^ permalink raw reply	[flat|nested] 22+ messages in thread
* Re: powermac (other ppc?) events
@ 2001-07-18 22:36 Iain Sandoe
  0 siblings, 0 replies; 22+ 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] 22+ messages in thread
[parent not found: <20010718230301.7A05C2F0F9@apollo.valhalla.net>]
* Re: powermac (other ppc?) events
@ 2001-07-19 22:36 Iain Sandoe
  2001-07-20  9:22 ` Michael Schmitz
  0 siblings, 1 reply; 22+ 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] 22+ messages in thread
* Re: powermac (other ppc?) events
@ 2001-07-20 10:23 Iain Sandoe
  2001-07-20 12:17 ` Michael Schmitz
  0 siblings, 1 reply; 22+ 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] 22+ messages in thread

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

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

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