Skip to content
Commit d313e0a8 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

ALSA: hda - Add a fake stereo amp register support



HD-audio spec is inconvenient regarding the handling of stereo volume
controls.  It can set and get only single channel at once (although
there is a special option to set the same value to both channels).
This patch provides a fake pseudo-register via the regmap access so
that the stereo channels can be read and written by a single call.
It'd be useful, for example, for implementing DAPM widgets.

A stereo amp pseudo register consists of the encoding like the normal
amp verbs but it has both SET_LEFT (bit 13) and SET_RIGHT (bit 12)
bits set.  The regmap reads and writes a 16bit value for this pseudo
register where the upper 8bit is for the right chanel and the lower
8bit for the left channel.

Note that the driver doesn't recognize conflicts when both stereo and
mono channel registers are mixed.  Mixing them would certainly confuse
the operation.  So, use carefully.

Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent a551d914
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment