mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
audio: TM2 bringup: enable ADC for linein [1/1]
PD#SWPL-7027 Problem: audio path AVin is on audio Solution: enable ADC for linein Verify: Verify on AB311 Change-Id: Iea1d694e0b605d62596635d85416d33f56dbbcb2 Signed-off-by: Zhe Wang <Zhe.Wang@amlogic.com>
This commit is contained in:
@@ -309,7 +309,7 @@
|
|||||||
};
|
};
|
||||||
tdmacodec: codec {
|
tdmacodec: codec {
|
||||||
//sound-dai = <&dummy_codec>;
|
//sound-dai = <&dummy_codec>;
|
||||||
sound-dai = <&ad82584f &tl1_codec>;
|
sound-dai = </*&ad82584f*/ &tl1_codec>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -317,6 +317,7 @@
|
|||||||
};
|
};
|
||||||
tdmacodec: codec {
|
tdmacodec: codec {
|
||||||
//sound-dai = <&dummy_codec>;
|
//sound-dai = <&dummy_codec>;
|
||||||
|
prefix-names = "AMP";
|
||||||
sound-dai = <&ad82584f &tl1_codec>;
|
sound-dai = <&ad82584f &tl1_codec>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -324,6 +324,7 @@
|
|||||||
};
|
};
|
||||||
tdmacodec: codec {
|
tdmacodec: codec {
|
||||||
//sound-dai = <&dummy_codec>;
|
//sound-dai = <&dummy_codec>;
|
||||||
|
prefix-names = "AMP";
|
||||||
sound-dai = <&ad82584f &tl1_codec>;
|
sound-dai = <&ad82584f &tl1_codec>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -319,6 +319,7 @@
|
|||||||
};
|
};
|
||||||
tdmacodec: codec {
|
tdmacodec: codec {
|
||||||
//sound-dai = <&dummy_codec>;
|
//sound-dai = <&dummy_codec>;
|
||||||
|
prefix-names = "AMP";
|
||||||
sound-dai = <&ad82584f &tl1_codec>;
|
sound-dai = <&ad82584f &tl1_codec>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -321,7 +321,8 @@
|
|||||||
};
|
};
|
||||||
tdmacodec: codec {
|
tdmacodec: codec {
|
||||||
//sound-dai = <&dummy_codec>;
|
//sound-dai = <&dummy_codec>;
|
||||||
sound-dai = <&tl1_codec &tas5805>;
|
prefix-names = "AMP";
|
||||||
|
sound-dai = <&tas5805 &tl1_codec>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -315,6 +315,7 @@
|
|||||||
};
|
};
|
||||||
tdmacodec: codec {
|
tdmacodec: codec {
|
||||||
//sound-dai = <&dummy_codec>;
|
//sound-dai = <&dummy_codec>;
|
||||||
|
prefix-names = "AMP";
|
||||||
sound-dai = <&ad82584f &tl1_codec>;
|
sound-dai = <&ad82584f &tl1_codec>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -321,6 +321,7 @@
|
|||||||
};
|
};
|
||||||
tdmacodec: codec {
|
tdmacodec: codec {
|
||||||
//sound-dai = <&dummy_codec>;
|
//sound-dai = <&dummy_codec>;
|
||||||
|
prefix-names = "AMP";
|
||||||
sound-dai = <&ad82584f &tl1_codec>;
|
sound-dai = <&ad82584f &tl1_codec>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -315,6 +315,7 @@
|
|||||||
};
|
};
|
||||||
tdmacodec: codec {
|
tdmacodec: codec {
|
||||||
//sound-dai = <&dummy_codec>;
|
//sound-dai = <&dummy_codec>;
|
||||||
|
prefix-names = "AMP";
|
||||||
sound-dai = <&ad82584f &tl1_codec>;
|
sound-dai = <&ad82584f &tl1_codec>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -318,7 +318,8 @@
|
|||||||
};
|
};
|
||||||
tdmacodec: codec {
|
tdmacodec: codec {
|
||||||
//sound-dai = <&dummy_codec>;
|
//sound-dai = <&dummy_codec>;
|
||||||
sound-dai = <&tl1_codec &tas5805>;
|
prefix-names = "AMP";
|
||||||
|
sound-dai = <&tas5805 &tl1_codec>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -137,7 +137,8 @@ struct tdm_chipinfo tm2_tdma_chipinfo = {
|
|||||||
.sclk_ws_inv = true,
|
.sclk_ws_inv = true,
|
||||||
.oe_fn = true,
|
.oe_fn = true,
|
||||||
.same_src_fn = true,
|
.same_src_fn = true,
|
||||||
.lane_cnt = LANE_MAX1,
|
.adc_fn = true,
|
||||||
|
.lane_cnt = LANE_MAX3,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct tdm_chipinfo tm2_tdmb_chipinfo = {
|
struct tdm_chipinfo tm2_tdmb_chipinfo = {
|
||||||
@@ -145,7 +146,8 @@ struct tdm_chipinfo tm2_tdmb_chipinfo = {
|
|||||||
.sclk_ws_inv = true,
|
.sclk_ws_inv = true,
|
||||||
.oe_fn = true,
|
.oe_fn = true,
|
||||||
.same_src_fn = true,
|
.same_src_fn = true,
|
||||||
.lane_cnt = LANE_MAX3,
|
.adc_fn = true,
|
||||||
|
.lane_cnt = LANE_MAX1,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct tdm_chipinfo tm2_tdmc_chipinfo = {
|
struct tdm_chipinfo tm2_tdmc_chipinfo = {
|
||||||
@@ -153,6 +155,7 @@ struct tdm_chipinfo tm2_tdmc_chipinfo = {
|
|||||||
.sclk_ws_inv = true,
|
.sclk_ws_inv = true,
|
||||||
.oe_fn = true,
|
.oe_fn = true,
|
||||||
.same_src_fn = true,
|
.same_src_fn = true,
|
||||||
|
.adc_fn = true,
|
||||||
.lane_cnt = LANE_MAX1,
|
.lane_cnt = LANE_MAX1,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -36,15 +36,15 @@ static const DECLARE_TLV_DB_SCALE(mvol_tlv, -10300, 50, 1);
|
|||||||
static const DECLARE_TLV_DB_SCALE(chvol_tlv, -10300, 50, 1);
|
static const DECLARE_TLV_DB_SCALE(chvol_tlv, -10300, 50, 1);
|
||||||
|
|
||||||
static const struct snd_kcontrol_new ad82584f_snd_controls[] = {
|
static const struct snd_kcontrol_new ad82584f_snd_controls[] = {
|
||||||
SOC_SINGLE_TLV("AMP Master Volume", MVOL, 0,
|
SOC_SINGLE_TLV("Master Volume", MVOL, 0,
|
||||||
0xff, 1, mvol_tlv),
|
0xff, 1, mvol_tlv),
|
||||||
SOC_SINGLE_TLV("AMP Ch1 Volume", C1VOL, 0,
|
SOC_SINGLE_TLV("Ch1 Volume", C1VOL, 0,
|
||||||
0xff, 1, chvol_tlv),
|
0xff, 1, chvol_tlv),
|
||||||
SOC_SINGLE_TLV("AMP Ch2 Volume", C2VOL, 0,
|
SOC_SINGLE_TLV("Ch2 Volume", C2VOL, 0,
|
||||||
0xff, 1, chvol_tlv),
|
0xff, 1, chvol_tlv),
|
||||||
|
|
||||||
SOC_SINGLE("AMP Ch1 Switch", MUTE, 5, 1, 1),
|
SOC_SINGLE("Ch1 Switch", MUTE, 5, 1, 1),
|
||||||
SOC_SINGLE("AMP Ch2 Switch", MUTE, 4, 1, 1),
|
SOC_SINGLE("Ch2 Switch", MUTE, 4, 1, 1),
|
||||||
};
|
};
|
||||||
|
|
||||||
static int ad82584f_reg_init(struct snd_soc_codec *codec);
|
static int ad82584f_reg_init(struct snd_soc_codec *codec);
|
||||||
@@ -830,8 +830,10 @@ static int ad82584f_init(struct snd_soc_codec *codec)
|
|||||||
/* for de-pop */
|
/* for de-pop */
|
||||||
udelay(100);
|
udelay(100);
|
||||||
|
|
||||||
|
snd_soc_write(codec, MVOL, 0x11);
|
||||||
|
|
||||||
/* unmute, default power-on is mute. */
|
/* unmute, default power-on is mute. */
|
||||||
snd_soc_write(codec, 0x02, 0x00);
|
snd_soc_write(codec, MUTE, 0x00);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -920,25 +920,25 @@ static int tas5805_get_EQ_param(struct snd_kcontrol *kcontrol,
|
|||||||
static const struct snd_kcontrol_new tas5805m_vol_control[] = {
|
static const struct snd_kcontrol_new tas5805m_vol_control[] = {
|
||||||
{
|
{
|
||||||
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
|
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
|
||||||
.name = "AMP Master Volume",
|
.name = "Master Volume",
|
||||||
.info = tas5805m_vol_info,
|
.info = tas5805m_vol_info,
|
||||||
.get = tas5805m_vol_locked_get,
|
.get = tas5805m_vol_locked_get,
|
||||||
.put = tas5805m_vol_locked_put,
|
.put = tas5805m_vol_locked_put,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
|
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
|
||||||
.name = "AMP Maser Volume Mute",
|
.name = "Maser Volume Mute",
|
||||||
.info = tas5805m_mute_info,
|
.info = tas5805m_mute_info,
|
||||||
.get = tas5805m_mute_locked_get,
|
.get = tas5805m_mute_locked_get,
|
||||||
.put = tas5805m_mute_locked_put,
|
.put = tas5805m_mute_locked_put,
|
||||||
},
|
},
|
||||||
SOC_SINGLE_BOOL_EXT("AMP Set EQ Enable", 0,
|
SOC_SINGLE_BOOL_EXT("Set EQ Enable", 0,
|
||||||
tas5805_get_EQ_enum, tas5805_set_EQ_enum),
|
tas5805_get_EQ_enum, tas5805_set_EQ_enum),
|
||||||
SOC_SINGLE_BOOL_EXT("AMP Set DRC Enable", 0,
|
SOC_SINGLE_BOOL_EXT("Set DRC Enable", 0,
|
||||||
tas5805_get_DRC_enum, tas5805_set_DRC_enum),
|
tas5805_get_DRC_enum, tas5805_set_DRC_enum),
|
||||||
SND_SOC_BYTES_EXT("AMP EQ table", TAS5805_EQ_LENGTH,
|
SND_SOC_BYTES_EXT("EQ table", TAS5805_EQ_LENGTH,
|
||||||
tas5805_get_EQ_param, tas5805_set_EQ_param),
|
tas5805_get_EQ_param, tas5805_set_EQ_param),
|
||||||
SND_SOC_BYTES_EXT("AMP DRC table", TAS5805_DRC_PARAM_COUNT,
|
SND_SOC_BYTES_EXT("DRC table", TAS5805_DRC_PARAM_COUNT,
|
||||||
tas5805_get_DRC_param, tas5805_set_DRC_param),
|
tas5805_get_DRC_param, tas5805_set_DRC_param),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user