diff options
author | Jie Yang <yang.jie@intel.com> | 2014-11-28 02:41:28 (GMT) |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-11-28 11:40:30 (GMT) |
commit | c5f0406bdce6eebc9147a54f4be0250618d3a423 (patch) | |
tree | 8b98b99ffe0b9863062875f40eeca1c0806907e4 /sound/soc/intel | |
parent | 525b8634d8dee0e3a8409a73ef5f22ac8676a8c4 (diff) | |
download | linux-c5f0406bdce6eebc9147a54f4be0250618d3a423.tar.xz |
ASoC: Intel: Correct the xmax volume
The xmax volume should be corrected to ARRAY_SIZE(volume_map)-1, otherwise,
the xmax value will be mapped to 0 wrongly.
Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel')
-rw-r--r-- | sound/soc/intel/sst-haswell-pcm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/soc/intel/sst-haswell-pcm.c b/sound/soc/intel/sst-haswell-pcm.c index 7aa348d..f993079 100644 --- a/sound/soc/intel/sst-haswell-pcm.c +++ b/sound/soc/intel/sst-haswell-pcm.c @@ -298,19 +298,19 @@ static const DECLARE_TLV_DB_SCALE(hsw_vol_tlv, -9000, 300, 1); static const struct snd_kcontrol_new hsw_volume_controls[] = { /* Global DSP volume */ SOC_DOUBLE_EXT_TLV("Master Playback Volume", 0, 0, 8, - ARRAY_SIZE(volume_map) -1, 0, + ARRAY_SIZE(volume_map) - 1, 0, hsw_volume_get, hsw_volume_put, hsw_vol_tlv), /* Offload 0 volume */ SOC_DOUBLE_EXT_TLV("Media0 Playback Volume", 1, 0, 8, - ARRAY_SIZE(volume_map), 0, + ARRAY_SIZE(volume_map) - 1, 0, hsw_stream_volume_get, hsw_stream_volume_put, hsw_vol_tlv), /* Offload 1 volume */ SOC_DOUBLE_EXT_TLV("Media1 Playback Volume", 2, 0, 8, - ARRAY_SIZE(volume_map), 0, + ARRAY_SIZE(volume_map) - 1, 0, hsw_stream_volume_get, hsw_stream_volume_put, hsw_vol_tlv), /* Mic Capture volume */ SOC_DOUBLE_EXT_TLV("Mic Capture Volume", 4, 0, 8, - ARRAY_SIZE(volume_map), 0, + ARRAY_SIZE(volume_map) - 1, 0, hsw_stream_volume_get, hsw_stream_volume_put, hsw_vol_tlv), }; |