[alsa-devel] FIXME for Rear Channels of CMI8738, how do i write a softvol to fix this defect?

Takashi Iwai tiwai at suse.de
Wed May 9 15:03:32 CEST 2007

At Mon, 7 May 2007 14:10:18 -0700,
John L. Utz III wrote:
> Hello;
> the CMI8738 allows for 4 channel output by providing a second DAC, but
> sadly the hardware has no volume control for said second DAC.
> A review of /usr/share/alsa/cards/CMI8738-MC6.conf shows that the
> implementor of said file was aware of the need to fix the problem:
> # 2nd DAC
> # FIXME: we need a volume attenuator for rear channel.
> CMI8738-MC6.pcm.rear.0 {
>         @args [ CARD ]
>         @args.CARD {
>                 type string
>         }
>         type hw
>         card $CARD
>         device 1
> }
> I'd really like to fix this!
> Is it fixable by creating a softvol plugin?
> http://www.alsa-project.org/alsa-doc/alsa-lib/pcm_plugins.html#pcm_plugins
> so, if i have to invoke speaker test with -Dhw:0,1 to get 4 channel
> out, what does that tell me about how i need to configure a softvol for
> this item?
> Or am i missing the point and it's actually the *driver* that needs to
> be doctored up to provide a softvol implementation. If so, how?

For using the rear PCM defined in the above, you must use "rear" PCM
as it's named, not hw:0,1, such as
	% aplay -Drear foo.wav

The softvol implementation is easy.  See CMI8738-MC8.conf as a
reference.  Note that you should use a different mixer name instead of
"PCM Playback Volume".  If an existing control name is specified,
softvol will be skipped automatically.  Use "Rear Playback Volume"
instead, for example.


More information about the Alsa-devel mailing list