summaryrefslogtreecommitdiff
path: root/sound/firewire/fireface/ff.c
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2017-03-31 22:06:01 +0900
committerTakashi Iwai <tiwai@suse.de>2017-04-05 21:31:28 +0200
commited90f91a17112d474909bd820f1bb65a5480959d (patch)
tree4b844d8fd10cc6eec6f8346c2f50babe5c804f10 /sound/firewire/fireface/ff.c
parent324540c4e05c09c007f9e358cacb30b38f296bcc (diff)
ALSA: fireface: add model specific structure
RME Fireface series has several models and their specifications are different. Currently, we find no way to retrieve the specifications from actual devices and need to implement them in this driver. This commit adds a structure to describe model specific data. This structure has an identical name for each unit, and maximum number of data channels in each mode. I'll describe about the mode in following commits. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/fireface/ff.c')
-rw-r--r--sound/firewire/fireface/ff.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sound/firewire/fireface/ff.c b/sound/firewire/fireface/ff.c
index 7c026396b8b5..5c2bd9222c97 100644
--- a/sound/firewire/fireface/ff.c
+++ b/sound/firewire/fireface/ff.c
@@ -17,13 +17,12 @@ MODULE_LICENSE("GPL v2");
static void name_card(struct snd_ff *ff)
{
struct fw_device *fw_dev = fw_parent_device(ff->unit);
- const char *const model = "Fireface Skeleton";
strcpy(ff->card->driver, "Fireface");
- strcpy(ff->card->shortname, model);
- strcpy(ff->card->mixername, model);
+ strcpy(ff->card->shortname, ff->spec->name);
+ strcpy(ff->card->mixername, ff->spec->name);
snprintf(ff->card->longname, sizeof(ff->card->longname),
- "RME %s, GUID %08x%08x at %s, S%d", model,
+ "RME %s, GUID %08x%08x at %s, S%d", ff->spec->name,
fw_dev->config_rom[3], fw_dev->config_rom[4],
dev_name(&ff->unit->device), 100 << fw_dev->max_speed);
}
@@ -86,6 +85,8 @@ static int snd_ff_probe(struct fw_unit *unit,
mutex_init(&ff->mutex);
+ ff->spec = (const struct snd_ff_spec *)entry->driver_data;
+
/* Register this sound card later. */
INIT_DEFERRABLE_WORK(&ff->dwork, do_registration);
snd_fw_schedule_registration(unit, &ff->dwork);