diff options
author | Vipulkumar Paladiya <vipul-p@ti.com> | 2011-09-01 14:27:27 -0500 |
---|---|---|
committer | Simon Wilson <simonwilson@google.com> | 2011-09-02 15:34:27 -0700 |
commit | 86c248577618fee8d10bee8713a1e720c97fa604 (patch) | |
tree | f7921bbae288a63549407eaddf99a944594632db /sound | |
parent | 4a90962959412904d19071ebd0f08667d6381cd1 (diff) | |
download | kernel_samsung_tuna-86c248577618fee8d10bee8713a1e720c97fa604.zip kernel_samsung_tuna-86c248577618fee8d10bee8713a1e720c97fa604.tar.gz kernel_samsung_tuna-86c248577618fee8d10bee8713a1e720c97fa604.tar.bz2 |
ASoC: ABE: Set DL1/DL2 gains to -7dB for PDM links
There is gain of around 7dB in the PDM DAC path within the codec.
This patch does -7dB attenuation which will give net 0dB gain.
Change-Id: I13f4842559da688980b8478d59ac4c97cc3908a3
Signed-off-by: Vipulkumar Paladiya <vipul-p@ti.com>
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/omap/abe/abe_def.h | 1 | ||||
-rw-r--r-- | sound/soc/omap/abe/abe_main.h | 1 | ||||
-rw-r--r-- | sound/soc/omap/omap-abe.c | 8 |
3 files changed, 6 insertions, 4 deletions
diff --git a/sound/soc/omap/abe/abe_def.h b/sound/soc/omap/abe/abe_def.h index ac1d263..0051bab 100644 --- a/sound/soc/omap/abe/abe_def.h +++ b/sound/soc/omap/abe/abe_def.h @@ -233,6 +233,7 @@ /* default gain = 1 */ #define GAIN_0dB 0L #define GAIN_M6dB -600L +#define GAIN_M7dB -700L #define GAIN_M12dB -1200L #define GAIN_M18dB -1800L #define GAIN_M24dB -2400L diff --git a/sound/soc/omap/abe/abe_main.h b/sound/soc/omap/abe/abe_main.h index 21965ef..fa88384 100644 --- a/sound/soc/omap/abe/abe_main.h +++ b/sound/soc/omap/abe/abe_main.h @@ -298,6 +298,7 @@ /* default gain = 1 */ #define GAIN_0dB 0L #define GAIN_M6dB -600L +#define GAIN_M7dB -700L #define GAIN_M12dB -1200L #define GAIN_M18dB -1800L #define GAIN_M24dB -2400L diff --git a/sound/soc/omap/omap-abe.c b/sound/soc/omap/omap-abe.c index c418e66..316173a 100644 --- a/sound/soc/omap/omap-abe.c +++ b/sound/soc/omap/omap-abe.c @@ -212,15 +212,15 @@ static void unmute_be(struct snd_soc_pcm_runtime *be, if (stream == SNDRV_PCM_STREAM_PLAYBACK) { switch (be->dai_link->be_id) { case OMAP_ABE_DAI_PDM_DL1: - abe_write_gain(GAINS_DL1, GAIN_0dB, RAMP_5MS, + abe_write_gain(GAINS_DL1, GAIN_M7dB, RAMP_5MS, GAIN_LEFT_OFFSET); - abe_write_gain(GAINS_DL1, GAIN_0dB, RAMP_5MS, + abe_write_gain(GAINS_DL1, GAIN_M7dB, RAMP_5MS, GAIN_RIGHT_OFFSET); break; case OMAP_ABE_DAI_PDM_DL2: - abe_write_gain(GAINS_DL2, GAIN_0dB, RAMP_5MS, + abe_write_gain(GAINS_DL2, GAIN_M7dB, RAMP_5MS, GAIN_LEFT_OFFSET); - abe_write_gain(GAINS_DL2, GAIN_0dB, RAMP_5MS, + abe_write_gain(GAINS_DL2, GAIN_M7dB, RAMP_5MS, GAIN_RIGHT_OFFSET); break; case OMAP_ABE_DAI_PDM_VIB: |