tegra-alt: fixes for kernel-3.18

Use snd_soc_kcontrol_codec() instead of snd_kcontrol_chip().
Put additional T186 ADMAIF channels under macro.

Bug 200100724

Change-Id: I20d280f067414bec16a4f07e38a05b64306cb217
Signed-off-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-on: http://git-master/r/826932
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-by: Nitin Pai <npai@nvidia.com>
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
This commit is contained in:
Viraj Karandikar
2015-11-03 16:09:40 +05:30
committed by Sameer Pujar
parent 0fbbcc3bfe
commit f77c18ee6f
3 changed files with 10 additions and 8 deletions

View File

@@ -470,7 +470,7 @@ static struct snd_soc_dai_ops tegra210_admaif_dai_ops = {
static int tegra210_admaif_get_channels(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
struct soc_mixer_control *mc =
(struct soc_mixer_control *)kcontrol->private_value;
struct tegra210_admaif *admaif = snd_soc_codec_get_drvdata(codec);
@@ -484,7 +484,7 @@ static int tegra210_admaif_put_channels(struct snd_kcontrol *kcontrol,
{
struct soc_mixer_control *mc =
(struct soc_mixer_control *)kcontrol->private_value;
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
struct tegra210_admaif *admaif = snd_soc_codec_get_drvdata(codec);
int value = ucontrol->value.integer.value[0];
@@ -728,6 +728,7 @@ static struct snd_kcontrol_new tegra210_admaif_controls[] = {
TEGRA210_ADMAIF_CHANNEL_CTRL(8),
TEGRA210_ADMAIF_CHANNEL_CTRL(9),
TEGRA210_ADMAIF_CHANNEL_CTRL(10),
#if defined(CONFIG_ARCH_TEGRA_18x_SOC)
TEGRA210_ADMAIF_CHANNEL_CTRL(11),
TEGRA210_ADMAIF_CHANNEL_CTRL(12),
TEGRA210_ADMAIF_CHANNEL_CTRL(13),
@@ -738,6 +739,7 @@ static struct snd_kcontrol_new tegra210_admaif_controls[] = {
TEGRA210_ADMAIF_CHANNEL_CTRL(18),
TEGRA210_ADMAIF_CHANNEL_CTRL(19),
TEGRA210_ADMAIF_CHANNEL_CTRL(20)
#endif
};
static int tegra210_admaif_codec_probe(struct snd_soc_codec *codec)

View File

@@ -509,7 +509,7 @@ static int tegra210_amx_put_byte_map(struct snd_kcontrol *kcontrol,
static int tegra210_amx_get_output_channels(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
struct tegra210_amx *amx = snd_soc_codec_get_drvdata(codec);
ucontrol->value.integer.value[0] = amx->output_channels;
@@ -519,7 +519,7 @@ static int tegra210_amx_get_output_channels(struct snd_kcontrol *kcontrol,
static int tegra210_amx_put_output_channels(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
struct tegra210_amx *amx = snd_soc_codec_get_drvdata(codec);
int value = ucontrol->value.integer.value[0];

View File

@@ -570,7 +570,7 @@ static int tegra210_sfc_init_put(struct snd_kcontrol *kcontrol,
static int tegra210_sfc_get_stereo_conv(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
struct tegra210_sfc *sfc = snd_soc_codec_get_drvdata(codec);
ucontrol->value.integer.value[0] = sfc->stereo_conv_input;
@@ -580,7 +580,7 @@ static int tegra210_sfc_get_stereo_conv(struct snd_kcontrol *kcontrol,
static int tegra210_sfc_put_stereo_conv(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
struct tegra210_sfc *sfc = snd_soc_codec_get_drvdata(codec);
sfc->stereo_conv_input = ucontrol->value.integer.value[0];
@@ -590,7 +590,7 @@ static int tegra210_sfc_put_stereo_conv(struct snd_kcontrol *kcontrol,
static int tegra210_sfc_get_mono_conv(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
struct tegra210_sfc *sfc = snd_soc_codec_get_drvdata(codec);
ucontrol->value.integer.value[0] = sfc->mono_conv_output;
@@ -600,7 +600,7 @@ static int tegra210_sfc_get_mono_conv(struct snd_kcontrol *kcontrol,
static int tegra210_sfc_put_mono_conv(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
struct tegra210_sfc *sfc = snd_soc_codec_get_drvdata(codec);
sfc->mono_conv_output = ucontrol->value.integer.value[0];