linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* patches: MacOS-like Wallstreet sound in/out controls
@ 1999-09-19  6:55 Joseph Garcia
  1999-09-19  7:55 ` Dan Malek
  0 siblings, 1 reply; 5+ messages in thread
From: Joseph Garcia @ 1999-09-19  6:55 UTC (permalink / raw)
  To: linuxppc-dev@lists.linuxppc.org

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

attached are a set of patches to make sound controls like those in MacOS.  the
first patch is one to add volume/mute button support.  I didn't write this one,
but I think it's a must have for any Wallstreet owner.  And if you want to use
the second patch, it is required.  The second uses the AWACS interrupt to
monitor the in/out ports and mods resources accordingly.  ie, if headphones
attached, speakers turn off.  unplug phones, speakers on.  same with the line-in
port: plug in and line-in becomes input source (mic in the header..?), when
removed, it isn't.

It's a little messy, but works to the extent of testing on my pbg3/300.  Tell me
if you think I should try to get it put in the tree.  Or we all may think having
2 out volumes is better.  never made sense to me. <shrug>

-- 
Joseph P. Garcia      jpgarcia@execpc.com      jpgarcia@lidar.ssec.wisc.edu
CS Undergraduate                      Student Employee - Systems Programmer
University of Wisconsin - Madison                            UW Lidar Group

[-- Attachment #2: mac-likesoundcontrol.tar.gz --]
[-- Type: application/x-gzip, Size: 3606 bytes --]

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

* Re: patches: MacOS-like Wallstreet sound in/out controls
  1999-09-19  6:55 patches: MacOS-like Wallstreet sound in/out controls Joseph Garcia
@ 1999-09-19  7:55 ` Dan Malek
  0 siblings, 0 replies; 5+ messages in thread
From: Dan Malek @ 1999-09-19  7:55 UTC (permalink / raw)
  To: Joseph Garcia; +Cc: linuxppc-dev@lists.linuxppc.org


Joseph Garcia wrote:

> attached are a set of patches to make sound controls like those in MacOS.

Since I was the last one to check in changes to the driver, I have kind of
been nominated to do this again.  I have patches from several people for some
functional updates on new hardware.  I can add these in/out controls if
people really want them.


While I understand the convenience of these in/out controls, I personally don't
like them.  I run a variety of programs that perform these operations for me.
Sometimes I want to run both line out and speakers at the same time, or select
the microphone without having to unplug line in.  I guess the in/out doesn't prevent
me from doing this, just that a change (plug in or out) will cause a configuration
change without my mixer knowing.  If people generally want these, I'll put them
in along with the other changes I am making.



    -- Dan


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

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

