From 07eca5fc3ebad1d33bc12a2f09670c0edd8e6eb6 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Wed, 2 May 2018 14:45:37 +0200 Subject: ALSA: usb-audio: Allow to override the longname string Historically USB-audio driver sets the card's longname field with the details of the device and the bus information. It's good per se, but not preferable when it's referred as the identifier for UCM profile. This patch adds a quirk profile_name field to override the card's longname string to a pre-defined one, so that one can create a unique and consistent ID string for the specific USB device via a quirk table to be used as a UCM profile name. The patch does a slight code refactoring to split out the functions to set shortname and longname fields as well. Signed-off-by: Takashi Iwai --- sound/usb/usbaudio.h | 1 + 1 file changed, 1 insertion(+) (limited to 'sound/usb/usbaudio.h') diff --git a/sound/usb/usbaudio.h b/sound/usb/usbaudio.h index 32f4a5425536..1cb6b3e9483c 100644 --- a/sound/usb/usbaudio.h +++ b/sound/usb/usbaudio.h @@ -112,6 +112,7 @@ enum quirk_type { struct snd_usb_audio_quirk { const char *vendor_name; const char *product_name; + const char *profile_name; /* override the card->longname */ int16_t ifnum; uint16_t type; const void *data; -- cgit v1.2.3