[alsa-devel] [PATCH] ASoC: Intel: boards: Add Cometlake machine driver support

Pierre-Louis Bossart pierre-louis.bossart at linux.intel.com
Thu Aug 8 21:15:15 CEST 2019


>     +       } else if (soc_intel_is_cml()) {
>     +               unsigned int i;
>     +
>     + broxton_audio_card.name <http://broxton_audio_card.name> =
>     "cmlda7219max";
>     +
>     +               for (i = 0; i < ARRAY_SIZE(broxton_dais); i++) {
>     +                       /* MAXIM_CODEC is connected to SSP1. */
>     +                       if (!strcmp(broxton_dais[i].codecs->dai_name,
>     +                                       BXT_MAXIM_CODEC_DAI)) {
>     +                               broxton_dais[i].id = 1;
>     +                               broxton_dais[i].name = "SSP1-Codec";
>     +                               broxton_dais[i].cpus->dai_name =
>     "SSP1 Pin";
>     +                       }
>     +                       /* DIALOG_CODEC is connected to SSP0 */
>     +                       else if
>     (!strcmp(broxton_dais[i].codecs->dai_name,
>     +                                       BXT_DIALOG_CODEC_DAI)) {
>     +                               broxton_dais[i].id = 0;
>     +                               broxton_dais[i].name = "SSP0-Codec";
>     +                               broxton_dais[i].cpus->dai_name =
>     "SSP0 Pin";
>     +                       }
>     +               }
>              }
> 
> Would it be possible to keep the ID's unchanged? Its quite confusing 
> with so many platforms reusing the machine driver so it would help if 
> the changes are minimal.
> I understand why you want to change the ID's but it would be simpler to 
> just use the existing ID's in topology I think.

Ranjani, just to avoid confusion here, what 'ID' are you referring to?

I can see that in the existing GLK code (copied below) the .id field is 
not touched, only the name and dai_name are changed, is this what you 
were hinting at?

	if (soc_intel_is_glk()) {
		unsigned int i;

		broxton_audio_card.name = "glkda7219max";
		/* Fixup the SSP entries for geminilake */
		for (i = 0; i < ARRAY_SIZE(broxton_dais); i++) {
			/* MAXIM_CODEC is connected to SSP1. */
			if (!strcmp(broxton_dais[i].codecs->dai_name,
				    BXT_MAXIM_CODEC_DAI)) {
				broxton_dais[i].name = "SSP1-Codec";
				broxton_dais[i].cpus->dai_name = "SSP1 Pin";
			}
			/* DIALOG_CODE is connected to SSP2 */
			else if (!strcmp(broxton_dais[i].codecs->dai_name,
					 BXT_DIALOG_CODEC_DAI)) {
				broxton_dais[i].name = "SSP2-Codec";
				broxton_dais[i].cpus->dai_name = "SSP2 Pin";
			}
		}
	}



More information about the Alsa-devel mailing list