[alsa-devel] [PATCH v2 3/5] ASoC: Intel: Add Geminilake Dialog Maxim machine driver support
Naveen M
naveen.m at intel.com
Wed Apr 11 19:33:36 CEST 2018
On Wed, Apr 11, 2018 at 12:06:52PM -0500, Pierre-Louis Bossart wrote:
> On 4/11/18 11:34 AM, Mark Brown wrote:
> >On Wed, Apr 11, 2018 at 11:20:10AM -0500, Pierre-Louis Bossart wrote:
> >
> >>>+static char glk_spk_dai_name[10];
> >>>+static char glk_hs_dai_name[10];
> >
> >>Off-by-one? "SSPx-Codec" would be 11 chars if you include null termination.
> >
> >Or avoid needing global statics entirely...
> >
> >>> static int broxton_audio_probe(struct platform_device *pdev)
> >>> {
> >>> struct bxt_card_private *ctx;
> >>>+ int dai_index = 8;
> >
> >>maybe better to do an explicit search that hard-code values?
> >>This will actually not work if you have an additional FE for headset on GLK,
> >>or you are assuming a dependency on a patch added later in the series - not
> >>good.
> >
> >Definitely, this is just a recipe for fragility.
>
> Which reminds me btw that we talked about adding a helper to dynamically
> change fields in a dailink (codec/cpu/dai names) instead of doing this in
> multiple machine drivers, e.g.
>
> snd_soc_fixup_dailink(bxt_dailink, device_name, CPU_DAI_NAME, "Pin1");
> snd_soc_fixup_dailink(bxt_dailink, device_name, DAI_NAME, "SSP5-Codec");
> snd_soc_fixup_dailink(bxt_dailink, device_name, CODEC_NAME, hid-name);
Thanks I Got it, will modify the patch and update.
--
More information about the Alsa-devel
mailing list