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; 26+ 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] 26+ messages in thread
* Re: 2.4 - buttons, temperature, ictc
@ 2001-07-18 13:45 Iain Sandoe
  0 siblings, 0 replies; 26+ messages in thread
From: Iain Sandoe @ 2001-07-18 13:45 UTC (permalink / raw)
  To: Bastien Nocera; +Cc: linuxppc-dev


On   Wed, Jul 18, 2001,  Bastien Nocera wrote:
> Iain Sandoe wrote:
>> On Tue, Jul 17, 2001, Joseph P. Garcia wrote:
[snip]
>>>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.  [...]
>>>wm, and the code is clean, it should be tolerable.
>
> 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
> keycode on my iMac's Apple Pro kbd), and then by XFree86 so that anybody
> can start adding shortcuts for their preferred window manager/desktop
> for these keys (that do also exist on x86, btw)

I'd guess that Franz has the ideas of how this will work ... this side is
out of my parish ...

>> How does the action end up getting routed to the sound driver?
>>[...]
>> (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]
>
> A pcmcia sound card ?! didn't know that existed.

Yep. there are some "on the stocks" - pro-audio stuff really tho' rather
than SBLive-type things (although those may exist too).

> Maybe USB speakers would be a better example (like on the Cube).

yeah. USB audio integration is a headache right now ...

>>[...]
>> 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.
> Can you explain ? OSS is indeed not very good for our mixers, maybe your
> ideas could be integrated into ALSA before it reaches 1.0 or gets
> included in the kernel.

I don't think there's any need to worry about this in ASLA - it already has
the ethic of describing the underlying hardware - no more no less.

The problem is with OSS - where the API embeds an idea of what the hardware
should look like - and that idea is *way* different from how PMac built-in
sound is configured.

I planned on using the OSS "special purpose uncommitted" ioctl() values to
access the PMac-specific stuff and (perhaps) making a GUI mixer that
followed the Apple-type sound manager interface (i.e. reflecting
mutually-exclusive inputs etc. etc.).

This would make dmasound continue to work with the "standard" mixers -
whilst allowing people who wanted a more closely matched interface to use
that.

>> Perhaps (at least the sound part) it could be integrated with eSound & aRts
>> so that coverage would come as part of a standard install?
> esound is _dead_. On PPC, it's a piece of junk, and Gnome 2.0 will use
> aRts through a C interface.

OK ... I don't (under any circumstances) want to start a desktop/toolkit war
- that was part of my point in making the suggestion.

ciao,
iain.

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

^ permalink raw reply	[flat|nested] 26+ messages in thread
* Re: 2.4 - buttons, temperature, ictc
@ 2001-07-18 13:34 Iain Sandoe
  0 siblings, 0 replies; 26+ messages in thread
From: Iain Sandoe @ 2001-07-18 13:34 UTC (permalink / raw)
  To: Joseph P. Garcia; +Cc: linuxppc-dev


On  Wed, Jul 18, 2001, Joseph P. Garcia wrote:
> On Wed, 18 Jul 2001 12:11:42 +0100
> "Iain Sandoe" <iain@sandoe.co.uk> wrote:
>> How does the action end up getting routed to the sound driver?
>
> In the current set up, [...]
> code that should/will not make the trip into a public kernel.  but i'd have
> double check to make sure..

well, I understood that from the original patch (and the objection I had was
just as you say)... I don't fancy trying to maintain that cross-linkage in
dmasound.

>> I'd definitely favour a daemon that didn't imply dependence on a particular
> [...]
>> so that coverage would come as part of a standard install?
>
> I'm not familiar with what kind of apis already exist, but your suggestion
> to make something like esound sounds good.

Apart from Bastien's comment in another follow-up..

> Given that these daemons try to
> allow for such things that we can provide in hardware (iirc), like multiple
> opens of /dev/dsp.  So would this be like taking most of the kernel's sound
> interface (like mixer too?) and bringing it into a userspace daemon?

as I understand it, yes... although I tend to concentrate on the raw driver
and haven't done much with esound/arts...

>  You mention ALSA a bit.
> Would this be a better fit than OSS, or are we better making our own?

I doubt (seriously) that another audio API would stand *any* chance of
making it into official linux ... it's still debatable whether ALSA will...

