ASoC: soc: msm: add SRS support for msm8916

Add entry in Kconfig file for SRS
Add the Mixer control SRS TruMedia
MI2S

Change-Id: Ib4fbe36dd781704714605696948ee4cb99c1c334
Signed-off-by: Sharad Sangle <assangle@codeaurora.org>
This commit is contained in:
Sharad Sangle 2014-03-28 18:10:10 +05:30
parent 13d2006212
commit 6bf9d68803
2 changed files with 36 additions and 1 deletions

View file

@ -251,6 +251,7 @@ config SND_SOC_MSM8X16
select SND_SOC_MSM8X16_WCD
select SND_DYNAMIC_MINORS
select QTI_PP
select DTS_SRS_TM
help
To add support for SoC audio on MSM8X16.
This will enable sound soc drivers which

View file

@ -173,7 +173,18 @@ static int msm_dts_srs_trumedia_control_i2s_set(struct snd_kcontrol *kcontrol,
msm_pcm_routing_release_lock();
return ret;
}
static int msm_dts_srs_trumedia_control_mi2s_set(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
int ret, port_id;
pr_debug("SRS control MI2S called");
msm_pcm_routing_acquire_lock();
port_id = AFE_PORT_ID_PRIMARY_MI2S_RX;
ret = msm_dts_srs_trumedia_control_set_(port_id, kcontrol, ucontrol);
msm_pcm_routing_release_lock();
return ret;
}
static int msm_dts_srs_trumedia_control_hdmi_set(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
@ -246,7 +257,27 @@ static const struct snd_kcontrol_new lpa_srs_trumedia_controls_i2s[] = {
})
}
};
static const struct snd_kcontrol_new lpa_srs_trumedia_controls_mi2s[] = {
{
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "SRS TruMedia MI2S",
.access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |
SNDRV_CTL_ELEM_ACCESS_READWRITE,
.info = snd_soc_info_volsw,
.get = msm_dts_srs_trumedia_control_get,
.put = msm_dts_srs_trumedia_control_mi2s_set,
.private_value = ((unsigned long)&(struct soc_mixer_control)
{
.reg = SND_SOC_NOPM,
.rreg = SND_SOC_NOPM,
.shift = 0,
.rshift = 0,
.max = 0xFFFFFFFF,
.platform_max = 0xFFFFFFFF,
.invert = 0
})
}
};
void msm_dts_srs_tm_add_controls(struct snd_soc_platform *platform)
{
snd_soc_add_platform_controls(platform,
@ -260,6 +291,9 @@ void msm_dts_srs_tm_add_controls(struct snd_soc_platform *platform)
snd_soc_add_platform_controls(platform,
lpa_srs_trumedia_controls_i2s,
ARRAY_SIZE(lpa_srs_trumedia_controls_i2s));
snd_soc_add_platform_controls(platform,
lpa_srs_trumedia_controls_mi2s,
ARRAY_SIZE(lpa_srs_trumedia_controls_mi2s));
}
void msm_dts_srs_tm_deinit(int port_id)