All of lore.kernel.org
 help / color / mirror / Atom feed
* Userspace drivers
@ 2007-09-26 19:28 Josh Litherland
  2007-09-27  1:35 ` Tobin Davis
  2007-09-27 12:54 ` Rene Herman
  0 siblings, 2 replies; 6+ messages in thread
From: Josh Litherland @ 2007-09-26 19:28 UTC (permalink / raw)
  To: alsa-devel

Is there any facility for developing an ALSA device driver in
userspace?  I'm particularly interested in mixer devices; my goal is
to expose the Thinkpad hardware volume buttons as an ALSA mixer.

Thanks for any pointers!

-- 
Josh Litherland (josh@temp123.org)

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

* Re: Userspace drivers
  2007-09-26 19:28 Userspace drivers Josh Litherland
@ 2007-09-27  1:35 ` Tobin Davis
  2007-09-27 14:06   ` Josh Litherland
  2007-09-27 12:54 ` Rene Herman
  1 sibling, 1 reply; 6+ messages in thread
From: Tobin Davis @ 2007-09-27  1:35 UTC (permalink / raw)
  To: Josh Litherland; +Cc: alsa-devel

On Wed, 2007-09-26 at 15:28 -0400, Josh Litherland wrote:

> Is there any facility for developing an ALSA device driver in
> userspace?  I'm particularly interested in mixer devices; my goal is
> to expose the Thinkpad hardware volume buttons as an ALSA mixer.
> 
> Thanks for any pointers!
> 


The volume buttons should be supported by either acpi controls or
keyboard settings.  Try running showkey and seeing if they trigger
keycodes.  Once you have those, you could map them to a macro that
adjusts volume through amixer.  I know that there are applets for KDE to
support the thinkpad keys, there may be others as well.


-- 
Tobin Davis  


Today's weirdness is tomorrow's reason why.
		-- Hunter S. Thompson

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

* Re: Userspace drivers
  2007-09-26 19:28 Userspace drivers Josh Litherland
  2007-09-27  1:35 ` Tobin Davis
@ 2007-09-27 12:54 ` Rene Herman
  2007-09-27 14:38   ` Josh Litherland
  1 sibling, 1 reply; 6+ messages in thread
From: Rene Herman @ 2007-09-27 12:54 UTC (permalink / raw)
  To: Josh Litherland; +Cc: alsa-devel

On 09/26/2007 09:28 PM, Josh Litherland wrote:

> Is there any facility for developing an ALSA device driver in userspace?
> I'm particularly interested in mixer devices; my goal is to expose the
> Thinkpad hardware volume buttons as an ALSA mixer.
> 
> Thanks for any pointers!

Most of the cheaper hardware today does volume control in software which 
ALSA supports through the softvol plugin that runs in userspace. I've never 
actually owned any of this hardware but assuming the volume control shows up 
in say alsamixer same as if it had been a hardware control, you'd have an 
example of a userspace volume control there. Actually talking to the buttons 
is another matter ofcourse but it may serve as a useful example of how to 
expose the control through alsa at least.

Or not, comments obviously welcome -- never look at it but also have a use 
in mind...

Rene.

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

* Re: Userspace drivers
  2007-09-27  1:35 ` Tobin Davis
@ 2007-09-27 14:06   ` Josh Litherland
  0 siblings, 0 replies; 6+ messages in thread
From: Josh Litherland @ 2007-09-27 14:06 UTC (permalink / raw)
  To: alsa-devel

On 9/26/07, Tobin Davis <tdavis@dsl-only.net> wrote:
>
>
> The volume buttons should be supported by either acpi controls or keyboard
> settings.  Try running showkey and seeing if they trigger keycodes.  Once
> you have those, you could map them to a macro that adjusts volume through
> amixer.  I know that there are applets for KDE to support the thinkpad keys,
> there may be others as well.
>


It's true; in particular, in Ubuntu, the thinkpad-keys binary from the
hotkey-setup package watches for these key-events, and connects as a
userspace input device to synthesize normal volumeup, volumedown and mute
key events.

Unfortunately, that's not really how  thinkpads work.   =(   They are fairly
unique in that the hardware volume buttons actually control a separate
hardware mixer independent of the sound chip itself, and there is no way
I've seen in open source to prevent them from controlling that phantom
mixer.  So mapping them to also control the sound card's master mixer will
eventually lead to a skew from expected results.

The phantom mixer can, however, be queried and changed through /dev/nvram
and, in recent kernels, in /proc/acpi/ibm and some knobs in /sys.  What I'm
proposing is to expose the phantom mixer as an alsa mixer device.



> -- Tobin Davis
>
> Today's weirdness is tomorrow's reason why.
> 		-- Hunter S. Thompson
>
>


-- 
Josh Litherland (josh@temp123.org)

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

* Re: Userspace drivers
  2007-09-27 12:54 ` Rene Herman
@ 2007-09-27 14:38   ` Josh Litherland
  2007-09-27 15:14     ` Rene Herman
  0 siblings, 1 reply; 6+ messages in thread
From: Josh Litherland @ 2007-09-27 14:38 UTC (permalink / raw)
  To: Rene Herman; +Cc: alsa-devel

On 9/27/07, Rene Herman <rene.herman@keyaccess.nl> wrote:

> assuming the volume control shows up
> in say alsamixer same as if it had been a hardware control, you'd have an
> example of a userspace volume control there

Thanks, this looks like exactly the hook I was needing.  Now to try to
grok it.  =D

-- 
Josh Litherland (josh@temp123.org)

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

* Re: Userspace drivers
  2007-09-27 14:38   ` Josh Litherland
@ 2007-09-27 15:14     ` Rene Herman
  0 siblings, 0 replies; 6+ messages in thread
From: Rene Herman @ 2007-09-27 15:14 UTC (permalink / raw)
  To: Josh Litherland; +Cc: alsa-devel

On 09/27/2007 04:38 PM, Josh Litherland wrote:

> On 9/27/07, Rene Herman <rene.herman@keyaccess.nl> wrote:

[ softvol ]

>> assuming the volume control shows up in say alsamixer same as if it had
>> been a hardware control, you'd have an example of a userspace volume
>> control there
> 
> Thanks, this looks like exactly the hook I was needing. Now to try to 
> grok it. =D

Assuming you do, please report back. I'd like to know how that works as 
well... :-)

Rene

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

end of thread, other threads:[~2007-09-27 15:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-26 19:28 Userspace drivers Josh Litherland
2007-09-27  1:35 ` Tobin Davis
2007-09-27 14:06   ` Josh Litherland
2007-09-27 12:54 ` Rene Herman
2007-09-27 14:38   ` Josh Litherland
2007-09-27 15:14     ` Rene Herman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.