mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 21:07:02 +09:00
Richtek5512 codec: fix DAPM error
This commit is contained in:
@@ -184,8 +184,8 @@ static struct rt5512_init_reg init_list[] = {
|
||||
{0x8c , 0x09},
|
||||
{0xec , 0x27c},
|
||||
/*record*/
|
||||
{0x95 , 0xa0},
|
||||
{0x85 , 0x20},
|
||||
{0x95 , 0x82},
|
||||
{0x85 , 0x30},
|
||||
};
|
||||
#define RT5512_INIT_REG_LEN ARRAY_SIZE(init_list)
|
||||
|
||||
@@ -631,9 +631,9 @@ static int rt5512_capture_path_put(struct snd_kcontrol *kcontrol,
|
||||
|
||||
case Main_Mic:
|
||||
RT_DBG(">>>>>>>>>>>>>>>>%s Main_Mic",__FUNCTION__);
|
||||
/*record gain*/
|
||||
/*Mic2 record gain*/
|
||||
snd_soc_update_bits(codec, 0x93, 0x1f, 0x15);
|
||||
snd_soc_update_bits(codec, 0x96, 0x0c, 0x02);
|
||||
snd_soc_update_bits(codec, 0x97, 0x0c, 0x08);
|
||||
snd_soc_dapm_enable_pin(dapm, "Main Mic");
|
||||
snd_soc_dapm_disable_pin(dapm, "LineIn");
|
||||
snd_soc_dapm_sync(dapm);
|
||||
@@ -644,6 +644,9 @@ static int rt5512_capture_path_put(struct snd_kcontrol *kcontrol,
|
||||
|
||||
case Hands_Free_Mic:
|
||||
RT_DBG(">>>>>>>>>>>>>>>>%s Hands_Free_Mic",__FUNCTION__);
|
||||
/*Aux record gain*/
|
||||
snd_soc_update_bits(codec, 0x91, 0x1f, 0x15);
|
||||
snd_soc_update_bits(codec, 0x96, 0xc0, 0x80);
|
||||
snd_soc_dapm_disable_pin(dapm, "Main Mic");
|
||||
snd_soc_dapm_enable_pin(dapm, "LineIn");
|
||||
snd_soc_dapm_sync(dapm);
|
||||
@@ -1162,7 +1165,7 @@ static const struct snd_soc_dapm_widget rt5512_dapm_widgets[] =
|
||||
SND_SOC_DAPM_OUTPUT("RHeadphone"),
|
||||
//MicBias
|
||||
SND_SOC_DAPM_MICBIAS("MicBias1", 0x81, 5, 0),
|
||||
SND_SOC_DAPM_MICBIAS("MicBias2", 0x81, 4, 0),
|
||||
SND_SOC_DAPM_MICBIAS("MicBias2", 0x81, 5, 0),
|
||||
};
|
||||
|
||||
static const struct snd_soc_dapm_route rt5512_dapm_routes[] =
|
||||
|
||||
@@ -186,7 +186,8 @@ static const struct snd_soc_dapm_route rt5512_audio_map[] = {
|
||||
// Input
|
||||
{"MicBias1", NULL,"Main Mic"},
|
||||
{"Mic2", NULL, "MicBias1"},
|
||||
{"Aux", NULL, "LineIn"},
|
||||
{"MicBias2", NULL, "LineIn"},
|
||||
{"Aux", NULL, "MicBias2"},
|
||||
// Output
|
||||
{"Ext Spk", NULL, "LSpeaker"},
|
||||
{"Ext Spk", NULL, "RSpeaker"},
|
||||
@@ -286,17 +287,7 @@ static int rt5512_init(struct snd_soc_pcm_runtime *rtd)
|
||||
static struct snd_soc_dai_link rk29_dai[] = {
|
||||
{ /* Primary DAI i/f */
|
||||
.name = "RT5512 AIF1",
|
||||
.stream_name = "Playback",
|
||||
.cpu_dai_name = "rk29_i2s.1",
|
||||
.codec_dai_name = "RT5512-aif1",
|
||||
.platform_name = "rockchip-audio",
|
||||
.codec_name = "rt5512.1-0018",
|
||||
.init = rt5512_init,
|
||||
.ops = &rk29_ops,
|
||||
},
|
||||
{ /* Sec_Fifo DAI i/f */
|
||||
.name = "RT5512 AIF2",
|
||||
.stream_name = "Capture",
|
||||
.stream_name = "RT5512 PCM",
|
||||
.cpu_dai_name = "rk29_i2s.1",
|
||||
.codec_dai_name = "RT5512-aif1",
|
||||
.platform_name = "rockchip-audio",
|
||||
|
||||
Reference in New Issue
Block a user