> but then again, I always lean a bit too much toward the
> generic all-purpose APIs created by Mr./Ms. Someone Else whenever userspace
> is involved.

ALSA is *much* cleaner - in principle - all the bloat is taken out of the
kernel drivers into user-land.   However, it's much more complex to set up
at the moment - IMHO probably hasn't really reached 'end user' status yet.

There are starter PPC drivers - based on dmasound.  However, much is still
to be done and ASLA hasn't reached 1.0 yet.  (This is why I'm still working
on adding other Apple chip-sets into dmasound).

> And so with this, how much would stay kernel side?  is this a new api'ed
> kernel driver, or a userspace driver/daemon using a semi-generic ioctl
> interface for ppc sound hardware that also listens to other devices for
> control?  Can this be achieved in a kernel thread?  or would that still be
> considered kernel-bloat?  not to sure on userspace scheduling reliability.

Well pre-ALSA (which is where we are at) ... the role of user-space
abstraction of the OSS devices is handled by aRts et. al.  So I guess taking
a look at how you might feed stuff to that is a start.

Otherwise, you could take the Apple HIG ethic of letting the user select
things... it works quite well (if you don't have a religious problem with
how they do things ;-)))

> (i talk alot when im trying to help)

s'ok - better to get a solution that will be acceptable from the start.
ciao,
Iain.

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

^ permalink raw reply	[flat|nested] 26+ messages in thread
* Re: 2.4 - buttons, temperature, ictc
@ 2001-07-17 10:32 Iain Sandoe
  0 siblings, 0 replies; 26+ messages in thread
From: Iain Sandoe @ 2001-07-17 10:32 UTC (permalink / raw)
  To: Joseph P. Garcia, linuxppc-dev; +Cc: Benjamin Herrenschmidt


not sure how the volume controller can work in the general case.

I think this needs to be a user-space action (somehow) through the standard
OSS calls - because there are now quite a few PMac sound implementations
(although not all working fully yet)...

doing it this way is going to horribly link the adb and dmasound drivers
together...

ciao,
Iain

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

^ permalink raw reply	[flat|nested] 26+ messages in thread
* 2.4 - buttons, temperature, ictc
@ 2001-07-17  5:45 Joseph P. Garcia
  2001-07-17  7:18 ` Geert Uytterhoeven
  2001-07-17  9:11 ` Franz Sirl
  0 siblings, 2 replies; 26+ messages in thread
From: Joseph P. Garcia @ 2001-07-17  5:45 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Benjamin Herrenschmidt

[-- Attachment #1: Type: text/plain, Size: 1172 bytes --]

mostly a rehash of patches from the past, and mostly not mine originally, attached is a patch.gz against the latest BenH 2.4 kernel.  It adds support for:
- repeating brightness buttons
- volume buttons (using kernel space volume control interface)  supported sound cards only (screamer, burgundy?)
- temperature support for my wallstreet 750CX, which doesn't use TAU. (not sure what CPUs support this coding.  no checks yet)
- ICTC proc support  (I still have this in my kernel.  might use it one day)
- small ATY resource tweak in pmac_pci.c (I like it at 0x830--.  not sure if 0x800-- is best or not.  ignore if you like.)

I'm willing to help see some of these get into a public tree.  BenH showed interest in the repeating and volume buttons, but with the noted exception of providing user space an interface to use them.  This coding has a broken new input layer volume key support, which if completed, and supported by a daemon, could lighten the code bulk extensively. (links between adbhid - pmacfeatures - dmasound[module] aren't pretty)

figured now was a good time to remind people these things still exist.

--
Joseph P. Garcia
http://www.execpc.com/~jpgarcia

[-- Attachment #2: voltemic.patch.gz --]
[-- Type: application/octet-stream, Size: 7085 bytes --]

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

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

Thread overview: 26+ 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 13:45 Iain Sandoe
2001-07-18 13:34 Iain Sandoe
2001-07-17 10:32 Iain Sandoe
2001-07-17  5:45 Joseph P. Garcia
2001-07-17  7:18 ` Geert Uytterhoeven
2001-07-17  8:18   ` Joseph P. Garcia
2001-07-17  9:11 ` Franz Sirl
2001-07-17 10:19   ` Benjamin Herrenschmidt
2001-07-17 14:40     ` Michael Schmitz
2001-07-17 20:29       ` 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).