diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2015-10-01 13:02:12 (GMT) |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-10-02 16:17:00 (GMT) |
commit | 6f81ba19ace2282f2560f5ec3a827ec5370825cb (patch) | |
tree | 24fb5eb0c58e5f9a365cf0a072a9b2bef07b54e7 /sound/firewire/tascam/tascam.c | |
parent | c0949b278515da948597b4a1a2726f42591ef385 (diff) | |
download | linux-6f81ba19ace2282f2560f5ec3a827ec5370825cb.tar.xz |
ALSA: firewire-tascam: add a structure for model-dependent parameters.
TASCAM FireWire series doesn't tell drivers their capabilities, thus
the drivers should have model-dependent parameters and apply it to
detected devices.
This commit adds a structure to represent such parameters.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/tascam/tascam.c')
-rw-r--r-- | sound/firewire/tascam/tascam.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/sound/firewire/tascam/tascam.c b/sound/firewire/tascam/tascam.c index 9f2d2a3..9ac09cb 100644 --- a/sound/firewire/tascam/tascam.c +++ b/sound/firewire/tascam/tascam.c @@ -12,6 +12,39 @@ MODULE_DESCRIPTION("TASCAM FireWire series Driver"); MODULE_AUTHOR("Takashi Sakamoto <o-takashi@sakamocchi.jp>"); MODULE_LICENSE("GPL v2"); +static struct snd_tscm_spec model_specs[] = { + { + .name = "FW-1884", + .has_adat = true, + .has_spdif = true, + .pcm_capture_analog_channels = 8, + .pcm_playback_analog_channels = 8, + .midi_capture_ports = 4, + .midi_playback_ports = 4, + .is_controller = true, + }, + { + .name = "FW-1804", + .has_adat = true, + .has_spdif = true, + .pcm_capture_analog_channels = 8, + .pcm_playback_analog_channels = 2, + .midi_capture_ports = 2, + .midi_playback_ports = 4, + .is_controller = false, + }, + { + .name = "FW-1082", + .has_adat = false, + .has_spdif = true, + .pcm_capture_analog_channels = 8, + .pcm_playback_analog_channels = 2, + .midi_capture_ports = 2, + .midi_playback_ports = 2, + .is_controller = true, + }, +}; + static int check_name(struct snd_tscm *tscm) { struct fw_device *fw_dev = fw_parent_device(tscm->unit); @@ -72,6 +105,7 @@ static int snd_tscm_probe(struct fw_unit *unit, tscm = card->private_data; tscm->card = card; tscm->unit = fw_unit_get(unit); + tscm->spec = (const struct snd_tscm_spec *)entry->driver_data; mutex_init(&tscm->mutex); @@ -113,6 +147,7 @@ static const struct ieee1394_device_id snd_tscm_id_table[] = { .vendor_id = 0x00022e, .specifier_id = 0x00022e, .version = 0x800003, + .driver_data = (kernel_ulong_t)&model_specs[2], }, /* FW-1884 */ { @@ -122,6 +157,7 @@ static const struct ieee1394_device_id snd_tscm_id_table[] = { .vendor_id = 0x00022e, .specifier_id = 0x00022e, .version = 0x800000, + .driver_data = (kernel_ulong_t)&model_specs[0], }, /* FW-1804 mey be supported if IDs are clear. */ /* FE-08 requires reverse-engineering because it just has faders. */ |