ASoC: cs4265: SOC_SINGLE register value error fix
Subsystems (3)
PATCH 1/3 ASoC: cs4265: SOC_SINGLE register value error fix
From: Matt Flax <[email protected]>
The cs4265 driver declares the "MMTLR Data Switch" register setting with a 0 register value rather then the 0x12 register (CS4265_SPDIF_CTL2). This incorrect value causes alsamixer to fault with the output :
cannot load mixer controls: Input/output error
This patch corrects the register value. alsamixer now runs.
--- sound/soc/codecs/cs4265.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
sound/soc/codecs/cs4265.c +1 -2
@@ -157,8 +157,7 @@ static const struct snd_kcontrol_new cs4265_snd_controls[] = {SOC_SINGLE ("Validity Bit Control Switch" ,CS4265_SPDIF_CTL2 ,3 ,1 ,0 ),SOC_ENUM ("SPDIF Mono/Stereo" , spdif_mono_stereo_enum), -SOC_SINGLE ("MMTLR Data Switch" ,0 , -1 ,1 ,0 ), +SOC_SINGLE ("MMTLR Data Switch" ,CS4265_SPDIF_CTL2 ,0 ,1 ,0 ),SOC_ENUM ("Mono Channel Select" , spdif_mono_select_enum), SND_SOC_BYTES("C Data Buffer", CS4265_C_DATA_BUFF, 24), };
Signature · 1 line
2.17.1
PATCH 2/3 ASoC: cs4265: Add native 32bit I2S transport
From: Matt Flax <[email protected]>
The cs4265 uses 32 bit transport on the I2S bus. This patch enables native 32 bit mode for machine drivers which use this sound card driver.
--- sound/soc/codecs/cs4265.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
sound/soc/codecs/cs4265.c +2 -1
@@ -495,7 +495,8 @@ static int cs4265_set_bias_level(struct snd_soc_component *component, SNDRV_PCM_RATE_176400 | SNDRV_PCM_RATE_192000)#define CS4265_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_U16_LE | \ - SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_U24_LE) + SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_U24_LE | \ + SNDRV_PCM_FMTBIT_S32_LE | SNDRV_PCM_FMTBIT_U32_LE)static const struct snd_soc_dai_ops cs4265_ops = { .hw_params = cs4265_pcm_hw_params,
Signature · 1 line
2.17.1
PATCH 3/3 ASoC: cs4265: Add a SPDIF enable actl
In reply to Matt FlaxFrom: Matt Flax <[email protected]>
This patch adds a SPDIF enable/disable toggle switch to the sound controls.
--- sound/soc/codecs/cs4265.c | 8 ++++++++ 1 file changed, 8 insertions(+)
sound/soc/codecs/cs4265.c +8 -0
@@ -112,6 +112,13 @@ static const char * const cam_mono_stereo_text[] = { static SOC_ENUM_SINGLE_DECL(spdif_mono_stereo_enum, CS4265_SPDIF_CTL2, 2, cam_mono_stereo_text); +static const char *const spdif_enable_text[] = { +"Enabled" ,"Disabled" +}; + +static SOC_ENUM_SINGLE_DECL(spdif_enable_enum, CS4265_SPDIF_CTL2, 5, + spdif_enable_text); +static const char *const mono_select_text[] = {"Channel A" ,"Channel B" };
@@ -151,6 +158,7 @@ static const struct snd_kcontrol_new cs4265_snd_controls[] = { 1, 1),SOC_SINGLE ("ADC Soft Ramp Switch" ,CS4265_ADC_CTL2 ,7 ,1 ,0 ), +SOC_ENUM ("SPDIF Enable" , spdif_enable_enum),SOC_SINGLE ("E to F Buffer Disable Switch" ,CS4265_SPDIF_CTL1 ,6 ,1 ,0 ), SOC_ENUM("C Data Access", cam_mode_enum),
Signature · 1 line
2.17.1
Quoted 19 lines · Matt Flax
From: Matt Flax <[email protected]>
The cs4265 driver declares the "MMTLR Data Switch" register setting with a 0 register value rather then the
0x12register (CS4265_SPDIF_CTL2). This incorrect value causes alsamixer to fault with the output :
cannot load mixer controls: Input/output errorThis patch corrects the register value. alsamixer now runs.
Signed-off-by Matt Flax <[email protected]>--- sound/soc/codecs/cs4265.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)sound/soc/codecs/cs4265.c +0
-0
sound/soc/codecs/cs4265.c static const struct snd_kcontrol_new cs4265_snd_controls[] = { · line 163
Quoted 9 lines
sound/soc/codecs/cs4265.c +1
-2@@ -157,8 +157,7 @@ static const struct snd_kcontrol_new cs4265_snd_controls[] = {SOC_SINGLE ("Validity Bit Control Switch" ,CS4265_SPDIF_CTL2 ,3 ,1 ,0 ),SOC_ENUM ("SPDIF Mono/Stereo" , spdif_mono_stereo_enum), -SOC_SINGLE ("MMTLR Data Switch" ,0 , -1 ,1 ,0 ), +SOC_SINGLE ("MMTLR Data Switch" ,CS4265_SPDIF_CTL2 ,0 ,1 ,0 ),SOC_ENUM ("Mono Channel Select" , spdif_mono_select_enum), SND_SOC_BYTES("C Data Buffer", CS4265_C_DATA_BUFF, 24), };