* [PATCH AUTOSEL 5.10 02/29] ASoC: nau8822: Add operation for internal PLL off and on
[not found] <20220614020815.1099999-1-sashal@kernel.org>
@ 2022-06-14 2:07 ` Sasha Levin
2022-06-14 2:07 ` [PATCH AUTOSEL 5.10 04/29] ASoC: cs42l52: Fix TLV scales for mixer controls Sasha Levin
` (9 subsequent siblings)
10 siblings, 0 replies; 11+ messages in thread
From: Sasha Levin @ 2022-06-14 2:07 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Sasha Levin, alsa-devel, Seven Li, tiwai, John Hsu, lgirdwood,
Hui Wang, Mark Brown, David Lin
From: Hui Wang <hui.wang@canonical.com>
[ Upstream commit aeca8a3295022bcec46697f16e098140423d8463 ]
We tried to enable the audio on an imx6sx EVB with the codec nau8822,
after setting the internal PLL fractional parameters, the audio still
couldn't work and the there was no sdma irq at all.
After checking with the section "8.1.1 Phase Locked Loop (PLL) Design
Example" of "NAU88C22 Datasheet Rev 0.6", we found we need to
turn off the PLL before programming fractional parameters and turn on
the PLL after programming.
After this change, the audio driver could record and play sound and
the sdma's irq is triggered when playing or recording.
Cc: David Lin <ctlin0@nuvoton.com>
Cc: John Hsu <kchsu0@nuvoton.com>
Cc: Seven Li <wtli@nuvoton.com>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Link: https://lore.kernel.org/r/20220530040151.95221-2-hui.wang@canonical.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/nau8822.c | 4 ++++
sound/soc/codecs/nau8822.h | 3 +++
2 files changed, 7 insertions(+)
diff --git a/sound/soc/codecs/nau8822.c b/sound/soc/codecs/nau8822.c
index 609aeeb27818..d831959d8ff7 100644
--- a/sound/soc/codecs/nau8822.c
+++ b/sound/soc/codecs/nau8822.c
@@ -740,6 +740,8 @@ static int nau8822_set_pll(struct snd_soc_dai *dai, int pll_id, int source,
pll_param->pll_int, pll_param->pll_frac,
pll_param->mclk_scaler, pll_param->pre_factor);
+ snd_soc_component_update_bits(component,
+ NAU8822_REG_POWER_MANAGEMENT_1, NAU8822_PLL_EN_MASK, NAU8822_PLL_OFF);
snd_soc_component_update_bits(component,
NAU8822_REG_PLL_N, NAU8822_PLLMCLK_DIV2 | NAU8822_PLLN_MASK,
(pll_param->pre_factor ? NAU8822_PLLMCLK_DIV2 : 0) |
@@ -757,6 +759,8 @@ static int nau8822_set_pll(struct snd_soc_dai *dai, int pll_id, int source,
pll_param->mclk_scaler << NAU8822_MCLKSEL_SFT);
snd_soc_component_update_bits(component,
NAU8822_REG_CLOCKING, NAU8822_CLKM_MASK, NAU8822_CLKM_PLL);
+ snd_soc_component_update_bits(component,
+ NAU8822_REG_POWER_MANAGEMENT_1, NAU8822_PLL_EN_MASK, NAU8822_PLL_ON);
return 0;
}
diff --git a/sound/soc/codecs/nau8822.h b/sound/soc/codecs/nau8822.h
index 489191ff187e..b45d42c15de6 100644
--- a/sound/soc/codecs/nau8822.h
+++ b/sound/soc/codecs/nau8822.h
@@ -90,6 +90,9 @@
#define NAU8822_REFIMP_3K 0x3
#define NAU8822_IOBUF_EN (0x1 << 2)
#define NAU8822_ABIAS_EN (0x1 << 3)
+#define NAU8822_PLL_EN_MASK (0x1 << 5)
+#define NAU8822_PLL_ON (0x1 << 5)
+#define NAU8822_PLL_OFF (0x0 << 5)
/* NAU8822_REG_AUDIO_INTERFACE (0x4) */
#define NAU8822_AIFMT_MASK (0x3 << 3)
--
2.35.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH AUTOSEL 5.10 04/29] ASoC: cs42l52: Fix TLV scales for mixer controls
[not found] <20220614020815.1099999-1-sashal@kernel.org>
2022-06-14 2:07 ` [PATCH AUTOSEL 5.10 02/29] ASoC: nau8822: Add operation for internal PLL off and on Sasha Levin
@ 2022-06-14 2:07 ` Sasha Levin
2022-06-14 2:07 ` [PATCH AUTOSEL 5.10 05/29] ASoC: cs35l36: Update digital volume TLV Sasha Levin
` (8 subsequent siblings)
10 siblings, 0 replies; 11+ messages in thread
From: Sasha Levin @ 2022-06-14 2:07 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Sasha Levin, brian.austin, Charles Keepax, alsa-devel, tiwai,
lgirdwood, Paul.Handrigan, Mark Brown
From: Charles Keepax <ckeepax@opensource.cirrus.com>
[ Upstream commit 8bf5aabf524eec61013e506f764a0b2652dc5665 ]
The datasheet specifies the range of the mixer volumes as between
-51.5dB and 12dB with a 0.5dB step. Update the TLVs for this.
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220602162119.3393857-2-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/cs42l52.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/cs42l52.c b/sound/soc/codecs/cs42l52.c
index f772628f233e..750e6c923512 100644
--- a/sound/soc/codecs/cs42l52.c
+++ b/sound/soc/codecs/cs42l52.c
@@ -137,7 +137,7 @@ static DECLARE_TLV_DB_SCALE(mic_tlv, 1600, 100, 0);
static DECLARE_TLV_DB_SCALE(pga_tlv, -600, 50, 0);
-static DECLARE_TLV_DB_SCALE(mix_tlv, -50, 50, 0);
+static DECLARE_TLV_DB_SCALE(mix_tlv, -5150, 50, 0);
static DECLARE_TLV_DB_SCALE(beep_tlv, -56, 200, 0);
@@ -364,7 +364,7 @@ static const struct snd_kcontrol_new cs42l52_snd_controls[] = {
CS42L52_ADCB_VOL, 0, 0xA0, 0x78, ipd_tlv),
SOC_DOUBLE_R_SX_TLV("ADC Mixer Volume",
CS42L52_ADCA_MIXER_VOL, CS42L52_ADCB_MIXER_VOL,
- 0, 0x19, 0x7F, ipd_tlv),
+ 0, 0x19, 0x7F, mix_tlv),
SOC_DOUBLE("ADC Switch", CS42L52_ADC_MISC_CTL, 0, 1, 1, 0),
--
2.35.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH AUTOSEL 5.10 05/29] ASoC: cs35l36: Update digital volume TLV
[not found] <20220614020815.1099999-1-sashal@kernel.org>
2022-06-14 2:07 ` [PATCH AUTOSEL 5.10 02/29] ASoC: nau8822: Add operation for internal PLL off and on Sasha Levin
2022-06-14 2:07 ` [PATCH AUTOSEL 5.10 04/29] ASoC: cs42l52: Fix TLV scales for mixer controls Sasha Levin
@ 2022-06-14 2:07 ` Sasha Levin
2022-06-14 2:07 ` [PATCH AUTOSEL 5.10 06/29] ASoC: cs53l30: Correct number of volume levels on SX controls Sasha Levin
` (7 subsequent siblings)
10 siblings, 0 replies; 11+ messages in thread
From: Sasha Levin @ 2022-06-14 2:07 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Sasha Levin, brian.austin, Charles Keepax, alsa-devel, tiwai,
lgirdwood, Paul.Handrigan, Mark Brown
From: Charles Keepax <ckeepax@opensource.cirrus.com>
[ Upstream commit 5005a2345825eb8346546d99bfe669f73111b5c5 ]
The digital volume TLV specifies the step as 0.25dB but the actual step
of the control is 0.125dB. Update the TLV to correct this.
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220602162119.3393857-3-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/cs35l36.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/cs35l36.c b/sound/soc/codecs/cs35l36.c
index e9b5f76f27a8..aa32b8c26578 100644
--- a/sound/soc/codecs/cs35l36.c
+++ b/sound/soc/codecs/cs35l36.c
@@ -444,7 +444,8 @@ static bool cs35l36_volatile_reg(struct device *dev, unsigned int reg)
}
}
-static DECLARE_TLV_DB_SCALE(dig_vol_tlv, -10200, 25, 0);
+static const DECLARE_TLV_DB_RANGE(dig_vol_tlv, 0, 912,
+ TLV_DB_MINMAX_ITEM(-10200, 1200));
static DECLARE_TLV_DB_SCALE(amp_gain_tlv, 0, 1, 1);
static const char * const cs35l36_pcm_sftramp_text[] = {
--
2.35.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH AUTOSEL 5.10 06/29] ASoC: cs53l30: Correct number of volume levels on SX controls
[not found] <20220614020815.1099999-1-sashal@kernel.org>
` (2 preceding siblings ...)
2022-06-14 2:07 ` [PATCH AUTOSEL 5.10 05/29] ASoC: cs35l36: Update digital volume TLV Sasha Levin
@ 2022-06-14 2:07 ` Sasha Levin
2022-06-14 2:07 ` [PATCH AUTOSEL 5.10 07/29] ASoC: cs42l52: Correct TLV for Bypass Volume Sasha Levin
` (6 subsequent siblings)
10 siblings, 0 replies; 11+ messages in thread
From: Sasha Levin @ 2022-06-14 2:07 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Sasha Levin, brian.austin, Charles Keepax, alsa-devel, tiwai,
lgirdwood, Paul.Handrigan, David Rhodes, Mark Brown
From: Charles Keepax <ckeepax@opensource.cirrus.com>
[ Upstream commit 7fbd6dd68127927e844912a16741016d432a0737 ]
This driver specified the maximum value rather than the number of volume
levels on the SX controls, this is incorrect, so correct them.
Reported-by: David Rhodes <david.rhodes@cirrus.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220602162119.3393857-4-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/cs53l30.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/sound/soc/codecs/cs53l30.c b/sound/soc/codecs/cs53l30.c
index ed22361b35c1..a5a383b92305 100644
--- a/sound/soc/codecs/cs53l30.c
+++ b/sound/soc/codecs/cs53l30.c
@@ -347,22 +347,22 @@ static const struct snd_kcontrol_new cs53l30_snd_controls[] = {
SOC_ENUM("ADC2 NG Delay", adc2_ng_delay_enum),
SOC_SINGLE_SX_TLV("ADC1A PGA Volume",
- CS53L30_ADC1A_AFE_CTL, 0, 0x34, 0x18, pga_tlv),
+ CS53L30_ADC1A_AFE_CTL, 0, 0x34, 0x24, pga_tlv),
SOC_SINGLE_SX_TLV("ADC1B PGA Volume",
- CS53L30_ADC1B_AFE_CTL, 0, 0x34, 0x18, pga_tlv),
+ CS53L30_ADC1B_AFE_CTL, 0, 0x34, 0x24, pga_tlv),
SOC_SINGLE_SX_TLV("ADC2A PGA Volume",
- CS53L30_ADC2A_AFE_CTL, 0, 0x34, 0x18, pga_tlv),
+ CS53L30_ADC2A_AFE_CTL, 0, 0x34, 0x24, pga_tlv),
SOC_SINGLE_SX_TLV("ADC2B PGA Volume",
- CS53L30_ADC2B_AFE_CTL, 0, 0x34, 0x18, pga_tlv),
+ CS53L30_ADC2B_AFE_CTL, 0, 0x34, 0x24, pga_tlv),
SOC_SINGLE_SX_TLV("ADC1A Digital Volume",
- CS53L30_ADC1A_DIG_VOL, 0, 0xA0, 0x0C, dig_tlv),
+ CS53L30_ADC1A_DIG_VOL, 0, 0xA0, 0x6C, dig_tlv),
SOC_SINGLE_SX_TLV("ADC1B Digital Volume",
- CS53L30_ADC1B_DIG_VOL, 0, 0xA0, 0x0C, dig_tlv),
+ CS53L30_ADC1B_DIG_VOL, 0, 0xA0, 0x6C, dig_tlv),
SOC_SINGLE_SX_TLV("ADC2A Digital Volume",
- CS53L30_ADC2A_DIG_VOL, 0, 0xA0, 0x0C, dig_tlv),
+ CS53L30_ADC2A_DIG_VOL, 0, 0xA0, 0x6C, dig_tlv),
SOC_SINGLE_SX_TLV("ADC2B Digital Volume",
- CS53L30_ADC2B_DIG_VOL, 0, 0xA0, 0x0C, dig_tlv),
+ CS53L30_ADC2B_DIG_VOL, 0, 0xA0, 0x6C, dig_tlv),
};
static const struct snd_soc_dapm_widget cs53l30_dapm_widgets[] = {
--
2.35.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH AUTOSEL 5.10 07/29] ASoC: cs42l52: Correct TLV for Bypass Volume
[not found] <20220614020815.1099999-1-sashal@kernel.org>
` (3 preceding siblings ...)
2022-06-14 2:07 ` [PATCH AUTOSEL 5.10 06/29] ASoC: cs53l30: Correct number of volume levels on SX controls Sasha Levin
@ 2022-06-14 2:07 ` Sasha Levin
2022-06-14 2:07 ` [PATCH AUTOSEL 5.10 08/29] ASoC: cs42l56: Correct typo in minimum level for SX volume controls Sasha Levin
` (5 subsequent siblings)
10 siblings, 0 replies; 11+ messages in thread
From: Sasha Levin @ 2022-06-14 2:07 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Sasha Levin, brian.austin, Charles Keepax, alsa-devel, tiwai,
lgirdwood, Paul.Handrigan, Mark Brown
From: Charles Keepax <ckeepax@opensource.cirrus.com>
[ Upstream commit 91e90c712fade0b69cdff7cc6512f6099bd18ae5 ]
The Bypass Volume is accidentally using a -6dB minimum TLV rather than
the correct -60dB minimum. Add a new TLV to correct this.
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220602162119.3393857-5-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/cs42l52.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/cs42l52.c b/sound/soc/codecs/cs42l52.c
index 750e6c923512..38223641bdf6 100644
--- a/sound/soc/codecs/cs42l52.c
+++ b/sound/soc/codecs/cs42l52.c
@@ -137,6 +137,8 @@ static DECLARE_TLV_DB_SCALE(mic_tlv, 1600, 100, 0);
static DECLARE_TLV_DB_SCALE(pga_tlv, -600, 50, 0);
+static DECLARE_TLV_DB_SCALE(pass_tlv, -6000, 50, 0);
+
static DECLARE_TLV_DB_SCALE(mix_tlv, -5150, 50, 0);
static DECLARE_TLV_DB_SCALE(beep_tlv, -56, 200, 0);
@@ -351,7 +353,7 @@ static const struct snd_kcontrol_new cs42l52_snd_controls[] = {
CS42L52_SPKB_VOL, 0, 0x40, 0xC0, hl_tlv),
SOC_DOUBLE_R_SX_TLV("Bypass Volume", CS42L52_PASSTHRUA_VOL,
- CS42L52_PASSTHRUB_VOL, 0, 0x88, 0x90, pga_tlv),
+ CS42L52_PASSTHRUB_VOL, 0, 0x88, 0x90, pass_tlv),
SOC_DOUBLE("Bypass Mute", CS42L52_MISC_CTL, 4, 5, 1, 0),
--
2.35.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH AUTOSEL 5.10 08/29] ASoC: cs42l56: Correct typo in minimum level for SX volume controls
[not found] <20220614020815.1099999-1-sashal@kernel.org>
` (4 preceding siblings ...)
2022-06-14 2:07 ` [PATCH AUTOSEL 5.10 07/29] ASoC: cs42l52: Correct TLV for Bypass Volume Sasha Levin
@ 2022-06-14 2:07 ` Sasha Levin
2022-06-14 2:07 ` [PATCH AUTOSEL 5.10 09/29] ASoC: cs42l51: Correct minimum value for SX volume control Sasha Levin
` (4 subsequent siblings)
10 siblings, 0 replies; 11+ messages in thread
From: Sasha Levin @ 2022-06-14 2:07 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Sasha Levin, brian.austin, Charles Keepax, alsa-devel, tiwai,
lgirdwood, Paul.Handrigan, Mark Brown
From: Charles Keepax <ckeepax@opensource.cirrus.com>
[ Upstream commit a8928ada9b96944cadd8b65d191e33199fd38782 ]
A couple of the SX volume controls specify 0x84 as the lowest volume
value, however the correct value from the datasheet is 0x44. The
datasheet don't include spaces in the value it displays as binary so
this was almost certainly just a typo reading 1000100.
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220602162119.3393857-6-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/cs42l56.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/cs42l56.c b/sound/soc/codecs/cs42l56.c
index 06dcfae9dfe7..d41e03193106 100644
--- a/sound/soc/codecs/cs42l56.c
+++ b/sound/soc/codecs/cs42l56.c
@@ -391,9 +391,9 @@ static const struct snd_kcontrol_new cs42l56_snd_controls[] = {
SOC_DOUBLE("ADC Boost Switch", CS42L56_GAIN_BIAS_CTL, 3, 2, 1, 1),
SOC_DOUBLE_R_SX_TLV("Headphone Volume", CS42L56_HPA_VOLUME,
- CS42L56_HPB_VOLUME, 0, 0x84, 0x48, hl_tlv),
+ CS42L56_HPB_VOLUME, 0, 0x44, 0x48, hl_tlv),
SOC_DOUBLE_R_SX_TLV("LineOut Volume", CS42L56_LOA_VOLUME,
- CS42L56_LOB_VOLUME, 0, 0x84, 0x48, hl_tlv),
+ CS42L56_LOB_VOLUME, 0, 0x44, 0x48, hl_tlv),
SOC_SINGLE_TLV("Bass Shelving Volume", CS42L56_TONE_CTL,
0, 0x00, 1, tone_tlv),
--
2.35.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH AUTOSEL 5.10 09/29] ASoC: cs42l51: Correct minimum value for SX volume control
[not found] <20220614020815.1099999-1-sashal@kernel.org>
` (5 preceding siblings ...)
2022-06-14 2:07 ` [PATCH AUTOSEL 5.10 08/29] ASoC: cs42l56: Correct typo in minimum level for SX volume controls Sasha Levin
@ 2022-06-14 2:07 ` Sasha Levin
2022-06-14 2:07 ` [PATCH AUTOSEL 5.10 12/29] ASoC: wm8962: Fix suspend while playing music Sasha Levin
` (3 subsequent siblings)
10 siblings, 0 replies; 11+ messages in thread
From: Sasha Levin @ 2022-06-14 2:07 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Sasha Levin, brian.austin, Charles Keepax, alsa-devel, tiwai,
lgirdwood, Paul.Handrigan, Mark Brown
From: Charles Keepax <ckeepax@opensource.cirrus.com>
[ Upstream commit fcb3b5a58926d16d9a338841b74af06d4c29be15 ]
The minimum value for the PGA Volume is given as 0x1A, however the
values from there to 0x19 are all the same volume and this is not
represented in the TLV structure. The number of volumes given is correct
so this leads to all the volumes being shifted. Move the minimum value
up to 0x19 to fix this.
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220602162119.3393857-7-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/cs42l51.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/cs42l51.c b/sound/soc/codecs/cs42l51.c
index c61b17dc2af8..fc6a2bc311b4 100644
--- a/sound/soc/codecs/cs42l51.c
+++ b/sound/soc/codecs/cs42l51.c
@@ -146,7 +146,7 @@ static const struct snd_kcontrol_new cs42l51_snd_controls[] = {
0, 0xA0, 96, adc_att_tlv),
SOC_DOUBLE_R_SX_TLV("PGA Volume",
CS42L51_ALC_PGA_CTL, CS42L51_ALC_PGB_CTL,
- 0, 0x1A, 30, pga_tlv),
+ 0, 0x19, 30, pga_tlv),
SOC_SINGLE("Playback Deemphasis Switch", CS42L51_DAC_CTL, 3, 1, 0),
SOC_SINGLE("Auto-Mute Switch", CS42L51_DAC_CTL, 2, 1, 0),
SOC_SINGLE("Soft Ramp Switch", CS42L51_DAC_CTL, 1, 1, 0),
--
2.35.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH AUTOSEL 5.10 12/29] ASoC: wm8962: Fix suspend while playing music
[not found] <20220614020815.1099999-1-sashal@kernel.org>
` (6 preceding siblings ...)
2022-06-14 2:07 ` [PATCH AUTOSEL 5.10 09/29] ASoC: cs42l51: Correct minimum value for SX volume control Sasha Levin
@ 2022-06-14 2:07 ` Sasha Levin
2022-06-14 2:07 ` [PATCH AUTOSEL 5.10 13/29] ASoC: es8328: Fix event generation for deemphasis control Sasha Levin
` (2 subsequent siblings)
10 siblings, 0 replies; 11+ messages in thread
From: Sasha Levin @ 2022-06-14 2:07 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Sasha Levin, alsa-devel, patches, Charles Keepax, tiwai,
lgirdwood, Mark Brown, Adam Ford
From: Adam Ford <aford173@gmail.com>
[ Upstream commit d1f5272c0f7d2e53c6f2480f46725442776f5f78 ]
If the audio CODEC is playing sound when the system is suspended,
it can be left in a state which throws the following error:
wm8962 3-001a: ASoC: error at soc_component_read_no_lock on wm8962.3-001a: -16
Once this error has occurred, the audio will not work again until rebooted.
Fix this by configuring SET_SYSTEM_SLEEP_PM_OPS.
Signed-off-by: Adam Ford <aford173@gmail.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220526182129.538472-1-aford173@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/wm8962.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index 0bd3bbc2aacf..38651022e3d5 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -3864,6 +3864,7 @@ static int wm8962_runtime_suspend(struct device *dev)
#endif
static const struct dev_pm_ops wm8962_pm = {
+ SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume)
SET_RUNTIME_PM_OPS(wm8962_runtime_suspend, wm8962_runtime_resume, NULL)
};
--
2.35.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH AUTOSEL 5.10 13/29] ASoC: es8328: Fix event generation for deemphasis control
[not found] <20220614020815.1099999-1-sashal@kernel.org>
` (7 preceding siblings ...)
2022-06-14 2:07 ` [PATCH AUTOSEL 5.10 12/29] ASoC: wm8962: Fix suspend while playing music Sasha Levin
@ 2022-06-14 2:07 ` Sasha Levin
2022-06-14 2:08 ` [PATCH AUTOSEL 5.10 14/29] ASoC: wm_adsp: Fix event generation for wm_adsp_fw_put() Sasha Levin
2022-06-14 2:08 ` [PATCH AUTOSEL 5.10 21/29] ALSA: hda/realtek - Add HW8326 support Sasha Levin
10 siblings, 0 replies; 11+ messages in thread
From: Sasha Levin @ 2022-06-14 2:07 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Sasha Levin, alsa-devel, tiwai, lgirdwood, Mark Brown
From: Mark Brown <broonie@kernel.org>
[ Upstream commit 8259610c2ec01c5cbfb61882ae176aabacac9c19 ]
Currently the put() method for the deemphasis control returns 0 when a new
value is written to the control even if the value changed, meaning events
are not generated. Fix this, skip the work of updating the value when it is
unchanged and then return 1 after having done so.
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220603123937.4013603-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/es8328.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/es8328.c b/sound/soc/codecs/es8328.c
index 7e26231a596a..081b5f189632 100644
--- a/sound/soc/codecs/es8328.c
+++ b/sound/soc/codecs/es8328.c
@@ -161,13 +161,16 @@ static int es8328_put_deemph(struct snd_kcontrol *kcontrol,
if (deemph > 1)
return -EINVAL;
+ if (es8328->deemph == deemph)
+ return 0;
+
ret = es8328_set_deemph(component);
if (ret < 0)
return ret;
es8328->deemph = deemph;
- return 0;
+ return 1;
}
--
2.35.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH AUTOSEL 5.10 14/29] ASoC: wm_adsp: Fix event generation for wm_adsp_fw_put()
[not found] <20220614020815.1099999-1-sashal@kernel.org>
` (8 preceding siblings ...)
2022-06-14 2:07 ` [PATCH AUTOSEL 5.10 13/29] ASoC: es8328: Fix event generation for deemphasis control Sasha Levin
@ 2022-06-14 2:08 ` Sasha Levin
2022-06-14 2:08 ` [PATCH AUTOSEL 5.10 21/29] ALSA: hda/realtek - Add HW8326 support Sasha Levin
10 siblings, 0 replies; 11+ messages in thread
From: Sasha Levin @ 2022-06-14 2:08 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Sasha Levin, alsa-devel, patches, tiwai, lgirdwood,
Richard Fitzgerald, Mark Brown
From: Mark Brown <broonie@kernel.org>
[ Upstream commit 2abdf9f80019e8244d3806ed0e1c9f725e50b452 ]
Currently wm_adsp_fw_put() returns 0 rather than 1 when updating the value
of the control, meaning that no event is generated to userspace. Fix this
by setting the default return value to 1, the code already exits early with
a return value of 0 if the value is unchanged.
Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220603115003.3865834-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/wm_adsp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index 51d95437e0fd..10189f44af28 100644
--- a/sound/soc/codecs/wm_adsp.c
+++ b/sound/soc/codecs/wm_adsp.c
@@ -800,7 +800,7 @@ int wm_adsp_fw_put(struct snd_kcontrol *kcontrol,
struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
struct wm_adsp *dsp = snd_soc_component_get_drvdata(component);
- int ret = 0;
+ int ret = 1;
if (ucontrol->value.enumerated.item[0] == dsp[e->shift_l].fw)
return 0;
--
2.35.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH AUTOSEL 5.10 21/29] ALSA: hda/realtek - Add HW8326 support
[not found] <20220614020815.1099999-1-sashal@kernel.org>
` (9 preceding siblings ...)
2022-06-14 2:08 ` [PATCH AUTOSEL 5.10 14/29] ASoC: wm_adsp: Fix event generation for wm_adsp_fw_put() Sasha Levin
@ 2022-06-14 2:08 ` Sasha Levin
10 siblings, 0 replies; 11+ messages in thread
From: Sasha Levin @ 2022-06-14 2:08 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Sasha Levin, huangwenhui, alsa-devel, Takashi Iwai, tiwai
From: huangwenhui <huangwenhuia@uniontech.com>
[ Upstream commit 527f4643e03c298c1e3321cfa27866b1374a55e1 ]
Added the support of new Huawei codec HW8326. The HW8326 is developed
by Huawei with Realtek's IP Core, and it's compatible with ALC256.
Signed-off-by: huangwenhui <huangwenhuia@uniontech.com>
Link: https://lore.kernel.org/r/20220608082357.26898-1-huangwenhuia@uniontech.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/hda/hdac_device.c | 1 +
sound/pci/hda/patch_realtek.c | 14 ++++++++++++++
2 files changed, 15 insertions(+)
diff --git a/sound/hda/hdac_device.c b/sound/hda/hdac_device.c
index 3e9e9ac804f6..b7e5032b61c9 100644
--- a/sound/hda/hdac_device.c
+++ b/sound/hda/hdac_device.c
@@ -660,6 +660,7 @@ static const struct hda_vendor_id hda_vendor_ids[] = {
{ 0x14f1, "Conexant" },
{ 0x17e8, "Chrontel" },
{ 0x1854, "LG" },
+ { 0x19e5, "Huawei" },
{ 0x1aec, "Wolfson Microelectronics" },
{ 0x1af4, "QEMU" },
{ 0x434d, "C-Media" },
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 71a9462e8f6e..e067759561df 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -439,6 +439,7 @@ static void alc_fill_eapd_coef(struct hda_codec *codec)
case 0x10ec0245:
case 0x10ec0255:
case 0x10ec0256:
+ case 0x19e58326:
case 0x10ec0257:
case 0x10ec0282:
case 0x10ec0283:
@@ -576,6 +577,7 @@ static void alc_shutup_pins(struct hda_codec *codec)
switch (codec->core.vendor_id) {
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
case 0x10ec0283:
case 0x10ec0286:
case 0x10ec0288:
@@ -3252,6 +3254,7 @@ static void alc_disable_headset_jack_key(struct hda_codec *codec)
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
alc_write_coef_idx(codec, 0x48, 0x0);
alc_update_coef_idx(codec, 0x49, 0x0045, 0x0);
break;
@@ -3280,6 +3283,7 @@ static void alc_enable_headset_jack_key(struct hda_codec *codec)
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
alc_write_coef_idx(codec, 0x48, 0xd011);
alc_update_coef_idx(codec, 0x49, 0x007f, 0x0045);
break;
@@ -4849,6 +4853,7 @@ static void alc_headset_mode_unplugged(struct hda_codec *codec)
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
alc_process_coef_fw(codec, coef0256);
break;
case 0x10ec0234:
@@ -4964,6 +4969,7 @@ static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin,
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
alc_write_coef_idx(codec, 0x45, 0xc489);
snd_hda_set_pin_ctl_cache(codec, hp_pin, 0);
alc_process_coef_fw(codec, coef0256);
@@ -5114,6 +5120,7 @@ static void alc_headset_mode_default(struct hda_codec *codec)
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
alc_write_coef_idx(codec, 0x1b, 0x0e4b);
alc_write_coef_idx(codec, 0x45, 0xc089);
msleep(50);
@@ -5213,6 +5220,7 @@ static void alc_headset_mode_ctia(struct hda_codec *codec)
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
alc_process_coef_fw(codec, coef0256);
break;
case 0x10ec0234:
@@ -5327,6 +5335,7 @@ static void alc_headset_mode_omtp(struct hda_codec *codec)
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
alc_process_coef_fw(codec, coef0256);
break;
case 0x10ec0234:
@@ -5428,6 +5437,7 @@ static void alc_determine_headset_type(struct hda_codec *codec)
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
alc_write_coef_idx(codec, 0x1b, 0x0e4b);
alc_write_coef_idx(codec, 0x06, 0x6104);
alc_write_coefex_idx(codec, 0x57, 0x3, 0x09a3);
@@ -5722,6 +5732,7 @@ static void alc255_set_default_jack_type(struct hda_codec *codec)
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
alc_process_coef_fw(codec, alc256fw);
break;
}
@@ -6325,6 +6336,7 @@ static void alc_combo_jack_hp_jd_restart(struct hda_codec *codec)
case 0x10ec0236:
case 0x10ec0255:
case 0x10ec0256:
+ case 0x19e58326:
alc_update_coef_idx(codec, 0x1b, 0x8000, 1 << 15); /* Reset HP JD */
alc_update_coef_idx(codec, 0x1b, 0x8000, 0 << 15);
break;
@@ -9812,6 +9824,7 @@ static int patch_alc269(struct hda_codec *codec)
case 0x10ec0230:
case 0x10ec0236:
case 0x10ec0256:
+ case 0x19e58326:
spec->codec_variant = ALC269_TYPE_ALC256;
spec->shutup = alc256_shutup;
spec->init_hook = alc256_init;
@@ -11254,6 +11267,7 @@ static const struct hda_device_id snd_hda_id_realtek[] = {
HDA_CODEC_ENTRY(0x10ec0b00, "ALCS1200A", patch_alc882),
HDA_CODEC_ENTRY(0x10ec1168, "ALC1220", patch_alc882),
HDA_CODEC_ENTRY(0x10ec1220, "ALC1220", patch_alc882),
+ HDA_CODEC_ENTRY(0x19e58326, "HW8326", patch_alc269),
{} /* terminator */
};
MODULE_DEVICE_TABLE(hdaudio, snd_hda_id_realtek);
--
2.35.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
end of thread, other threads:[~2022-06-14 2:18 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20220614020815.1099999-1-sashal@kernel.org>
2022-06-14 2:07 ` [PATCH AUTOSEL 5.10 02/29] ASoC: nau8822: Add operation for internal PLL off and on Sasha Levin
2022-06-14 2:07 ` [PATCH AUTOSEL 5.10 04/29] ASoC: cs42l52: Fix TLV scales for mixer controls Sasha Levin
2022-06-14 2:07 ` [PATCH AUTOSEL 5.10 05/29] ASoC: cs35l36: Update digital volume TLV Sasha Levin
2022-06-14 2:07 ` [PATCH AUTOSEL 5.10 06/29] ASoC: cs53l30: Correct number of volume levels on SX controls Sasha Levin
2022-06-14 2:07 ` [PATCH AUTOSEL 5.10 07/29] ASoC: cs42l52: Correct TLV for Bypass Volume Sasha Levin
2022-06-14 2:07 ` [PATCH AUTOSEL 5.10 08/29] ASoC: cs42l56: Correct typo in minimum level for SX volume controls Sasha Levin
2022-06-14 2:07 ` [PATCH AUTOSEL 5.10 09/29] ASoC: cs42l51: Correct minimum value for SX volume control Sasha Levin
2022-06-14 2:07 ` [PATCH AUTOSEL 5.10 12/29] ASoC: wm8962: Fix suspend while playing music Sasha Levin
2022-06-14 2:07 ` [PATCH AUTOSEL 5.10 13/29] ASoC: es8328: Fix event generation for deemphasis control Sasha Levin
2022-06-14 2:08 ` [PATCH AUTOSEL 5.10 14/29] ASoC: wm_adsp: Fix event generation for wm_adsp_fw_put() Sasha Levin
2022-06-14 2:08 ` [PATCH AUTOSEL 5.10 21/29] ALSA: hda/realtek - Add HW8326 support Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox