[alsa-devel] [PATCH 3/3] ALSA: hda: register selectively for SPT-LP

Mark Brown broonie at kernel.org
Thu Apr 30 22:33:55 CEST 2015


On Thu, Apr 30, 2015 at 08:22:36PM +0530, Vinod Koul wrote:

> -	/* Sunrise Point-LP */
> -	{ PCI_DEVICE(0x8086, 0x9d70),
> -	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_SKYLAKE },

> +static const struct pci_device_id azx_intel_adsp_ids[] = {
> +	/* Sunrise Point-LP */
> +	{ PCI_DEVICE(0x8086, 0x9d70),
> +	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_SKYLAKE },
> +	{ 0, }
> +};
> +MODULE_DEVICE_TABLE(pci, azx_intel_adsp_ids);
> +

>  static int __init azx_module_init(void)
>  {
>  	int ret;
>  
>  	ret = pci_register_driver(&azx_driver);
>  
> +	if (!hdac_adsp_enable)
> +		ret = pci_register_driver(&azx_intel_adsp_driver);

This feels like the wrong idiom here.  I'd expect us to do this by
binding to the device but ignoring the DSP functionality, or if the
device has only DSP functionality (it's not clear with the context I
have but I think that's the case) just printing a message and not
telling the sound core about it.  Having the driver just fail to load
seems like it might be a bit obscure.

Though to be honest if it *is* going to register as a separate HDA
device then it seems like userspace quirking for this is just as viable.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20150430/e823d1d2/attachment-0001.sig>


More information about the Alsa-devel mailing list