mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +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> Conflicts: arch/arm/boot/dts/amlogic/tl1_t962x2_x301_1g.dts arch/arm64/boot/dts/amlogic/tl1_t962x2_t309.dts arch/arm64/boot/dts/amlogic/tl1_t962x2_x301_1g.dts arch/arm64/boot/dts/amlogic/tl1_t962x2_x301_2g.dts sound/soc/codecs/amlogic/ad82584f.c
This commit is contained in:
@@ -14430,6 +14430,7 @@ F: include/linux/amlogic/meson_cooldev.h
|
||||
AMLOGIC G12A Audio DRIVER
|
||||
M: Xing Wang <xing.wang@amlogic.com>
|
||||
F: sound/soc/amlogic/auge/*
|
||||
F: sound/soc/codec/amlogic/*
|
||||
|
||||
AMLOGIC G12A BL_EXTERN LP8556 DRIVER
|
||||
M: Weiming Liu <weiming.liu@amlogic.com>
|
||||
|
||||
@@ -203,7 +203,7 @@
|
||||
};
|
||||
tdmacodec: codec {
|
||||
//sound-dai = <&dummy_codec>;
|
||||
sound-dai = <&ad82584f &tl1_codec>;
|
||||
sound-dai = </*&ad82584f*/ &tl1_codec>;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -301,6 +301,7 @@
|
||||
};
|
||||
tdmacodec: codec {
|
||||
//sound-dai = <&dummy_codec>;
|
||||
prefix-names = "AMP";
|
||||
sound-dai = <&ad82584f &tl1_codec>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -204,6 +204,7 @@
|
||||
};
|
||||
tdmacodec: codec {
|
||||
//sound-dai = <&dummy_codec>;
|
||||
prefix-names = "AMP";
|
||||
sound-dai = <&ad82584f &tl1_codec>;
|
||||
};
|
||||
};
|
||||
|
||||
1920
arch/arm/boot/dts/amlogic/tl1_t962x2_x301_1g.dts
Normal file
1920
arch/arm/boot/dts/amlogic/tl1_t962x2_x301_1g.dts
Normal file
File diff suppressed because it is too large
Load Diff
1819
arch/arm64/boot/dts/amlogic/tl1_t962x2_t309.dts
Normal file
1819
arch/arm64/boot/dts/amlogic/tl1_t962x2_t309.dts
Normal file
File diff suppressed because it is too large
Load Diff
1880
arch/arm64/boot/dts/amlogic/tl1_t962x2_x301_1g.dts
Normal file
1880
arch/arm64/boot/dts/amlogic/tl1_t962x2_x301_1g.dts
Normal file
File diff suppressed because it is too large
Load Diff
1875
arch/arm64/boot/dts/amlogic/tl1_t962x2_x301_2g.dts
Normal file
1875
arch/arm64/boot/dts/amlogic/tl1_t962x2_x301_2g.dts
Normal file
File diff suppressed because it is too large
Load Diff
@@ -137,7 +137,8 @@ struct tdm_chipinfo tm2_tdma_chipinfo = {
|
||||
.sclk_ws_inv = true,
|
||||
.oe_fn = true,
|
||||
.same_src_fn = true,
|
||||
.lane_cnt = LANE_MAX1,
|
||||
.adc_fn = true,
|
||||
.lane_cnt = LANE_MAX3,
|
||||
};
|
||||
|
||||
struct tdm_chipinfo tm2_tdmb_chipinfo = {
|
||||
@@ -145,7 +146,8 @@ struct tdm_chipinfo tm2_tdmb_chipinfo = {
|
||||
.sclk_ws_inv = true,
|
||||
.oe_fn = true,
|
||||
.same_src_fn = true,
|
||||
.lane_cnt = LANE_MAX3,
|
||||
.adc_fn = true,
|
||||
.lane_cnt = LANE_MAX1,
|
||||
};
|
||||
|
||||
struct tdm_chipinfo tm2_tdmc_chipinfo = {
|
||||
@@ -153,6 +155,7 @@ struct tdm_chipinfo tm2_tdmc_chipinfo = {
|
||||
.sclk_ws_inv = true,
|
||||
.oe_fn = true,
|
||||
.same_src_fn = true,
|
||||
.adc_fn = true,
|
||||
.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 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),
|
||||
SOC_SINGLE_TLV("AMP Ch1 Volume", C1VOL, 0,
|
||||
SOC_SINGLE_TLV("Ch1 Volume", C1VOL, 0,
|
||||
0xff, 1, chvol_tlv),
|
||||
SOC_SINGLE_TLV("AMP Ch2 Volume", C2VOL, 0,
|
||||
SOC_SINGLE_TLV("Ch2 Volume", C2VOL, 0,
|
||||
0xff, 1, chvol_tlv),
|
||||
|
||||
SOC_SINGLE("AMP Ch1 Switch", MUTE, 5, 1, 1),
|
||||
SOC_SINGLE("AMP Ch2 Switch", MUTE, 4, 1, 1),
|
||||
SOC_SINGLE("Ch1 Switch", MUTE, 5, 1, 1),
|
||||
SOC_SINGLE("Ch2 Switch", MUTE, 4, 1, 1),
|
||||
};
|
||||
|
||||
static int ad82584f_reg_init(struct snd_soc_codec *codec);
|
||||
@@ -827,8 +827,13 @@ static int ad82584f_init(struct snd_soc_codec *codec)
|
||||
/* eq and drc */
|
||||
ad82584f_set_eq_drc(codec);
|
||||
|
||||
/*unmute,default power-on is mute.*/
|
||||
/*snd_soc_write(codec, 0x02, 0x00);*/
|
||||
/* for de-pop */
|
||||
udelay(100);
|
||||
|
||||
snd_soc_write(codec, MVOL, 0x11);
|
||||
|
||||
/* unmute, default power-on is mute. */
|
||||
snd_soc_write(codec, MUTE, 0x00);
|
||||
|
||||
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[] = {
|
||||
{
|
||||
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
|
||||
.name = "AMP Master Volume",
|
||||
.name = "Master Volume",
|
||||
.info = tas5805m_vol_info,
|
||||
.get = tas5805m_vol_locked_get,
|
||||
.put = tas5805m_vol_locked_put,
|
||||
},
|
||||
{
|
||||
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
|
||||
.name = "AMP Maser Volume Mute",
|
||||
.name = "Maser Volume Mute",
|
||||
.info = tas5805m_mute_info,
|
||||
.get = tas5805m_mute_locked_get,
|
||||
.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),
|
||||
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),
|
||||
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),
|
||||
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),
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user