|
@@ -59,6 +59,7 @@ static bool detect_loud_models(struct fw_unit *unit)
|
|
static int name_card(struct snd_oxfw *oxfw)
|
|
static int name_card(struct snd_oxfw *oxfw)
|
|
{
|
|
{
|
|
struct fw_device *fw_dev = fw_parent_device(oxfw->unit);
|
|
struct fw_device *fw_dev = fw_parent_device(oxfw->unit);
|
|
|
|
+ const struct device_info *info;
|
|
char vendor[24];
|
|
char vendor[24];
|
|
char model[32];
|
|
char model[32];
|
|
const char *d, *v, *m;
|
|
const char *d, *v, *m;
|
|
@@ -84,10 +85,12 @@ static int name_card(struct snd_oxfw *oxfw)
|
|
be32_to_cpus(&firmware);
|
|
be32_to_cpus(&firmware);
|
|
|
|
|
|
/* to apply card definitions */
|
|
/* to apply card definitions */
|
|
- if (oxfw->device_info) {
|
|
|
|
- d = oxfw->device_info->driver_name;
|
|
|
|
- v = oxfw->device_info->vendor_name;
|
|
|
|
- m = oxfw->device_info->model_name;
|
|
|
|
|
|
+ if (oxfw->entry->vendor_id == VENDOR_GRIFFIN ||
|
|
|
|
+ oxfw->entry->vendor_id == VENDOR_LACIE) {
|
|
|
|
+ info = (const struct device_info *)oxfw->entry->driver_data;
|
|
|
|
+ d = info->driver_name;
|
|
|
|
+ v = info->vendor_name;
|
|
|
|
+ m = info->model_name;
|
|
} else {
|
|
} else {
|
|
d = "OXFW";
|
|
d = "OXFW";
|
|
v = vendor;
|
|
v = vendor;
|
|
@@ -139,6 +142,16 @@ static void detect_quirks(struct snd_oxfw *oxfw)
|
|
int key, val;
|
|
int key, val;
|
|
int vendor, model;
|
|
int vendor, model;
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
+ * 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;
|
|
|
|
+ }
|
|
|
|
+
|
|
/* Seek from Root Directory of Config ROM. */
|
|
/* Seek from Root Directory of Config ROM. */
|
|
vendor = model = 0;
|
|
vendor = model = 0;
|
|
fw_csr_iterator_init(&it, fw_dev->config_rom + 5);
|
|
fw_csr_iterator_init(&it, fw_dev->config_rom + 5);
|
|
@@ -155,25 +168,16 @@ static void detect_quirks(struct snd_oxfw *oxfw)
|
|
*/
|
|
*/
|
|
if (vendor == VENDOR_LOUD && model == MODEL_SATELLITE)
|
|
if (vendor == VENDOR_LOUD && model == MODEL_SATELLITE)
|
|
oxfw->wrong_dbs = true;
|
|
oxfw->wrong_dbs = true;
|
|
-
|
|
|
|
- /*
|
|
|
|
- * TASCAM FireOne has physical control and requires a pair of additional
|
|
|
|
- * MIDI ports.
|
|
|
|
- */
|
|
|
|
- if (vendor == VENDOR_TASCAM) {
|
|
|
|
- oxfw->midi_input_ports++;
|
|
|
|
- oxfw->midi_output_ports++;
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
|
|
|
|
static int oxfw_probe(struct fw_unit *unit,
|
|
static int oxfw_probe(struct fw_unit *unit,
|
|
- const struct ieee1394_device_id *id)
|
|
|
|
|
|
+ const struct ieee1394_device_id *entry)
|
|
{
|
|
{
|
|
struct snd_card *card;
|
|
struct snd_card *card;
|
|
struct snd_oxfw *oxfw;
|
|
struct snd_oxfw *oxfw;
|
|
int err;
|
|
int err;
|
|
|
|
|
|
- if ((id->vendor_id == VENDOR_LOUD) && !detect_loud_models(unit))
|
|
|
|
|
|
+ if (entry->vendor_id == VENDOR_LOUD && !detect_loud_models(unit))
|
|
return -ENODEV;
|
|
return -ENODEV;
|
|
|
|
|
|
err = snd_card_new(&unit->device, -1, NULL, THIS_MODULE,
|
|
err = snd_card_new(&unit->device, -1, NULL, THIS_MODULE,
|
|
@@ -186,7 +190,7 @@ static int oxfw_probe(struct fw_unit *unit,
|
|
oxfw->card = card;
|
|
oxfw->card = card;
|
|
mutex_init(&oxfw->mutex);
|
|
mutex_init(&oxfw->mutex);
|
|
oxfw->unit = fw_unit_get(unit);
|
|
oxfw->unit = fw_unit_get(unit);
|
|
- oxfw->device_info = (const struct device_info *)id->driver_data;
|
|
|
|
|
|
+ oxfw->entry = entry;
|
|
spin_lock_init(&oxfw->lock);
|
|
spin_lock_init(&oxfw->lock);
|
|
init_waitqueue_head(&oxfw->hwdep_wait);
|
|
init_waitqueue_head(&oxfw->hwdep_wait);
|
|
|
|
|
|
@@ -205,6 +209,8 @@ static int oxfw_probe(struct fw_unit *unit,
|
|
goto error;
|
|
goto error;
|
|
|
|
|
|
if (oxfw->device_info) {
|
|
if (oxfw->device_info) {
|
|
|
|
+ oxfw->device_info =
|
|
|
|
+ (const struct device_info *)entry->driver_data;
|
|
err = snd_oxfw_add_spkr(oxfw);
|
|
err = snd_oxfw_add_spkr(oxfw);
|
|
if (err < 0)
|
|
if (err < 0)
|
|
goto error;
|
|
goto error;
|