On Fri, Feb 16, 2018 at 01:03:48PM +0530, Vijendar Mukunda wrote: > Implemented dma driver changes to support BT I2S controller > instance. Some sort of description of the changes would make this a lot easier to review. > + if (strcmp(prtd->cpu_dai->name, "designware-i2s.1.auto") == 0) { > + adata->i2s_play_instance = I2S_SP_INSTANCE; > + adata->i2ssp_renderbytescount = 0; > + } > + if (strcmp(prtd->cpu_dai->name, "designware-i2s.3.auto") == 0) { > + adata->i2s_play_instance = I2S_BT_INSTANCE; > + adata->i2sbt_renderbytescount = 0; > + } This strcmp on what looks like an autogenerated DAI name seems a bit fragile, especially given that we just silently accept cases where we fail to match anything. Why are we doing things this way rather than at least using explicitly set names? > + if (adata->asic_type != CHIP_CARRIZO) { > + if (adata->play_i2sbt_stream && > + adata->play_i2sbt_stream->runtime) { As ever please use switch statements for quirking, it makes life easier when more variants appear.
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel