Skip to contentSkip to conversation

ALSA: hda/cs8409: Add quirk for CDB35L56-FOUR-HD

PATCH Applied Richard Fitzgerald 2 participants 2 messages Jan 12 – Jan 13 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: hda/cs8409: Add quirk for CDB35L56-FOUR-HD

From: Simon Trimmer <[email protected]>

Adds quirkiness for the Cirrus Logic CDB35L56-FOUR-HD board. The quirk must be forced by model name "CDB35L56-FOUR-HD" because there isn't a unique SSID that can be used. For example in /etc/modprobe.d:

options snd-hda-intel model="CDB35L56-FOUR-HD"

The CDB35L56-FOUR-HD is not a complete PC. It is an add-on audio board that requires a host system and replaces the normal HDA codec on the host. Because of this there isn't an SSID that uniquely identifies this configuration. Also, the usual host board is an Aaeon UpXtreme, which doesn't have a unique SSID.

Because of this, the quirk must be forced by a module param. This is acceptable because it is a development board, not an end-user system, so there is no need for it to be detected automatically.

---
 sound/hda/codecs/cirrus/Kconfig         |   1 +
 sound/hda/codecs/cirrus/cs8409-tables.c |  76 ++++++++++-
 sound/hda/codecs/cirrus/cs8409.c        | 172 ++++++++++++++++++++++++
 sound/hda/codecs/cirrus/cs8409.h        |  13 ++
 4 files changed, 261 insertions(+), 1 deletion(-)
sound/hda/codecs/cirrus/Kconfig +1 -0
index ec6cbcaf64f0..d7a1b619d243 100644
@@ -34,6 +34,7 @@ comment "Set to Y if you want auto-loading the codec driver"
 config SND_HDA_CODEC_CS8409
 	tristate "Build Cirrus Logic HDA bridge support"
 	select SND_HDA_GENERIC
+	select SND_HDA_SCODEC_COMPONENT
 	help
 	  Say Y or M here to include Cirrus Logic HDA bridge support
 	  such as CS8409.
sound/hda/codecs/cirrus/cs8409-tables.c +75 -1

98 lines not on this page · raw message

sound/hda/codecs/cirrus/cs8409.c +172 -0

195 lines not on this page · raw message

sound/hda/codecs/cirrus/cs8409.h +13 -0
index 7fe56f4a73bc..be1714a84fff 100644
@@ -18,6 +18,7 @@
 #include "hda_auto_parser.h"
 #include "hda_jack.h"
 #include "../generic.h"
+#include "../side-codecs/hda_component.h"
 
 /* CS8409 Specific Definitions */
 
@@ -271,6 +272,8 @@ enum {
 	CS8409_DOLPHIN,
 	CS8409_DOLPHIN_FIXUPS,
 	CS8409_ODIN,
+	CS8409_CDB35L56_FOUR_HD,
+	CS8409_CDB35L56_FOUR_HD_FIXUP,
 };
 
 enum {
@@ -341,12 +344,17 @@ struct cs8409_spec {
 	unsigned int capture_started:1;
 	unsigned int init_done:1;
 	unsigned int build_ctrl_done:1;
+	unsigned int speaker_muted:1;
 
 	/* verb exec op override */
 	int (*exec_verb)(struct hdac_device *dev, unsigned int cmd, unsigned int flags,
 			 unsigned int *res);
 	/* unsol_event op override */
 	void (*unsol_event)(struct hda_codec *codec, unsigned int res);
+
+	/* component binding */
+	struct component_match *match;
+	struct hda_component_parent comps;
 };
 
 extern const struct snd_kcontrol_new cs42l42_dac_volume_mixer;
@@ -374,4 +382,9 @@ extern struct sub_codec dolphin_cs42l42_1;
 void cs8409_cs42l42_fixups(struct hda_codec *codec, const struct hda_fixup *fix, int action);
 void dolphin_fixups(struct hda_codec *codec, const struct hda_fixup *fix, int action);
 
+extern const struct cs8409_cir_param cs8409_cdb35l56_four_hw_cfg[];
+extern const struct hda_verb cs8409_cdb35l56_four_init_verbs[];
+void cs8409_cdb35l56_four_autodet_fixup(struct hda_codec *codec, const struct hda_fixup *fix,
+					int action);
+
 #endif
Signature · 1 line
2.47.3
Applied
#1 lore raw
Quoted 16 lines · Richard Fitzgerald

From: Simon Trimmer <[email protected]>

Adds quirkiness for the Cirrus Logic CDB35L56-FOUR-HD board. The quirk must be forced by model name "CDB35L56-FOUR-HD" because there isn't a unique SSID that can be used. For example in /etc/modprobe.d:

options snd-hda-intel model="CDB35L56-FOUR-HD"

The CDB35L56-FOUR-HD is not a complete PC. It is an add-on audio board that requires a host system and replaces the normal HDA codec on the host. Because of this there isn't an SSID that uniquely identifies this configuration. Also, the usual host board is an Aaeon UpXtreme, which doesn't have a unique SSID.

Quoted 8 lines

Because of this, the quirk must be forced by a module param. This is acceptable because it is a development board, not an end-user system, so there is no need for it to be detected automatically.

Applied to for-next branch now. Thanks.

Takashi