Skip to content

Commit 628eb47

Browse files
committed
ASoC: sdw_utils: add component_name string to dai_info
Currently the card->components string is extracted from DAI name. And different codecs use different way to extract the components string in their rtd_init. Add the component string to the asoc_sdw_dai_info struct helps the machine driver to generate the card->components string without rely on the rtd_init. And can combine different components to a combined string to meet the UCM requirement. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
1 parent c6e20f3 commit 628eb47

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

include/sound/soc_sdw_utils.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ struct asoc_sdw_codec_info;
4646
struct asoc_sdw_dai_info {
4747
const bool direction[2]; /* playback & capture support */
4848
const char *dai_name;
49+
const char *component_name;
4950
const int dai_type;
5051
const int dailink[2]; /* dailink id for each direction */
5152
const struct snd_kcontrol_new *controls;

sound/soc/sdw_utils/soc_sdw_utils.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@ struct asoc_sdw_codec_info codec_info_list[] = {
275275
{
276276
.direction = {true, false},
277277
.dai_name = "rt1320-aif1",
278+
.component_name = "rt1320",
278279
.dai_type = SOC_SDW_DAI_TYPE_AMP,
279280
.dailink = {SOC_SDW_AMP_OUT_DAI_ID, SOC_SDW_UNUSED_DAI_ID},
280281
.init = asoc_sdw_rt_amp_init,
@@ -409,6 +410,7 @@ struct asoc_sdw_codec_info codec_info_list[] = {
409410
{
410411
.direction = {true, false},
411412
.dai_name = "rt722-sdca-aif2",
413+
.component_name = "rt722",
412414
.dai_type = SOC_SDW_DAI_TYPE_AMP,
413415
/* No feedback capability is provided by rt722-sdca codec driver*/
414416
.dailink = {SOC_SDW_AMP_OUT_DAI_ID, SOC_SDW_UNUSED_DAI_ID},
@@ -438,6 +440,7 @@ struct asoc_sdw_codec_info codec_info_list[] = {
438440
{
439441
.direction = {true, true},
440442
.dai_name = "max98373-aif1",
443+
.component_name = "mx8373",
441444
.dai_type = SOC_SDW_DAI_TYPE_AMP,
442445
.dailink = {SOC_SDW_AMP_OUT_DAI_ID, SOC_SDW_AMP_IN_DAI_ID},
443446
.init = asoc_sdw_maxim_init,
@@ -456,6 +459,7 @@ struct asoc_sdw_codec_info codec_info_list[] = {
456459
{
457460
.direction = {true, false},
458461
.dai_name = "max98363-aif1",
462+
.component_name = "mx8363",
459463
.dai_type = SOC_SDW_DAI_TYPE_AMP,
460464
.dailink = {SOC_SDW_AMP_OUT_DAI_ID, SOC_SDW_UNUSED_DAI_ID},
461465
.init = asoc_sdw_maxim_init,
@@ -491,6 +495,7 @@ struct asoc_sdw_codec_info codec_info_list[] = {
491495
{
492496
.direction = {true, false},
493497
.dai_name = "cs35l56-sdw1",
498+
.component_name = "cs35l56",
494499
.dai_type = SOC_SDW_DAI_TYPE_AMP,
495500
.dailink = {SOC_SDW_AMP_OUT_DAI_ID, SOC_SDW_UNUSED_DAI_ID},
496501
.init = asoc_sdw_cs_amp_init,
@@ -516,6 +521,7 @@ struct asoc_sdw_codec_info codec_info_list[] = {
516521
{
517522
.direction = {true, false},
518523
.dai_name = "cs35l56-sdw1",
524+
.component_name = "cs35l56",
519525
.dai_type = SOC_SDW_DAI_TYPE_AMP,
520526
.dailink = {SOC_SDW_AMP_OUT_DAI_ID, SOC_SDW_UNUSED_DAI_ID},
521527
.init = asoc_sdw_cs_amp_init,

0 commit comments

Comments
 (0)