static void name_card(struct snd_motu *motu) { struct fw_device *fw_dev = fw_parent_device(motu->unit); struct fw_csr_iterator it; int key, val; u32 version = 0; fw_csr_iterator_init(&it, motu->unit->directory); while (fw_csr_iterator_next(&it, &key, &val)) { switch (key) { case CSR_MODEL: version = val; break; } } strcpy(motu->card->driver, "FW-MOTU"); strcpy(motu->card->shortname, motu->spec->name); strcpy(motu->card->mixername, motu->spec->name); snprintf(motu->card->longname, sizeof(motu->card->longname), "MOTU %s (version:%06x), GUID %08x%08x at %s, S%d", motu->spec->name, version, fw_dev->config_rom[3], fw_dev->config_rom[4], dev_name(&motu->unit->device), 100 << fw_dev->max_speed); }
static int detect_quirks(struct snd_oxfw *oxfw) { struct fw_device *fw_dev = fw_parent_device(oxfw->unit); struct fw_csr_iterator it; int key, val; int vendor, model; /* * Add ALSA control elements for two models to keep compatibility to * old firewire-speaker module. */ if (oxfw->entry->vendor_id == VENDOR_GRIFFIN) return snd_oxfw_add_spkr(oxfw, false); if (oxfw->entry->vendor_id == VENDOR_LACIE) return snd_oxfw_add_spkr(oxfw, true); /* * Stanton models supports asynchronous transactions for unique MIDI * messages. */ if (oxfw->entry->vendor_id == OUI_STANTON) { /* No physical MIDI ports. */ oxfw->midi_input_ports = 0; oxfw->midi_output_ports = 0; /* Output stream exists but no data channels are useful. */ oxfw->has_output = false; return snd_oxfw_scs1x_add(oxfw); } /* * TASCAM FireOne has physical control and requires a pair of additional * MIDI ports. */ if (oxfw->entry->vendor_id == VENDOR_TASCAM) { oxfw->midi_input_ports++; oxfw->midi_output_ports++; return 0; } /* Seek from Root Directory of Config ROM. */ vendor = model = 0; fw_csr_iterator_init(&it, fw_dev->config_rom + 5); while (fw_csr_iterator_next(&it, &key, &val)) { if (key == CSR_VENDOR) vendor = val; else if (key == CSR_MODEL) model = val; } /* * Mackie Onyx Satellite with base station has a quirk to report a wrong * value in 'dbs' field of CIP header against its format information. */ if (vendor == VENDOR_LOUD && model == MODEL_SATELLITE) oxfw->wrong_dbs = true; return 0; }