aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_local.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-01-20 07:07:55 -0500
committerTakashi Iwai <tiwai@suse.de>2009-01-20 09:16:47 -0500
commit29fdbec2dcb1ce364812778271056aa9516ff3ed (patch)
treeb5d423645023b018b7e7de4e769c2f35d28e7885 /sound/pci/hda/hda_local.h
parent989738c4f82126207b9e04c9395b78e544f3d33c (diff)
ALSA: hda - Add extra volume offset to standard volume amp macros
Added the volume offset to base for the standard volume controls to handle elements with too big volume scales like -96dB..0dB. For such elements, you can set the base volume to reduce the range. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_local.h')
-rw-r--r--sound/pci/hda/hda_local.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h
index 1dd8716c387f..d53ce1f85419 100644
--- a/sound/pci/hda/hda_local.h
+++ b/sound/pci/hda/hda_local.h
@@ -26,8 +26,10 @@
26/* 26/*
27 * for mixer controls 27 * for mixer controls
28 */ 28 */
29#define HDA_COMPOSE_AMP_VAL_OFS(nid,chs,idx,dir,ofs) \
30 ((nid) | ((chs)<<16) | ((dir)<<18) | ((idx)<<19) | ((ofs)<<23))
29#define HDA_COMPOSE_AMP_VAL(nid,chs,idx,dir) \ 31#define HDA_COMPOSE_AMP_VAL(nid,chs,idx,dir) \
30 ((nid) | ((chs)<<16) | ((dir)<<18) | ((idx)<<19)) 32 HDA_COMPOSE_AMP_VAL_OFS(nid, chs, idx, dir, 0)
31/* mono volume with index (index=0,1,...) (channel=1,2) */ 33/* mono volume with index (index=0,1,...) (channel=1,2) */
32#define HDA_CODEC_VOLUME_MONO_IDX(xname, xcidx, nid, channel, xindex, direction) \ 34#define HDA_CODEC_VOLUME_MONO_IDX(xname, xcidx, nid, channel, xindex, direction) \
33 { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xcidx, \ 35 { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xcidx, \
@@ -456,6 +458,7 @@ int snd_hda_check_amp_list_power(struct hda_codec *codec,
456#define get_amp_channels(kc) (((kc)->private_value >> 16) & 0x3) 458#define get_amp_channels(kc) (((kc)->private_value >> 16) & 0x3)
457#define get_amp_direction(kc) (((kc)->private_value >> 18) & 0x1) 459#define get_amp_direction(kc) (((kc)->private_value >> 18) & 0x1)
458#define get_amp_index(kc) (((kc)->private_value >> 19) & 0xf) 460#define get_amp_index(kc) (((kc)->private_value >> 19) & 0xf)
461#define get_amp_offset(kc) (((kc)->private_value >> 23) & 0x3f)
459 462
460/* 463/*
461 * CEA Short Audio Descriptor data 464 * CEA Short Audio Descriptor data