* OSS volume mapping (Re: [Alsa-user] SBLive, OSS mixer (PCM/Master) + digital out)
[not found] ` <200208221734.50898.martin_fiedler@web.de>
@ 2002-08-23 10:05 ` Takashi Iwai
[not found] ` <200208232122.11425.martin_fiedler@web.de>
0 siblings, 1 reply; 2+ messages in thread
From: Takashi Iwai @ 2002-08-23 10:05 UTC (permalink / raw)
To: Martin Fiedler; +Cc: alsa-user, alsa-devel
At Thu, 22 Aug 2002 17:34:50 +0200,
Martin Fiedler wrote:
>
> Hi!
>
> Am Donnerstag, 22. August 2002 15:22 schrieb Takashi Iwai:
> > no, it's not possible.
> > so far, each OSS mixer is hard-coded to the alsa mixer element, such
> > as "Master" or "PCM".
> >
> > you can change the driver code (alsa-kernel/core/oss/mixer_oss.c)
> > but of course it's not a common solution...
>
> well... works for me ;-)
>
> I changed SOUND_MIXER_PCM to "Wave", it was "PCM" before.
right now i committed small changes for oss mixer emulation code to
cvs.
now a new proc file /proc/asound/card*/oss_mixer is created when
snd-mixer-oss is loaded (together with the alsa driver, too).
this file lists the supported OSS volume elements and the
corresponding ALSA control name and index.
and, you can _write_ to this file (only as root), in order to change
the mapping. i.e. you don't have to change the source code any more,
but just do like this:
# echo 'PCM "Wave" 0' > /proc/asound/card0/oss_mixer
this will be nice also for ICE1712. DAC or ADC volume can be mapped
to any OSS mixer elements, so that usual oss mixer applications can
control them.
the information is not kept if you reload the driver. however,
restoring it is easy.
you can save all the contents like this
cat /proc/asound/card0/oss_mixer > /somehwere/saved
and restore it (as root, again) via
cat /somewhere/saved > /proc/asound/card0/oss_mixer
> Sideeffect:
> if you adjust PCM with any OSS mixer (or xmms) alsamixer shows that Wave _and_
> Wave Capture is adjusted. I don't know what Wave Capture is so I don't care
> for now.
"Wave Capture Volume" defines the amount of signals to be routed from
Wave to Capture. if you set 100%, you can record the wave which is
being played. it's a feature of emu10k1, not AC97.
ciao,
Takashi
-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone? Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
^ permalink raw reply [flat|nested] 2+ messages in thread