[alsa-devel] [PATCH v2 3/7] ASoC: hda - add soc hda codec driver wrapper

Vinod Koul vinod.koul at intel.com
Fri Apr 17 13:34:54 CEST 2015


On Fri, Apr 17, 2015 at 11:42:07AM +0200, Takashi Iwai wrote:
> At Fri, 17 Apr 2015 14:43:16 +0530,
> Vinod Koul wrote:
> > +/*
> > + * find a matching vendor id
> > + */
> > +static int hda_codec_match(struct hdac_device *dev, struct hdac_driver *drv)
> > +{
> > +	struct hda_soc_codec_driver *driver =
> > +		container_of(drv, struct hda_soc_codec_driver, core);
> > +
> > +	if (driver->id_table) {
> > +		const struct hda_soc_device_id *id  = driver->id_table;
> > +
> > +		while (id->name[0]) {
> > +			if (dev->vendor_id == id->id)
> > +				return 1;
> > +			id++;
> 
> Does checking only the vendor id suffice?  In the legacy driver, we
> had to check sometimes the revision number.  (Or, some Realtek codecs
> give different names depending on the revision id, etc.)
Rightly pointed so, we definately need revision id too

I will fix this up
-- 
~Vinod


More information about the Alsa-devel mailing list