* Re: patches: MacOS-like Wallstreet sound in/out controls
@ 1999-09-19  8:54 Benjamin Herrenschmidt
  1999-09-19 16:15 ` Joseph Garcia
  0 siblings, 1 reply; 5+ messages in thread
From: Benjamin Herrenschmidt @ 1999-09-19  8:54 UTC (permalink / raw)
  To: dmalek, linuxppc-dev


On Sun, Sep 19, 1999, Dan Malek <dmalek@jlc.net> wrote:

>Since I was the last one to check in changes to the driver, I have kind of
>been nominated to do this again.  I have patches from several people for some
>functional updates on new hardware.  I can add these in/out controls if
>people really want them.
>
>
>While I understand the convenience of these in/out controls, I personally
>don't
>like them.  I run a variety of programs that perform these operations for me.
>Sometimes I want to run both line out and speakers at the same time, or
select
>the microphone without having to unplug line in.  I guess the in/out doesn't
>prevent
>me from doing this, just that a change (plug in or out) will cause a
>configuration
>change without my mixer knowing.  If people generally want these, I'll put
>them
>in along with the other changes I am making.


A better solution would  be to make the appropriate infos available to
userland (eventually via a private ioctl of the sound driver). Then, we
could have an optional damon handling all this automatically that can be
unplugged for people who like controlling everything manually. If no-one
have time to write this, then you may include the patches anyway but
wrapped in a compile option. (I'd like the volume button patch anyway).

On a similar way, I'm wondering what is the best way for the eth driver
to tell userland about it's link status. I'd like to add to Paul's pmud a
way to have scripts run when the link goes down and up. (basically, this
would ifdown eth0 completely to remove it from the router, change my
default route to the one I need for PPP, etc...)


-- 
           E-Mail: <mailto:bh40@calva.net>
BenH.      Web   : <http://calvaweb.calvacom.fr/bh40/>


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

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

* Re: patches: MacOS-like Wallstreet sound in/out controls
  1999-09-19  8:54 Benjamin Herrenschmidt
@ 1999-09-19 16:15 ` Joseph Garcia
  1999-09-19 16:54   ` Shaw Terwilliger
  0 siblings, 1 reply; 5+ messages in thread
From: Joseph Garcia @ 1999-09-19 16:15 UTC (permalink / raw)
  To: linuxppc-dev@lists.linuxppc.org


Benjamin Herrenschmidt wrote:
> A better solution would  be to make the appropriate infos available to
> userland (eventually via a private ioctl of the sound driver). Then, we
> could have an optional damon handling all this automatically that can be
> unplugged for people who like controlling everything manually. If no-one
> have time to write this, then you may include the patches anyway but
> wrapped in a compile option. (I'd like the volume button patch anyway).
> 
> On a similar way, I'm wondering what is the best way for the eth driver
> to tell userland about it's link status. I'd like to add to Paul's pmud a
> way to have scripts run when the link goes down and up. (basically, this
> would ifdown eth0 completely to remove it from the router, change my
> default route to the one I need for PPP, etc...)

since we aren't psychics, the daemon should have a configuration and script
place in /etc (/etc/pmu?).  the config would allow the user to control some
standard responses on how it acts internally. (like volume control, switching,
etc)  then the option to do additional things in scripts.  Given the potential
flexibility people may want, does this mean C is too static, and thus perl or
another more script-friendly language should be used?

If all goes well, we may eventually have a "apmd" for ppc.  any reason we
shouldn't try to use apmd as a framework?  have a so-called "apmd-compatibility"
mode where we can use the standard PC apmd as our frontend?  or does it not have
features like eth detect, so its not worth the bother?  (never had a pc laptop)

a few ideas from a peanut.

-- 
Joseph P. Garcia      jpgarcia@execpc.com      jpgarcia@lidar.ssec.wisc.edu
CS Undergraduate                      Student Employee - Systems Programmer
University of Wisconsin - Madison                            UW Lidar Group

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

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

* Re: patches: MacOS-like Wallstreet sound in/out controls
  1999-09-19 16:15 ` Joseph Garcia
@ 1999-09-19 16:54   ` Shaw Terwilliger
  0 siblings, 0 replies; 5+ messages in thread
From: Shaw Terwilliger @ 1999-09-19 16:54 UTC (permalink / raw)
  To: Joseph Garcia; +Cc: linuxppc-dev@lists.linuxppc.org


Joseph Garcia wrote:
> since we aren't psychics, the daemon should have a configuration and script
> place in /etc (/etc/pmu?).  the config would allow the user to control some
> standard responses on how it acts internally. (like volume control, switching,
> etc)  then the option to do additional things in scripts.  Given the potential
> flexibility people may want, does this mean C is too static, and thus perl or
> another more script-friendly language should be used?

ALSA takes a reasonable approach to this problem; there's a user-space
utility called alsactl that can read a simple configuration file and
apply those values to the hardware or read the settings from the hardware
and write them to a file.  Normally this program is used during startup
and shutdown, to keep mixer settings between them.  A daemon would be
more appropriate for sleep or other PMU events.

Also, does anyone have a solution to my Lombard audio problem?
After a snooze, it comes back up and my audio is gone.  The kernel
driver seems to be there (mixers remember all previous levels and
can set new ones), and user-space access to /dev/dsp and /dev/audio
works, but nothing comes out of the speakers.

-- 
Shaw Terwilliger (sterwill@io.nu)

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

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

end of thread, other threads:[~1999-09-19 16:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-09-19  6:55 patches: MacOS-like Wallstreet sound in/out controls Joseph Garcia
1999-09-19  7:55 ` Dan Malek
  -- strict thread matches above, loose matches on Subject: below --
1999-09-19  8:54 Benjamin Herrenschmidt
1999-09-19 16:15 ` Joseph Garcia
1999-09-19 16:54   ` Shaw Terwilliger

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