Skip to content

Commit a0cf86d

Browse files
brentlubroonie
authored andcommitted
ASoC: Intel: sof_da7219: add cml_da7219_def for cml boards
Add the board config cml_da7219_def to da7219 machine driver for all cml boards using default SSP port allocation (headphone codec on SSP0, speaker amplifiers on SSP1). Reviewed-by: Bard Liao <[email protected]> Signed-off-by: Brent Lu <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent b7654a7 commit a0cf86d

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

sound/soc/intel/boards/sof_da7219.c

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@
1919
#include "sof_maxim_common.h"
2020

2121
/* Driver-specific board quirks: from bit 0 to 7 */
22-
#define SOF_DA7219_JSL_BOARD BIT(0)
23-
#define SOF_DA7219_MCLK_EN BIT(1)
22+
#define SOF_DA7219_CML_BOARD BIT(0)
23+
#define SOF_DA7219_JSL_BOARD BIT(1)
24+
#define SOF_DA7219_MCLK_EN BIT(2)
2425

2526
#define DIALOG_CODEC_DAI "da7219-hifi"
2627

@@ -292,6 +293,14 @@ sof_card_dai_links_create(struct device *dev, struct snd_soc_card *card,
292293
return 0;
293294
}
294295

296+
#define CML_LINK_ORDER SOF_LINK_ORDER(SOF_LINK_AMP, \
297+
SOF_LINK_CODEC, \
298+
SOF_LINK_DMIC01, \
299+
SOF_LINK_IDISP_HDMI, \
300+
SOF_LINK_DMIC16K, \
301+
SOF_LINK_NONE, \
302+
SOF_LINK_NONE)
303+
295304
#define JSL_LINK_ORDER SOF_LINK_ORDER(SOF_LINK_AMP, \
296305
SOF_LINK_CODEC, \
297306
SOF_LINK_DMIC01, \
@@ -320,7 +329,10 @@ static int audio_probe(struct platform_device *pdev)
320329
if (mach->mach_params.codec_mask & IDISP_CODEC_MASK)
321330
ctx->hdmi.idisp_codec = true;
322331

323-
if (board_quirk & SOF_DA7219_JSL_BOARD) {
332+
if (board_quirk & SOF_DA7219_CML_BOARD) {
333+
/* overwrite the DAI link order for CML boards */
334+
ctx->link_order_overwrite = CML_LINK_ORDER;
335+
} else if (board_quirk & SOF_DA7219_JSL_BOARD) {
324336
ctx->da7219.is_jsl_board = true;
325337

326338
/* overwrite the DAI link order for JSL boards */
@@ -380,6 +392,12 @@ static int audio_probe(struct platform_device *pdev)
380392
}
381393

382394
static const struct platform_device_id board_ids[] = {
395+
{
396+
.name = "cml_da7219_def",
397+
.driver_data = (kernel_ulong_t)(SOF_DA7219_CML_BOARD |
398+
SOF_SSP_PORT_CODEC(0) |
399+
SOF_SSP_PORT_AMP(1)),
400+
},
383401
{
384402
.name = "jsl_da7219_def",
385403
.driver_data = (kernel_ulong_t)(SOF_DA7219_JSL_BOARD |

0 commit comments

Comments
 (0)