Skip to content

Commit a39fbe0

Browse files
committed
Merge remote-tracking branch 'asoc/topic/rt5645' into asoc-next
2 parents 2d2c6e3 + 79c8903 commit a39fbe0

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

sound/soc/codecs/rt5645.c

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ static const struct reg_sequence init_list[] = {
6363
{RT5645_PR_BASE + 0x20, 0x611f},
6464
{RT5645_PR_BASE + 0x21, 0x4040},
6565
{RT5645_PR_BASE + 0x23, 0x0004},
66+
{RT5645_ASRC_4, 0x0120},
6667
};
6768

6869
static const struct reg_sequence rt5650_init_list[] = {
@@ -157,7 +158,7 @@ static const struct reg_default rt5645_reg[] = {
157158
{ 0x83, 0x0000 },
158159
{ 0x84, 0x0000 },
159160
{ 0x85, 0x0000 },
160-
{ 0x8a, 0x0000 },
161+
{ 0x8a, 0x0120 },
161162
{ 0x8e, 0x0004 },
162163
{ 0x8f, 0x1100 },
163164
{ 0x90, 0x0646 },
@@ -314,7 +315,7 @@ static const struct reg_default rt5650_reg[] = {
314315
{ 0x83, 0x0000 },
315316
{ 0x84, 0x0000 },
316317
{ 0x85, 0x0000 },
317-
{ 0x8a, 0x0000 },
318+
{ 0x8a, 0x0120 },
318319
{ 0x8e, 0x0004 },
319320
{ 0x8f, 0x1100 },
320321
{ 0x90, 0x0646 },
@@ -741,6 +742,14 @@ static int rt5645_spk_put_volsw(struct snd_kcontrol *kcontrol,
741742
return ret;
742743
}
743744

745+
static const char * const rt5645_dac1_vol_ctrl_mode_text[] = {
746+
"immediately", "zero crossing", "soft ramp"
747+
};
748+
749+
static SOC_ENUM_SINGLE_DECL(
750+
rt5645_dac1_vol_ctrl_mode, RT5645_PR_BASE,
751+
RT5645_DA1_ZDET_SFT, rt5645_dac1_vol_ctrl_mode_text);
752+
744753
static const struct snd_kcontrol_new rt5645_snd_controls[] = {
745754
/* Speaker Output Volume */
746755
SOC_DOUBLE("Speaker Channel Switch", RT5645_SPK_VOL,
@@ -807,6 +816,9 @@ static const struct snd_kcontrol_new rt5645_snd_controls[] = {
807816
SOC_SINGLE("I2S2 Func Switch", RT5645_GPIO_CTRL1, RT5645_I2S2_SEL_SFT,
808817
1, 1),
809818
RT5645_HWEQ("Speaker HWEQ"),
819+
820+
/* Digital Soft Volume Control */
821+
SOC_ENUM("DAC1 Digital Volume Control Func", rt5645_dac1_vol_ctrl_mode),
810822
};
811823

812824
/**
@@ -3532,6 +3544,7 @@ MODULE_DEVICE_TABLE(i2c, rt5645_i2c_id);
35323544
static const struct acpi_device_id rt5645_acpi_match[] = {
35333545
{ "10EC5645", 0 },
35343546
{ "10EC5650", 0 },
3547+
{ "10EC5640", 0 },
35353548
{},
35363549
};
35373550
MODULE_DEVICE_TABLE(acpi, rt5645_acpi_match);
@@ -3562,6 +3575,12 @@ static const struct dmi_system_id dmi_platform_intel_braswell[] = {
35623575
DMI_MATCH(DMI_PRODUCT_NAME, "Setzer"),
35633576
},
35643577
},
3578+
{
3579+
.ident = "Microsoft Surface 3",
3580+
.matches = {
3581+
DMI_MATCH(DMI_PRODUCT_NAME, "Surface 3"),
3582+
},
3583+
},
35653584
{ }
35663585
};
35673586

sound/soc/codecs/rt5645.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2018,6 +2018,9 @@
20182018

20192019

20202020
/* Codec Private Register definition */
2021+
/* DAC ADC Digital Volume (0x00) */
2022+
#define RT5645_DA1_ZDET_SFT 6
2023+
20212024
/* 3D Speaker Control (0x63) */
20222025
#define RT5645_3D_SPK_MASK (0x1 << 15)
20232026
#define RT5645_3D_SPK_SFT 15

0 commit comments

Comments
 (0)