[PATCH] ALSA: usb-audio: Use the new macro for HP Dock rename quirks

Jaroslav Kysela perex at perex.cz
Mon Jun 8 10:37:12 CEST 2020


Dne 08. 06. 20 v 9:15 Takashi Iwai napsal(a):
> Replace the open-code with the new QUIRK_DEVICE_PROFILE() macro for
> simplicity.
> 
> Fixes: 0c5086f56999 ("ALSA: usb-audio: Add vendor, product and profile name for HP Thunderbolt Dock")
> Signed-off-by: Takashi Iwai <tiwai at suse.de>
> ---

Takashi, could we export the profile (hint) for new USB cards via the 
components string - snd_component_add()? The long name seems not appropriate 
for this. It's a GUI string (which is mangled now).

					Jaroslav

>   sound/usb/quirks-table.h | 16 ++++------------
>   1 file changed, 4 insertions(+), 12 deletions(-)
> 
> diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h
> index 90d65bfa733d..4ec491011b19 100644
> --- a/sound/usb/quirks-table.h
> +++ b/sound/usb/quirks-table.h
> @@ -43,22 +43,14 @@
>   /* HP Thunderbolt Dock Audio Headset */
>   {
>   	USB_DEVICE(0x03f0, 0x0269),
> -	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
> -		.vendor_name = "HP",
> -		.product_name = "Thunderbolt Dock Audio Headset",
> -		.profile_name = "HP-Thunderbolt-Dock-Audio-Headset",
> -		.ifnum = QUIRK_NO_INTERFACE
> -	}
> +	QUIRK_DEVICE_PROFILE("HP", "Thunderbolt Dock Audio Headset",
> +			     "HP-Thunderbolt-Dock-Audio-Headset"),
>   },
>   /* HP Thunderbolt Dock Audio Module */
>   {
>   	USB_DEVICE(0x03f0, 0x0567),
> -	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
> -		.vendor_name = "HP",
> -		.product_name = "Thunderbolt Dock Audio Module",
> -		.profile_name = "HP-Thunderbolt-Dock-Audio-Module",
> -		.ifnum = QUIRK_NO_INTERFACE
> -	}
> +	QUIRK_DEVICE_PROFILE("HP", "Thunderbolt Dock Audio Module",
> +			     "HP-Thunderbolt-Dock-Audio-Module"),
>   },
>   /* FTDI devices */
>   {
> 


-- 
Jaroslav Kysela <perex at perex.cz>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.


More information about the Alsa-devel mailing list