mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
ASoC: sdw_utils: add component_name string to dai_info
Currently the sdw machine driver uses different way to get the component name from the DAI name for different codecs in the rtd_init callback. It means that we need to rely on the rtd_init callback to get the component name. Add an optional component string to the asoc_sdw_dai_info struct allows the machine driver to get the component name directly. The commit adds the component names for the AMP dais for the preparation to set card->components string for combined speaker configs. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Shuming Fan <shumingf@realtek.com> Link: https://patch.msgid.link/20250625140430.311865-2-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
86731a2a65
commit
f792733e08
2 changed files with 8 additions and 0 deletions
|
@ -46,6 +46,7 @@ struct asoc_sdw_codec_info;
|
||||||
struct asoc_sdw_dai_info {
|
struct asoc_sdw_dai_info {
|
||||||
const bool direction[2]; /* playback & capture support */
|
const bool direction[2]; /* playback & capture support */
|
||||||
const char *dai_name;
|
const char *dai_name;
|
||||||
|
const char *component_name;
|
||||||
const int dai_type;
|
const int dai_type;
|
||||||
const int dailink[2]; /* dailink id for each direction */
|
const int dailink[2]; /* dailink id for each direction */
|
||||||
const struct snd_kcontrol_new *controls;
|
const struct snd_kcontrol_new *controls;
|
||||||
|
|
|
@ -135,6 +135,7 @@ struct asoc_sdw_codec_info codec_info_list[] = {
|
||||||
{
|
{
|
||||||
.direction = {true, false},
|
.direction = {true, false},
|
||||||
.dai_name = "rt712-sdca-aif2",
|
.dai_name = "rt712-sdca-aif2",
|
||||||
|
.component_name = "rt712",
|
||||||
.dai_type = SOC_SDW_DAI_TYPE_AMP,
|
.dai_type = SOC_SDW_DAI_TYPE_AMP,
|
||||||
.dailink = {SOC_SDW_AMP_OUT_DAI_ID, SOC_SDW_UNUSED_DAI_ID},
|
.dailink = {SOC_SDW_AMP_OUT_DAI_ID, SOC_SDW_UNUSED_DAI_ID},
|
||||||
.init = asoc_sdw_rt_amp_init,
|
.init = asoc_sdw_rt_amp_init,
|
||||||
|
@ -275,6 +276,7 @@ struct asoc_sdw_codec_info codec_info_list[] = {
|
||||||
{
|
{
|
||||||
.direction = {true, false},
|
.direction = {true, false},
|
||||||
.dai_name = "rt1320-aif1",
|
.dai_name = "rt1320-aif1",
|
||||||
|
.component_name = "rt1320",
|
||||||
.dai_type = SOC_SDW_DAI_TYPE_AMP,
|
.dai_type = SOC_SDW_DAI_TYPE_AMP,
|
||||||
.dailink = {SOC_SDW_AMP_OUT_DAI_ID, SOC_SDW_UNUSED_DAI_ID},
|
.dailink = {SOC_SDW_AMP_OUT_DAI_ID, SOC_SDW_UNUSED_DAI_ID},
|
||||||
.init = asoc_sdw_rt_amp_init,
|
.init = asoc_sdw_rt_amp_init,
|
||||||
|
@ -409,6 +411,7 @@ struct asoc_sdw_codec_info codec_info_list[] = {
|
||||||
{
|
{
|
||||||
.direction = {true, false},
|
.direction = {true, false},
|
||||||
.dai_name = "rt722-sdca-aif2",
|
.dai_name = "rt722-sdca-aif2",
|
||||||
|
.component_name = "rt722",
|
||||||
.dai_type = SOC_SDW_DAI_TYPE_AMP,
|
.dai_type = SOC_SDW_DAI_TYPE_AMP,
|
||||||
/* No feedback capability is provided by rt722-sdca codec driver*/
|
/* No feedback capability is provided by rt722-sdca codec driver*/
|
||||||
.dailink = {SOC_SDW_AMP_OUT_DAI_ID, SOC_SDW_UNUSED_DAI_ID},
|
.dailink = {SOC_SDW_AMP_OUT_DAI_ID, SOC_SDW_UNUSED_DAI_ID},
|
||||||
|
@ -438,6 +441,7 @@ struct asoc_sdw_codec_info codec_info_list[] = {
|
||||||
{
|
{
|
||||||
.direction = {true, true},
|
.direction = {true, true},
|
||||||
.dai_name = "max98373-aif1",
|
.dai_name = "max98373-aif1",
|
||||||
|
.component_name = "mx8373",
|
||||||
.dai_type = SOC_SDW_DAI_TYPE_AMP,
|
.dai_type = SOC_SDW_DAI_TYPE_AMP,
|
||||||
.dailink = {SOC_SDW_AMP_OUT_DAI_ID, SOC_SDW_AMP_IN_DAI_ID},
|
.dailink = {SOC_SDW_AMP_OUT_DAI_ID, SOC_SDW_AMP_IN_DAI_ID},
|
||||||
.init = asoc_sdw_maxim_init,
|
.init = asoc_sdw_maxim_init,
|
||||||
|
@ -456,6 +460,7 @@ struct asoc_sdw_codec_info codec_info_list[] = {
|
||||||
{
|
{
|
||||||
.direction = {true, false},
|
.direction = {true, false},
|
||||||
.dai_name = "max98363-aif1",
|
.dai_name = "max98363-aif1",
|
||||||
|
.component_name = "mx8363",
|
||||||
.dai_type = SOC_SDW_DAI_TYPE_AMP,
|
.dai_type = SOC_SDW_DAI_TYPE_AMP,
|
||||||
.dailink = {SOC_SDW_AMP_OUT_DAI_ID, SOC_SDW_UNUSED_DAI_ID},
|
.dailink = {SOC_SDW_AMP_OUT_DAI_ID, SOC_SDW_UNUSED_DAI_ID},
|
||||||
.init = asoc_sdw_maxim_init,
|
.init = asoc_sdw_maxim_init,
|
||||||
|
@ -491,6 +496,7 @@ struct asoc_sdw_codec_info codec_info_list[] = {
|
||||||
{
|
{
|
||||||
.direction = {true, false},
|
.direction = {true, false},
|
||||||
.dai_name = "cs35l56-sdw1",
|
.dai_name = "cs35l56-sdw1",
|
||||||
|
.component_name = "cs35l56",
|
||||||
.dai_type = SOC_SDW_DAI_TYPE_AMP,
|
.dai_type = SOC_SDW_DAI_TYPE_AMP,
|
||||||
.dailink = {SOC_SDW_AMP_OUT_DAI_ID, SOC_SDW_UNUSED_DAI_ID},
|
.dailink = {SOC_SDW_AMP_OUT_DAI_ID, SOC_SDW_UNUSED_DAI_ID},
|
||||||
.init = asoc_sdw_cs_amp_init,
|
.init = asoc_sdw_cs_amp_init,
|
||||||
|
@ -516,6 +522,7 @@ struct asoc_sdw_codec_info codec_info_list[] = {
|
||||||
{
|
{
|
||||||
.direction = {true, false},
|
.direction = {true, false},
|
||||||
.dai_name = "cs35l56-sdw1",
|
.dai_name = "cs35l56-sdw1",
|
||||||
|
.component_name = "cs35l56",
|
||||||
.dai_type = SOC_SDW_DAI_TYPE_AMP,
|
.dai_type = SOC_SDW_DAI_TYPE_AMP,
|
||||||
.dailink = {SOC_SDW_AMP_OUT_DAI_ID, SOC_SDW_UNUSED_DAI_ID},
|
.dailink = {SOC_SDW_AMP_OUT_DAI_ID, SOC_SDW_UNUSED_DAI_ID},
|
||||||
.init = asoc_sdw_cs_amp_init,
|
.init = asoc_sdw_cs_amp_init,
|
||||||
|
|
Loading…
Add table
Reference in a new issue