提交 a39fbe00 编写于 作者: M Mark Brown

Merge remote-tracking branch 'asoc/topic/rt5645' into asoc-next

...@@ -63,6 +63,7 @@ static const struct reg_sequence init_list[] = { ...@@ -63,6 +63,7 @@ static const struct reg_sequence init_list[] = {
{RT5645_PR_BASE + 0x20, 0x611f}, {RT5645_PR_BASE + 0x20, 0x611f},
{RT5645_PR_BASE + 0x21, 0x4040}, {RT5645_PR_BASE + 0x21, 0x4040},
{RT5645_PR_BASE + 0x23, 0x0004}, {RT5645_PR_BASE + 0x23, 0x0004},
{RT5645_ASRC_4, 0x0120},
}; };
static const struct reg_sequence rt5650_init_list[] = { static const struct reg_sequence rt5650_init_list[] = {
...@@ -157,7 +158,7 @@ static const struct reg_default rt5645_reg[] = { ...@@ -157,7 +158,7 @@ static const struct reg_default rt5645_reg[] = {
{ 0x83, 0x0000 }, { 0x83, 0x0000 },
{ 0x84, 0x0000 }, { 0x84, 0x0000 },
{ 0x85, 0x0000 }, { 0x85, 0x0000 },
{ 0x8a, 0x0000 }, { 0x8a, 0x0120 },
{ 0x8e, 0x0004 }, { 0x8e, 0x0004 },
{ 0x8f, 0x1100 }, { 0x8f, 0x1100 },
{ 0x90, 0x0646 }, { 0x90, 0x0646 },
...@@ -314,7 +315,7 @@ static const struct reg_default rt5650_reg[] = { ...@@ -314,7 +315,7 @@ static const struct reg_default rt5650_reg[] = {
{ 0x83, 0x0000 }, { 0x83, 0x0000 },
{ 0x84, 0x0000 }, { 0x84, 0x0000 },
{ 0x85, 0x0000 }, { 0x85, 0x0000 },
{ 0x8a, 0x0000 }, { 0x8a, 0x0120 },
{ 0x8e, 0x0004 }, { 0x8e, 0x0004 },
{ 0x8f, 0x1100 }, { 0x8f, 0x1100 },
{ 0x90, 0x0646 }, { 0x90, 0x0646 },
...@@ -741,6 +742,14 @@ static int rt5645_spk_put_volsw(struct snd_kcontrol *kcontrol, ...@@ -741,6 +742,14 @@ static int rt5645_spk_put_volsw(struct snd_kcontrol *kcontrol,
return ret; return ret;
} }
static const char * const rt5645_dac1_vol_ctrl_mode_text[] = {
"immediately", "zero crossing", "soft ramp"
};
static SOC_ENUM_SINGLE_DECL(
rt5645_dac1_vol_ctrl_mode, RT5645_PR_BASE,
RT5645_DA1_ZDET_SFT, rt5645_dac1_vol_ctrl_mode_text);
static const struct snd_kcontrol_new rt5645_snd_controls[] = { static const struct snd_kcontrol_new rt5645_snd_controls[] = {
/* Speaker Output Volume */ /* Speaker Output Volume */
SOC_DOUBLE("Speaker Channel Switch", RT5645_SPK_VOL, SOC_DOUBLE("Speaker Channel Switch", RT5645_SPK_VOL,
...@@ -807,6 +816,9 @@ static const struct snd_kcontrol_new rt5645_snd_controls[] = { ...@@ -807,6 +816,9 @@ static const struct snd_kcontrol_new rt5645_snd_controls[] = {
SOC_SINGLE("I2S2 Func Switch", RT5645_GPIO_CTRL1, RT5645_I2S2_SEL_SFT, SOC_SINGLE("I2S2 Func Switch", RT5645_GPIO_CTRL1, RT5645_I2S2_SEL_SFT,
1, 1), 1, 1),
RT5645_HWEQ("Speaker HWEQ"), RT5645_HWEQ("Speaker HWEQ"),
/* Digital Soft Volume Control */
SOC_ENUM("DAC1 Digital Volume Control Func", rt5645_dac1_vol_ctrl_mode),
}; };
/** /**
...@@ -3532,6 +3544,7 @@ MODULE_DEVICE_TABLE(i2c, rt5645_i2c_id); ...@@ -3532,6 +3544,7 @@ MODULE_DEVICE_TABLE(i2c, rt5645_i2c_id);
static const struct acpi_device_id rt5645_acpi_match[] = { static const struct acpi_device_id rt5645_acpi_match[] = {
{ "10EC5645", 0 }, { "10EC5645", 0 },
{ "10EC5650", 0 }, { "10EC5650", 0 },
{ "10EC5640", 0 },
{}, {},
}; };
MODULE_DEVICE_TABLE(acpi, rt5645_acpi_match); MODULE_DEVICE_TABLE(acpi, rt5645_acpi_match);
...@@ -3562,6 +3575,12 @@ static const struct dmi_system_id dmi_platform_intel_braswell[] = { ...@@ -3562,6 +3575,12 @@ static const struct dmi_system_id dmi_platform_intel_braswell[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "Setzer"), DMI_MATCH(DMI_PRODUCT_NAME, "Setzer"),
}, },
}, },
{
.ident = "Microsoft Surface 3",
.matches = {
DMI_MATCH(DMI_PRODUCT_NAME, "Surface 3"),
},
},
{ } { }
}; };
......
...@@ -2018,6 +2018,9 @@ ...@@ -2018,6 +2018,9 @@
/* Codec Private Register definition */ /* Codec Private Register definition */
/* DAC ADC Digital Volume (0x00) */
#define RT5645_DA1_ZDET_SFT 6
/* 3D Speaker Control (0x63) */ /* 3D Speaker Control (0x63) */
#define RT5645_3D_SPK_MASK (0x1 << 15) #define RT5645_3D_SPK_MASK (0x1 << 15)
#define RT5645_3D_SPK_SFT 15 #define RT5645_3D_SPK_SFT 15
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册