Skip to content

Commit c7f9523

Browse files
brentlubroonie
authored andcommitted
ASoC: Intel: sof_da7219: add glk_da7219_def for glk boards
Add the board config glk_da7219_def to da7219 machine driver for all glk boards using default SSP port allocation (headphone codec on SSP2, 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 35ca486 commit c7f9523

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

sound/soc/intel/boards/sof_da7219.c

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

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

2627
#define DIALOG_CODEC_DAI "da7219-hifi"
2728

@@ -296,6 +297,14 @@ sof_card_dai_links_create(struct device *dev, struct snd_soc_card *card,
296297
return 0;
297298
}
298299

300+
#define GLK_LINK_ORDER SOF_LINK_ORDER(SOF_LINK_AMP, \
301+
SOF_LINK_CODEC, \
302+
SOF_LINK_DMIC01, \
303+
SOF_LINK_IDISP_HDMI, \
304+
SOF_LINK_NONE, \
305+
SOF_LINK_NONE, \
306+
SOF_LINK_NONE)
307+
299308
#define CML_LINK_ORDER SOF_LINK_ORDER(SOF_LINK_AMP, \
300309
SOF_LINK_CODEC, \
301310
SOF_LINK_DMIC01, \
@@ -333,7 +342,13 @@ static int audio_probe(struct platform_device *pdev)
333342
if (mach->mach_params.codec_mask & IDISP_CODEC_MASK)
334343
ctx->hdmi.idisp_codec = true;
335344

336-
if (board_quirk & SOF_DA7219_CML_BOARD) {
345+
if (board_quirk & SOF_DA7219_GLK_BOARD) {
346+
/* dmic16k not support */
347+
ctx->dmic_be_num = 1;
348+
349+
/* overwrite the DAI link order for GLK boards */
350+
ctx->link_order_overwrite = GLK_LINK_ORDER;
351+
} else if (board_quirk & SOF_DA7219_CML_BOARD) {
337352
/* overwrite the DAI link order for CML boards */
338353
ctx->link_order_overwrite = CML_LINK_ORDER;
339354

@@ -427,6 +442,12 @@ static int audio_probe(struct platform_device *pdev)
427442
}
428443

429444
static const struct platform_device_id board_ids[] = {
445+
{
446+
.name = "glk_da7219_def",
447+
.driver_data = (kernel_ulong_t)(SOF_DA7219_GLK_BOARD |
448+
SOF_SSP_PORT_CODEC(2) |
449+
SOF_SSP_PORT_AMP(1)),
450+
},
430451
{
431452
.name = "cml_da7219_def",
432453
.driver_data = (kernel_ulong_t)(SOF_DA7219_CML_BOARD |

0 commit comments

Comments
 (0)