[PATCH v3 2/4] ALSA: hda/cirrus: Cleanup patch_cirrus.c code.

2021-03-15 Thread Vitaly Rodionov
From: Stefan Binding Minor changes, clean up code, remove unnecessary initialization of variables, reduced number of warnings from ./scripts/checkpatch.pl from 19 to 0 Tested on DELL Inspiron-3505, DELL Inspiron-3501, DELL Inspiron-3500 Signed-off-by: Stefan Binding Signed-off-by: Vitaly

[PATCH v3 4/4] ALSA: hda/cirrus: Make CS8409 driver more generic by using fixups.

2021-03-15 Thread Vitaly Rodionov
: Stefan Binding Signed-off-by: Vitaly Rodionov Changes in v1: - No changes Changes in v2: - Removed redundant fields in cs8409_cs42l42_init_verbs table. Changes in v3: - No changes --- sound/pci/hda/patch_cirrus.c | 280 --- 1 file changed, 98 insertions

[PATCH v3 0/4] ALSA: hda/cirrus: Make CS8409 driver more generic by using fixups

2021-03-15 Thread Vitaly Rodionov
This series of patches will address comments by Pierre-Louis Bossart, cleans up patch_cirrus.c source, reducing checkpatch.pl warnings from 19 to 0, fixing an issue reported by Canonical: BugLink: https://bugs.launchpad.net/bugs/1918378, and makes the CS8409 patch more generic by using fixups. St

[PATCH v3 1/4] ALSA: hda/cirrus: Add error handling into CS8409 I2C functions

2021-03-15 Thread Vitaly Rodionov
From: Stefan Binding Also removing 2 redundant cs8409_i2c_read() calls, as we already did read them in a code above. Tested on DELL Inspiron-3505, DELL Inspiron-3501, DELL Inspiron-3500 Signed-off-by: Stefan Binding Signed-off-by: Vitaly Rodionov Changes in v1: - No changes Changes in v2

[PATCH v3 3/4] ALSA: hda/cirrus: Fix CS42L42 Headset Mic volume control name

2021-03-15 Thread Vitaly Rodionov
, DELL Inspiron-3500 Signed-off-by: Stefan Binding Signed-off-by: Vitaly Rodionov BugLink: https://bugs.launchpad.net/bugs/1918378 Reported-and-tested-by: You-Sheng Yang Changes in v1: - No changes Changes in v2: - No changes Changes in v3: - No changes --- sound/pci/hda/patch_cirrus.c | 2 +

[PATCH v2 1/4] ALSA: hda/cirrus: Add error handling into CS8409 I2C functions

2021-03-15 Thread Vitaly Rodionov
From: Stefan Binding Also removing 2 redundant cs8409_i2c_read() calls, as we already did read them in a code above. Tested on DELL Inspiron-3505, DELL Inspiron-3501, DELL Inspiron-3500 Signed-off-by: Stefan Binding Signed-off-by: Vitaly Rodionov Changes in v1: - No changes Changes in v2

[PATCH v2 3/4] ALSA: hda/cirrus: Fix CS42L42 Headset Mic volume control name

2021-03-15 Thread Vitaly Rodionov
, DELL Inspiron-3500 Signed-off-by: Stefan Binding Signed-off-by: Vitaly Rodionov BugLink: https://bugs.launchpad.net/bugs/1918378 Reported-and-tested-by: You-Sheng Yang Changes in v1: - No changes Changes in v2: - No changes --- sound/pci/hda/patch_cirrus.c | 2 +- 1 file changed, 1 inse

[PATCH v2 2/4] ALSA: hda/cirrus: Cleanup patch_cirrus.c code.

2021-03-15 Thread Vitaly Rodionov
From: Stefan Binding Minor changes, clean up code, remove unnecessary initialization of variables, reduced number of warnings from ./scripts/checkpatch.pl from 19 to 0 Tested on DELL Inspiron-3505, DELL Inspiron-3501, DELL Inspiron-3500 Signed-off-by: Stefan Binding Signed-off-by: Vitaly

[PATCH v2 4/4] ALSA: hda/cirrus: Make CS8409 driver more generic by using fixups.

2021-03-15 Thread Vitaly Rodionov
: Stefan Binding Signed-off-by: Vitaly Rodionov --- sound/pci/hda/patch_cirrus.c | 280 --- 1 file changed, 98 insertions(+), 182 deletions(-) diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c index b64c11e8c8a1..965e4357f030 100644 --- a

[PATCH v2 0/4] ALSA: hda/cirrus: Make CS8409 driver more generic by using fixups

2021-03-15 Thread Vitaly Rodionov
This series of patches will address comments by Pierre-Louis Bossart, cleans up patch_cirrus.c source, reducing checkpatch.pl warnings from 19 to 0, fixing an issue reported by Canonical: BugLink: https://bugs.launchpad.net/bugs/1918378, and makes the CS8409 patch more generic by using fixups. St

Re: [PATCH v1 4/4] ALSA: hda/cirrus: Make CS8409 driver more generic by using fixups.

2021-03-15 Thread Vitaly Rodionov
On 15/03/2021 7:49 am, Takashi Iwai wrote: On Sat, 13 Mar 2021 12:34:10 +0100, Vitaly Rodionov wrote: @@ -1357,6 +1362,22 @@ static const struct hda_verb cs8409_cs42l42_init_verbs[] = { { 0x47, AC_VERB_SET_PROC_COEF, 0x0080 }, /* I2C mode */ { 0x47, AC_VERB_SET_COEF_INDEX

Re: [PATCH v1 1/4] ALSA: hda/cirrus: Add error handling into CS8409 I2C functions

2021-03-15 Thread Vitaly Rodionov
On 15/03/2021 7:45 am, Takashi Iwai wrote: Hi Takashi, Thanks a lot for your comments. On Sat, 13 Mar 2021 12:34:07 +0100, Vitaly Rodionov wrote: @@ -1508,7 +1508,7 @@ static void cs8409_enable_i2c_clock(struct hda_codec *codec, unsigned int flag) static int cs8409_i2c_wait_complete(struct

Re: [PATCH v1 0/4] ALSA: hda/cirrus: Make CS8409 driver more generic by using fixups

2021-03-14 Thread Vitaly Rodionov
On 14/03/2021 8:36 am, Takashi Iwai wrote: On Sat, 13 Mar 2021 12:34:06 +0100, Vitaly Rodionov wrote: This series of patches will address comments by Pierre-Louis Bossart, cleans up patch_cirrus.c source, reducing checkpatch.pl warnings from 19 to 0, fixing an issue reported by Canonical

[PATCH v1 3/4] ALSA: hda/cirrus: Fix CS42L42 Headset Mic volume control name

2021-03-13 Thread Vitaly Rodionov
, DELL Inspiron-3500 Signed-off-by: Stefan Binding Signed-off-by: Vitaly Rodionov BugLink: https://bugs.launchpad.net/bugs/1918378 Reported-and-tested-by: You-Sheng Yang Changes in v1: - No changes --- sound/pci/hda/patch_cirrus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -

[PATCH v1 0/4] ALSA: hda/cirrus: Make CS8409 driver more generic by using fixups

2021-03-13 Thread Vitaly Rodionov
This series of patches will address comments by Pierre-Louis Bossart, cleans up patch_cirrus.c source, reducing checkpatch.pl warnings from 19 to 0, fixing an issue reported by Canonical: BugLink: https://bugs.launchpad.net/bugs/1918378, and makes the CS8409 patch more generic by using fixups. St

[PATCH v1 2/4] ALSA: hda/cirrus: Cleanup patch_cirrus.c code.

2021-03-13 Thread Vitaly Rodionov
From: Stefan Binding Minor changes, clean up code, remove unnecessary initialization of variables, reduced number of warnings from ./scripts/checkpatch.pl from 19 to 0 Tested on DELL Inspiron-3505, DELL Inspiron-3501, DELL Inspiron-3500 Signed-off-by: Stefan Binding Signed-off-by: Vitaly

[PATCH v1 1/4] ALSA: hda/cirrus: Add error handling into CS8409 I2C functions

2021-03-13 Thread Vitaly Rodionov
From: Stefan Binding Tested on DELL Inspiron-3505, DELL Inspiron-3501, DELL Inspiron-3500 Signed-off-by: Stefan Binding Signed-off-by: Vitaly Rodionov Changes in v1: - No changes --- sound/pci/hda/patch_cirrus.c | 95 +--- 1 file changed, 56 insertions

[PATCH v1 4/4] ALSA: hda/cirrus: Make CS8409 driver more generic by using fixups.

2021-03-13 Thread Vitaly Rodionov
: Stefan Binding Signed-off-by: Vitaly Rodionov Changes in v1: - No changes --- sound/pci/hda/patch_cirrus.c | 304 ++- 1 file changed, 118 insertions(+), 186 deletions(-) diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c index 74ac758aa4d5

[PATCH 4/4] ALSA: hda/cirrus: Make CS8409 driver more generic by using fixups.

2021-03-12 Thread Vitaly Rodionov
: Stefan Binding Signed-off-by: Vitaly Rodionov --- sound/pci/hda/patch_cirrus.c | 304 ++- 1 file changed, 118 insertions(+), 186 deletions(-) diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c index 6495da523ea3..8cb91ca1720a 100644 --- a

[PATCH 3/4] ALSA: hda/cirrus: Fix CS42L42 Headset Mic volume control name

2021-03-12 Thread Vitaly Rodionov
, DELL Inspiron-3500 Signed-off-by: Stefan Binding Signed-off-by: Vitaly Rodionov BugLink: https://bugs.launchpad.net/bugs/1918378 Reported-and-tested-by: You-Sheng Yang --- sound/pci/hda/patch_cirrus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/pci/hda/patch_cirr

[PATCH 2/4] ALSA: hda/cirrus: Cleanup patch_cirrus.c code.

2021-03-12 Thread Vitaly Rodionov
From: Stefan Binding Minor changes, clean up code, remove unnecessary initialization of variables, reduced number of warnings from ./scripts/checkpatch.pl from 19 to 0 Tested on DELL Inspiron-3505, DELL Inspiron-3501, DELL Inspiron-3500 Signed-off-by: Stefan Binding Signed-off-by: Vitaly

[PATCH 1/4] ALSA: hda/cirrus: Add error handling into CS8409 I2C functions

2021-03-12 Thread Vitaly Rodionov
From: Stefan Binding Tested on DELL Inspiron-3505, DELL Inspiron-3501, DELL Inspiron-3500 Signed-off-by: Stefan Binding Signed-off-by: Vitaly Rodionov --- sound/pci/hda/patch_cirrus.c | 95 +--- 1 file changed, 56 insertions(+), 39 deletions(-) diff --git a

[PATCH 0/4] ALSA: hda/cirrus: Make CS8409 driver more generic by using fixups

2021-03-12 Thread Vitaly Rodionov
This series of patches will address comments by Pierre-Louis Bossart, cleans up patch_cirrus.c source, reducing checkpatch.pl warnings from 19 to 0, fixing an issue reported by Canonical: BugLink: https://bugs.launchpad.net/bugs/1918378, and makes the CS8409 patch more generic by using fixups. St

Re: [PATCH v3 3/4] ALSA: hda/cirrus: Add jack detect interrupt support from CS42L42 companion codec.

2021-03-09 Thread Vitaly Rodionov
On 08/03/2021 3:35 pm, Pierre-Louis Bossart wrote: @@ -38,6 +39,15 @@ struct cs_spec {   /* for MBP SPDIF control */   int (*spdif_sw_put)(struct snd_kcontrol *kcontrol,   struct snd_ctl_elem_value *ucontrol); + +    unsigned int cs42l42_hp_jack_in:1; +    unsigned int

Re: [PATCH v3 2/4] ALSA: hda/cirrus: Add support for CS8409 HDA bridge and CS42L42 companion codec.

2021-03-09 Thread Vitaly Rodionov
On 08/03/2021 3:33 pm, Pierre-Louis Bossart wrote: Hi Pierre-Louis Thanks a lot for your comments. Since this patch set has been merged we will address your comments in a next fix patch. +/* Enable I2C clocks */ +static void cs8409_enable_i2c_clock(struct hda_codec *codec, unsigned int fla

[PATCH v3 1/4] ALSA: hda/cirrus: Increase AUTO_CFG_MAX_INS from 8 to 18

2021-03-06 Thread Vitaly Rodionov
to increase this value to 18, so generic code can handle this correctly. Tested on DELL Inspiron-3505, DELL Inspiron-3501, DELL Inspiron-3500 Signed-off-by: Vitaly Rodionov --- Changes in v3: - No changes sound/pci/hda/hda_auto_parser.h | 2 +- sound/pci/hda/hda_local.h | 2 +- 2 files

[PATCH v3 0/4] ALSA: hda/cirrus: Add support for CS8409 HDA bridge and CS42L42 companion codec

2021-03-06 Thread Vitaly Rodionov
set MIC Volume Control Vitaly Rodionov (3): ALSA: hda/cirrus: Increase AUTO_CFG_MAX_INS from 8 to 18 ALSA: hda/cirrus: Add support for CS8409 HDA bridge and CS42L42 companion codec. ALSA: hda/cirrus: Add jack detect interrupt support from CS42L42 companion codec. sound/pci/hda/hda

[PATCH v3 2/4] ALSA: hda/cirrus: Add support for CS8409 HDA bridge and CS42L42 companion codec.

2021-03-06 Thread Vitaly Rodionov
00:00:1f.3/sound/card0/input9 Signed-off-by: Vitaly Rodionov --- Changes in v3: - Fixed uninitialized variable warning (Reported-by: kernel test robot ) - Moved gpio setup into s8409_cs42l42_hw_init() - Improved susped() implementation sound/pci/hda/patch_cirrus.c | 576 +++

[PATCH v3 3/4] ALSA: hda/cirrus: Add jack detect interrupt support from CS42L42 companion codec.

2021-03-06 Thread Vitaly Rodionov
s and then notify status via generic snd_hda_jack_unsol_event() call. Tested on DELL Inspiron-3500, DELL Inspiron-3501, DELL Inspiron-3505. Signed-off-by: Vitaly Rodionov --- Changes in v3: - Fixed missing static function declaration warning (Reported-by: kernel test robot ) - Improved unsoli

[PATCH v3 4/4] ALSA: hda/cirrus: Add Headphone and Headset MIC Volume Control

2021-03-06 Thread Vitaly Rodionov
put volume functions, saved in the control. Tested on DELL Inspiron-3500, DELL Inspiron-3501, DELL Inspiron-3500 Signed-off-by: Stefan Binding Signed-off-by: Vitaly Rodionov --- Changes in v3: - Added restore volumes after resume - Removed redundant debug logging after testing sound/pci/hda

[PATCH v2 3/4] ALSA: hda/cirrus: Add jack detect interrupt support from CS42L42 companion codec.

2021-03-04 Thread Vitaly Rodionov
s and then notify status via generic snd_hda_jack_unsol_event() call. Tested on DELL Inspiron-3500, DELL Inspiron-3501, DELL Inspiron-3505. Signed-off-by: Vitaly Rodionov --- sound/pci/hda/patch_cirrus.c | 304 ++- 1 file changed, 302 insertions(+), 2 deletions(-)

[PATCH v2 1/4] ALSA: hda/cirrus: Increase AUTO_CFG_MAX_INS from 8 to 18

2021-03-04 Thread Vitaly Rodionov
to increase this value to 18, so generic code can handle this correctly. Tested on DELL Inspiron-3505, DELL Inspiron-3501, DELL Inspiron-3500 Signed-off-by: Vitaly Rodionov --- sound/pci/hda/hda_auto_parser.h | 2 +- sound/pci/hda/hda_local.h | 2 +- 2 files changed, 2 insertions(+), 2

[PATCH v2 0/4] ALSA: hda/cirrus: Add support for CS8409 HDA bridge and CS42L42 companion codec

2021-03-04 Thread Vitaly Rodionov
set MIC Volume Control Vitaly Rodionov (3): ALSA: hda/cirrus: Increase AUTO_CFG_MAX_INS from 8 to 18 ALSA: hda/cirrus: Add support for CS8409 HDA bridge and CS42L42 companion codec. ALSA: hda/cirrus: Add jack detect interrupt support from CS42L42 companion codec. sound/pci/hda/hda

[PATCH v2 4/4] ALSA: hda/cirrus: Add Headphone and Headset MIC Volume Control

2021-03-04 Thread Vitaly Rodionov
put volume functions, saved in the control. Tested on DELL Inspiron-3500, DELL Inspiron-3501, DELL Inspiron-3500 Signed-off-by: Stefan Binding Signed-off-by: Vitaly Rodionov --- sound/pci/hda/patch_cirrus.c | 201 ++- 1 file changed, 198 insertions(+), 3

[PATCH v2 2/4] ALSA: hda/cirrus: Add support for CS8409 HDA bridge and CS42L42 companion codec.

2021-03-04 Thread Vitaly Rodionov
00:00:1f.3/sound/card0/input9 Signed-off-by: Vitaly Rodionov --- sound/pci/hda/patch_cirrus.c | 573 +++ 1 file changed, 573 insertions(+) diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c index f46204ab0b90..c95588681d53 100644 --- a/sound/pci/h

Re: [PATCH 3/4] ALSA: hda/cirrus: Add jack detect interrupt support from CS42L42 companion codec.

2021-03-04 Thread Vitaly Rodionov
On 04/03/2021 1:45 pm, Takashi Iwai wrote: On Wed, 03 Mar 2021 19:29:58 +0100, Vitaly Rodionov wrote: @@ -1243,6 +1258,8 @@ static int patch_cs4213(struct hda_codec *codec) #define CIR_I2C_QWRITE0x005D #define CIR_I2C_QREAD 0x005E +static struct mutex cs8409_i2c_mux; Any reason

Re: [PATCH 4/4] ALSA: hda/cirrus: Add Headphone and Headset MIC Volume Control

2021-03-04 Thread Vitaly Rodionov
On 04/03/2021 1:49 pm, Takashi Iwai wrote: On Wed, 03 Mar 2021 19:29:59 +0100, Vitaly Rodionov wrote: +static int cs8409_cs42l42_volume_get(struct snd_kcontrol *kcontrol, +struct snd_ctl_elem_value *ucontrol) +{ + struct hda_codec *codec = snd_kcontrol_chip

Re: [PATCH 2/4] ALSA: hda/cirrus: Add support for CS8409 HDA bridge and CS42L42 companion codec.

2021-03-04 Thread Vitaly Rodionov
On 04/03/2021 1:39 pm, Takashi Iwai wrote: Thank you very much for quick response! On Wed, 03 Mar 2021 19:29:57 +0100, Vitaly Rodionov wrote: +static const struct hda_verb cs8409_cs42l42_init_verbs[] = { + { 0x01, AC_VERB_SET_POWER_STATE, 0x },/* AFG: D0 */ I guess this power

[PATCH 3/4] ALSA: hda/cirrus: Add jack detect interrupt support from CS42L42 companion codec.

2021-03-03 Thread Vitaly Rodionov
s and then notify status via generic snd_hda_jack_unsol_event() call. Tested on DELL Inspiron-3500, DELL Inspiron-3501, DELL Inspiron-3505. Signed-off-by: Vitaly Rodionov --- sound/pci/hda/patch_cirrus.c | 335 +-- 1 file changed, 324 insertions(+), 11 deletions(-)

[PATCH 2/4] ALSA: hda/cirrus: Add support for CS8409 HDA bridge and CS42L42 companion codec.

2021-03-03 Thread Vitaly Rodionov
00:00:1f.3/sound/card0/input9 Signed-off-by: Vitaly Rodionov --- sound/pci/hda/patch_cirrus.c | 543 +++ 1 file changed, 543 insertions(+) diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c index f46204ab0b90..9d664982544f 100644 --- a/sound/pci/h

[PATCH 0/4] ALSA: hda/cirrus: Add support for CS8409 HDA bridge and CS42L42 companion codec.

2021-03-03 Thread Vitaly Rodionov
rated MIPI SoundWire interface or I2C/I2S/TDM interfaces designed for portable applications. It provides a high-dynamic range, stereo DAC for audio playback and a mono high-dynamic-range ADC for audio capture Stefan Binding (1): ALSA: hda/cirrus: Add Headphone and Headset MIC Volume Control V

[PATCH 1/4] ALSA: hda/cirrus: Increase AUTO_CFG_MAX_INS from 8 to 18

2021-03-03 Thread Vitaly Rodionov
to increase this value to 18, so generic code can handle this correctly. Tested on DELL Inspiron-3505, DELL Inspiron-3501, DELL Inspiron-3500 Signed-off-by: Vitaly Rodionov --- sound/pci/hda/hda_auto_parser.h | 2 +- sound/pci/hda/hda_local.h | 2 +- 2 files changed, 2 insertions(+), 2

[PATCH 4/4] ALSA: hda/cirrus: Add Headphone and Headset MIC Volume Control

2021-03-03 Thread Vitaly Rodionov
put volume functions, saved in the control. Tested on DELL Inspiron-3500, DELL Inspiron-3501, DELL Inspiron-3500 Signed-off-by: Stefan Binding Signed-off-by: Vitaly Rodionov --- sound/pci/hda/patch_cirrus.c | 177 +++ 1 file changed, 177 insertions(+) diff

[PATCH 4/4] ALSA: hda/cirrus: Add Headphone and Headset MIC Volume Control

2021-03-03 Thread Vitaly Rodionov
put volume functions, saved in the control. Tested on DELL Inspiron-3500, DELL Inspiron-3501, DELL Inspiron-3500 Signed-off-by: Stefan Binding Signed-off-by: Vitaly Rodionov --- sound/pci/hda/patch_cirrus.c | 177 +++ 1 file changed, 177 insertions(+) diff

[PATCH 2/4] ALSA: hda/cirrus: Add support for CS8409 HDA bridge and CS42L42 companion codec.

2021-03-03 Thread Vitaly Rodionov
00:00:1f.3/sound/card0/input9 Signed-off-by: Vitaly Rodionov --- sound/pci/hda/patch_cirrus.c | 543 +++ 1 file changed, 543 insertions(+) diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c index f46204ab0b90..9d664982544f 100644 --- a/sound/pci/h

[PATCH 3/4] ALSA: hda/cirrus: Add jack detect interrupt support from CS42L42 companion codec.

2021-03-03 Thread Vitaly Rodionov
s and then notify status via generic snd_hda_jack_unsol_event() call. Tested on DELL Inspiron-3500, DELL Inspiron-3501, DELL Inspiron-3505. Signed-off-by: Vitaly Rodionov --- sound/pci/hda/patch_cirrus.c | 335 +-- 1 file changed, 324 insertions(+), 11 deletions(-)

[PATCH 0/4] ALSA: hda/cirrus: Add support for CS8409 HDA bridge and CS42L42 companion codec.

2021-03-03 Thread Vitaly Rodionov
rated MIPI SoundWire interface or I2C/I2S/TDM interfaces designed for portable applications. It provides a high-dynamic range, stereo DAC for audio playback and a mono high-dynamic-range ADC for audio capture Stefan Binding (1): ALSA: hda/cirrus: Add Headphone and Headset MIC Volume Control V

[PATCH 1/4] ALSA: hda/cirrus: Increase AUTO_CFG_MAX_INS from 8 to 18

2021-03-03 Thread Vitaly Rodionov
to increase this value to 18, so generic code can handle this correctly. Tested on DELL Inspiron-3505, DELL Inspiron-3501, DELL Inspiron-3500 Signed-off-by: Vitaly Rodionov --- sound/pci/hda/hda_auto_parser.h | 2 +- sound/pci/hda/hda_local.h | 2 +- 2 files changed, 2 insertions(+), 2