Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 1 | /* |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 2 | * oxfw.c - a part of driver for OXFW970/971 based devices |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 3 | * |
| 4 | * Copyright (c) Clemens Ladisch <clemens@ladisch.de> |
| 5 | * Licensed under the terms of the GNU General Public License, version 2. |
| 6 | */ |
| 7 | |
Takashi Sakamoto | e2786ca | 2014-11-29 00:59:27 +0900 | [diff] [blame] | 8 | #include "oxfw.h" |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 9 | |
| 10 | #define OXFORD_FIRMWARE_ID_ADDRESS (CSR_REGISTER_BASE + 0x50000) |
| 11 | /* 0x970?vvvv or 0x971?vvvv, where vvvv = firmware version */ |
| 12 | |
| 13 | #define OXFORD_HARDWARE_ID_ADDRESS (CSR_REGISTER_BASE + 0x90020) |
| 14 | #define OXFORD_HARDWARE_ID_OXFW970 0x39443841 |
| 15 | #define OXFORD_HARDWARE_ID_OXFW971 0x39373100 |
| 16 | |
Takashi Sakamoto | ec4dba5 | 2014-12-09 00:10:45 +0900 | [diff] [blame] | 17 | #define VENDOR_LOUD 0x000ff2 |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 18 | #define VENDOR_GRIFFIN 0x001292 |
Takashi Sakamoto | ec4dba5 | 2014-12-09 00:10:45 +0900 | [diff] [blame] | 19 | #define VENDOR_BEHRINGER 0x001564 |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 20 | #define VENDOR_LACIE 0x00d04b |
| 21 | |
| 22 | #define SPECIFIER_1394TA 0x00a02d |
| 23 | #define VERSION_AVC 0x010001 |
| 24 | |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 25 | MODULE_DESCRIPTION("Oxford Semiconductor FW970/971 driver"); |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 26 | MODULE_AUTHOR("Clemens Ladisch <clemens@ladisch.de>"); |
| 27 | MODULE_LICENSE("GPL v2"); |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 28 | MODULE_ALIAS("snd-firewire-speakers"); |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 29 | |
Takashi Sakamoto | ec4dba5 | 2014-12-09 00:10:45 +0900 | [diff] [blame] | 30 | static bool detect_loud_models(struct fw_unit *unit) |
| 31 | { |
| 32 | const char *const models[] = { |
| 33 | "Onyxi", |
| 34 | "Onyx-i", |
| 35 | "d.Pro", |
| 36 | "Mackie Onyx Satellite", |
| 37 | "Tapco LINK.firewire 4x6", |
| 38 | "U.420"}; |
| 39 | char model[32]; |
| 40 | unsigned int i; |
| 41 | int err; |
| 42 | |
| 43 | err = fw_csr_string(unit->directory, CSR_MODEL, |
| 44 | model, sizeof(model)); |
| 45 | if (err < 0) |
Dan Carpenter | 0d3aba3 | 2014-12-12 22:28:10 +0300 | [diff] [blame] | 46 | return false; |
Takashi Sakamoto | ec4dba5 | 2014-12-09 00:10:45 +0900 | [diff] [blame] | 47 | |
| 48 | for (i = 0; i < ARRAY_SIZE(models); i++) { |
| 49 | if (strcmp(models[i], model) == 0) |
| 50 | break; |
| 51 | } |
| 52 | |
| 53 | return (i < ARRAY_SIZE(models)); |
| 54 | } |
| 55 | |
Takashi Sakamoto | fec7b75 | 2014-12-09 00:10:40 +0900 | [diff] [blame] | 56 | static int name_card(struct snd_oxfw *oxfw) |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 57 | { |
Takashi Sakamoto | fec7b75 | 2014-12-09 00:10:40 +0900 | [diff] [blame] | 58 | struct fw_device *fw_dev = fw_parent_device(oxfw->unit); |
Takashi Sakamoto | ec4dba5 | 2014-12-09 00:10:45 +0900 | [diff] [blame] | 59 | char vendor[24]; |
| 60 | char model[32]; |
Takashi Sakamoto | fec7b75 | 2014-12-09 00:10:40 +0900 | [diff] [blame] | 61 | const char *d, *v, *m; |
| 62 | u32 firmware; |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 63 | int err; |
| 64 | |
Takashi Sakamoto | ec4dba5 | 2014-12-09 00:10:45 +0900 | [diff] [blame] | 65 | /* get vendor name from root directory */ |
| 66 | err = fw_csr_string(fw_dev->config_rom + 5, CSR_VENDOR, |
| 67 | vendor, sizeof(vendor)); |
| 68 | if (err < 0) |
| 69 | goto end; |
| 70 | |
| 71 | /* get model name from unit directory */ |
| 72 | err = fw_csr_string(oxfw->unit->directory, CSR_MODEL, |
| 73 | model, sizeof(model)); |
| 74 | if (err < 0) |
| 75 | goto end; |
| 76 | |
Takashi Sakamoto | fec7b75 | 2014-12-09 00:10:40 +0900 | [diff] [blame] | 77 | err = snd_fw_transaction(oxfw->unit, TCODE_READ_QUADLET_REQUEST, |
| 78 | OXFORD_FIRMWARE_ID_ADDRESS, &firmware, 4, 0); |
| 79 | if (err < 0) |
| 80 | goto end; |
| 81 | be32_to_cpus(&firmware); |
| 82 | |
Takashi Sakamoto | ec4dba5 | 2014-12-09 00:10:45 +0900 | [diff] [blame] | 83 | /* to apply card definitions */ |
| 84 | if (oxfw->device_info) { |
| 85 | d = oxfw->device_info->driver_name; |
| 86 | v = oxfw->device_info->vendor_name; |
| 87 | m = oxfw->device_info->model_name; |
| 88 | } else { |
| 89 | d = "OXFW"; |
| 90 | v = vendor; |
| 91 | m = model; |
| 92 | } |
Takashi Sakamoto | fec7b75 | 2014-12-09 00:10:40 +0900 | [diff] [blame] | 93 | |
| 94 | strcpy(oxfw->card->driver, d); |
| 95 | strcpy(oxfw->card->mixername, m); |
| 96 | strcpy(oxfw->card->shortname, m); |
| 97 | |
| 98 | snprintf(oxfw->card->longname, sizeof(oxfw->card->longname), |
| 99 | "%s %s (OXFW%x %04x), GUID %08x%08x at %s, S%d", |
| 100 | v, m, firmware >> 20, firmware & 0xffff, |
| 101 | fw_dev->config_rom[3], fw_dev->config_rom[4], |
| 102 | dev_name(&oxfw->unit->device), 100 << fw_dev->max_speed); |
| 103 | end: |
| 104 | return err; |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 105 | } |
| 106 | |
Takashi Sakamoto | 12ed719 | 2015-02-21 23:54:57 +0900 | [diff] [blame^] | 107 | /* |
| 108 | * This module releases the FireWire unit data after all ALSA character devices |
| 109 | * are released by applications. This is for releasing stream data or finishing |
| 110 | * transactions safely. Thus at returning from .remove(), this module still keep |
| 111 | * references for the unit. |
| 112 | */ |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 113 | static void oxfw_card_free(struct snd_card *card) |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 114 | { |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 115 | struct snd_oxfw *oxfw = card->private_data; |
Takashi Sakamoto | 5cd1d3f | 2014-12-09 00:10:42 +0900 | [diff] [blame] | 116 | unsigned int i; |
| 117 | |
Takashi Sakamoto | 12ed719 | 2015-02-21 23:54:57 +0900 | [diff] [blame^] | 118 | fw_unit_put(oxfw->unit); |
| 119 | |
Takashi Sakamoto | b0ac000 | 2014-12-09 00:10:46 +0900 | [diff] [blame] | 120 | for (i = 0; i < SND_OXFW_STREAM_FORMAT_ENTRIES; i++) { |
| 121 | kfree(oxfw->tx_stream_formats[i]); |
Takashi Sakamoto | 5cd1d3f | 2014-12-09 00:10:42 +0900 | [diff] [blame] | 122 | kfree(oxfw->rx_stream_formats[i]); |
Takashi Sakamoto | b0ac000 | 2014-12-09 00:10:46 +0900 | [diff] [blame] | 123 | } |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 124 | |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 125 | mutex_destroy(&oxfw->mutex); |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 126 | } |
| 127 | |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 128 | static int oxfw_probe(struct fw_unit *unit, |
Stefan Richter | 94a8715 | 2013-06-09 18:15:00 +0200 | [diff] [blame] | 129 | const struct ieee1394_device_id *id) |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 130 | { |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 131 | struct snd_card *card; |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 132 | struct snd_oxfw *oxfw; |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 133 | int err; |
| 134 | |
Takashi Sakamoto | ec4dba5 | 2014-12-09 00:10:45 +0900 | [diff] [blame] | 135 | if ((id->vendor_id == VENDOR_LOUD) && !detect_loud_models(unit)) |
| 136 | return -ENODEV; |
| 137 | |
Takashi Iwai | 06b45f0 | 2014-01-29 14:23:55 +0100 | [diff] [blame] | 138 | err = snd_card_new(&unit->device, -1, NULL, THIS_MODULE, |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 139 | sizeof(*oxfw), &card); |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 140 | if (err < 0) |
| 141 | return err; |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 142 | |
Takashi Sakamoto | e2786ca | 2014-11-29 00:59:27 +0900 | [diff] [blame] | 143 | card->private_free = oxfw_card_free; |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 144 | oxfw = card->private_data; |
| 145 | oxfw->card = card; |
| 146 | mutex_init(&oxfw->mutex); |
Takashi Sakamoto | 12ed719 | 2015-02-21 23:54:57 +0900 | [diff] [blame^] | 147 | oxfw->unit = fw_unit_get(unit); |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 148 | oxfw->device_info = (const struct device_info *)id->driver_data; |
Takashi Sakamoto | 05588d3 | 2014-12-09 00:10:48 +0900 | [diff] [blame] | 149 | spin_lock_init(&oxfw->lock); |
Takashi Sakamoto | 8985f4a | 2014-12-09 00:10:49 +0900 | [diff] [blame] | 150 | init_waitqueue_head(&oxfw->hwdep_wait); |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 151 | |
Takashi Sakamoto | 5cd1d3f | 2014-12-09 00:10:42 +0900 | [diff] [blame] | 152 | err = snd_oxfw_stream_discover(oxfw); |
| 153 | if (err < 0) |
| 154 | goto error; |
| 155 | |
Takashi Sakamoto | fec7b75 | 2014-12-09 00:10:40 +0900 | [diff] [blame] | 156 | err = name_card(oxfw); |
| 157 | if (err < 0) |
| 158 | goto error; |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 159 | |
Takashi Sakamoto | 3713d93 | 2014-11-29 00:59:28 +0900 | [diff] [blame] | 160 | err = snd_oxfw_create_pcm(oxfw); |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 161 | if (err < 0) |
| 162 | goto error; |
| 163 | |
Takashi Sakamoto | ec4dba5 | 2014-12-09 00:10:45 +0900 | [diff] [blame] | 164 | if (oxfw->device_info) { |
| 165 | err = snd_oxfw_create_mixer(oxfw); |
| 166 | if (err < 0) |
| 167 | goto error; |
| 168 | } |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 169 | |
Takashi Sakamoto | 3c96101 | 2014-12-09 00:10:43 +0900 | [diff] [blame] | 170 | snd_oxfw_proc_init(oxfw); |
| 171 | |
Takashi Sakamoto | 05588d3 | 2014-12-09 00:10:48 +0900 | [diff] [blame] | 172 | err = snd_oxfw_create_midi(oxfw); |
| 173 | if (err < 0) |
| 174 | goto error; |
| 175 | |
Takashi Sakamoto | 8985f4a | 2014-12-09 00:10:49 +0900 | [diff] [blame] | 176 | err = snd_oxfw_create_hwdep(oxfw); |
| 177 | if (err < 0) |
| 178 | goto error; |
| 179 | |
Takashi Sakamoto | b0ac000 | 2014-12-09 00:10:46 +0900 | [diff] [blame] | 180 | err = snd_oxfw_stream_init_simplex(oxfw, &oxfw->rx_stream); |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 181 | if (err < 0) |
| 182 | goto error; |
Takashi Sakamoto | b0ac000 | 2014-12-09 00:10:46 +0900 | [diff] [blame] | 183 | if (oxfw->has_output) { |
| 184 | err = snd_oxfw_stream_init_simplex(oxfw, &oxfw->tx_stream); |
| 185 | if (err < 0) |
| 186 | goto error; |
| 187 | } |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 188 | |
Takashi Sakamoto | e2786ca | 2014-11-29 00:59:27 +0900 | [diff] [blame] | 189 | err = snd_card_register(card); |
| 190 | if (err < 0) { |
Takashi Sakamoto | b0ac000 | 2014-12-09 00:10:46 +0900 | [diff] [blame] | 191 | snd_oxfw_stream_destroy_simplex(oxfw, &oxfw->rx_stream); |
| 192 | if (oxfw->has_output) |
| 193 | snd_oxfw_stream_destroy_simplex(oxfw, &oxfw->tx_stream); |
Takashi Sakamoto | e2786ca | 2014-11-29 00:59:27 +0900 | [diff] [blame] | 194 | goto error; |
| 195 | } |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 196 | dev_set_drvdata(&unit->device, oxfw); |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 197 | |
| 198 | return 0; |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 199 | error: |
| 200 | snd_card_free(card); |
| 201 | return err; |
| 202 | } |
| 203 | |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 204 | static void oxfw_bus_reset(struct fw_unit *unit) |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 205 | { |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 206 | struct snd_oxfw *oxfw = dev_get_drvdata(&unit->device); |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 207 | |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 208 | fcp_bus_reset(oxfw->unit); |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 209 | |
Takashi Sakamoto | e2786ca | 2014-11-29 00:59:27 +0900 | [diff] [blame] | 210 | mutex_lock(&oxfw->mutex); |
Takashi Sakamoto | b0ac000 | 2014-12-09 00:10:46 +0900 | [diff] [blame] | 211 | |
| 212 | snd_oxfw_stream_update_simplex(oxfw, &oxfw->rx_stream); |
| 213 | if (oxfw->has_output) |
| 214 | snd_oxfw_stream_update_simplex(oxfw, &oxfw->tx_stream); |
| 215 | |
Takashi Sakamoto | e2786ca | 2014-11-29 00:59:27 +0900 | [diff] [blame] | 216 | mutex_unlock(&oxfw->mutex); |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 217 | } |
| 218 | |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 219 | static void oxfw_remove(struct fw_unit *unit) |
Stefan Richter | 94a8715 | 2013-06-09 18:15:00 +0200 | [diff] [blame] | 220 | { |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 221 | struct snd_oxfw *oxfw = dev_get_drvdata(&unit->device); |
Stefan Richter | 94a8715 | 2013-06-09 18:15:00 +0200 | [diff] [blame] | 222 | |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 223 | snd_card_disconnect(oxfw->card); |
Stefan Richter | 94a8715 | 2013-06-09 18:15:00 +0200 | [diff] [blame] | 224 | |
Takashi Sakamoto | b0ac000 | 2014-12-09 00:10:46 +0900 | [diff] [blame] | 225 | snd_oxfw_stream_destroy_simplex(oxfw, &oxfw->rx_stream); |
| 226 | if (oxfw->has_output) |
| 227 | snd_oxfw_stream_destroy_simplex(oxfw, &oxfw->tx_stream); |
Stefan Richter | 94a8715 | 2013-06-09 18:15:00 +0200 | [diff] [blame] | 228 | |
Takashi Sakamoto | 12ed719 | 2015-02-21 23:54:57 +0900 | [diff] [blame^] | 229 | /* No need to wait for releasing card object in this context. */ |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 230 | snd_card_free_when_closed(oxfw->card); |
Stefan Richter | 94a8715 | 2013-06-09 18:15:00 +0200 | [diff] [blame] | 231 | } |
| 232 | |
| 233 | static const struct device_info griffin_firewave = { |
| 234 | .driver_name = "FireWave", |
Takashi Sakamoto | fec7b75 | 2014-12-09 00:10:40 +0900 | [diff] [blame] | 235 | .vendor_name = "Griffin", |
| 236 | .model_name = "FireWave", |
Stefan Richter | 94a8715 | 2013-06-09 18:15:00 +0200 | [diff] [blame] | 237 | .mixer_channels = 6, |
| 238 | .mute_fb_id = 0x01, |
| 239 | .volume_fb_id = 0x02, |
| 240 | }; |
| 241 | |
| 242 | static const struct device_info lacie_speakers = { |
| 243 | .driver_name = "FWSpeakers", |
Takashi Sakamoto | fec7b75 | 2014-12-09 00:10:40 +0900 | [diff] [blame] | 244 | .vendor_name = "LaCie", |
| 245 | .model_name = "FireWire Speakers", |
Stefan Richter | 94a8715 | 2013-06-09 18:15:00 +0200 | [diff] [blame] | 246 | .mixer_channels = 1, |
| 247 | .mute_fb_id = 0x01, |
| 248 | .volume_fb_id = 0x01, |
| 249 | }; |
| 250 | |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 251 | static const struct ieee1394_device_id oxfw_id_table[] = { |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 252 | { |
| 253 | .match_flags = IEEE1394_MATCH_VENDOR_ID | |
| 254 | IEEE1394_MATCH_MODEL_ID | |
| 255 | IEEE1394_MATCH_SPECIFIER_ID | |
| 256 | IEEE1394_MATCH_VERSION, |
| 257 | .vendor_id = VENDOR_GRIFFIN, |
| 258 | .model_id = 0x00f970, |
| 259 | .specifier_id = SPECIFIER_1394TA, |
| 260 | .version = VERSION_AVC, |
Stefan Richter | 94a8715 | 2013-06-09 18:15:00 +0200 | [diff] [blame] | 261 | .driver_data = (kernel_ulong_t)&griffin_firewave, |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 262 | }, |
| 263 | { |
| 264 | .match_flags = IEEE1394_MATCH_VENDOR_ID | |
| 265 | IEEE1394_MATCH_MODEL_ID | |
| 266 | IEEE1394_MATCH_SPECIFIER_ID | |
| 267 | IEEE1394_MATCH_VERSION, |
| 268 | .vendor_id = VENDOR_LACIE, |
| 269 | .model_id = 0x00f970, |
| 270 | .specifier_id = SPECIFIER_1394TA, |
| 271 | .version = VERSION_AVC, |
Stefan Richter | 94a8715 | 2013-06-09 18:15:00 +0200 | [diff] [blame] | 272 | .driver_data = (kernel_ulong_t)&lacie_speakers, |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 273 | }, |
Takashi Sakamoto | ec4dba5 | 2014-12-09 00:10:45 +0900 | [diff] [blame] | 274 | /* Behringer,F-Control Audio 202 */ |
| 275 | { |
| 276 | .match_flags = IEEE1394_MATCH_VENDOR_ID | |
| 277 | IEEE1394_MATCH_MODEL_ID, |
| 278 | .vendor_id = VENDOR_BEHRINGER, |
| 279 | .model_id = 0x00fc22, |
| 280 | }, |
| 281 | /* |
| 282 | * Any Mackie(Loud) models (name string/model id): |
| 283 | * Onyx-i series (former models): 0x081216 |
| 284 | * Mackie Onyx Satellite: 0x00200f |
| 285 | * Tapco LINK.firewire 4x6: 0x000460 |
| 286 | * d.2 pro: Unknown |
| 287 | * d.4 pro: Unknown |
| 288 | * U.420: Unknown |
| 289 | * U.420d: Unknown |
| 290 | */ |
| 291 | { |
| 292 | .match_flags = IEEE1394_MATCH_VENDOR_ID | |
| 293 | IEEE1394_MATCH_SPECIFIER_ID | |
| 294 | IEEE1394_MATCH_VERSION, |
| 295 | .vendor_id = VENDOR_LOUD, |
| 296 | .specifier_id = SPECIFIER_1394TA, |
| 297 | .version = VERSION_AVC, |
| 298 | }, |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 299 | { } |
| 300 | }; |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 301 | MODULE_DEVICE_TABLE(ieee1394, oxfw_id_table); |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 302 | |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 303 | static struct fw_driver oxfw_driver = { |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 304 | .driver = { |
| 305 | .owner = THIS_MODULE, |
| 306 | .name = KBUILD_MODNAME, |
| 307 | .bus = &fw_bus_type, |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 308 | }, |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 309 | .probe = oxfw_probe, |
| 310 | .update = oxfw_bus_reset, |
| 311 | .remove = oxfw_remove, |
| 312 | .id_table = oxfw_id_table, |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 313 | }; |
| 314 | |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 315 | static int __init snd_oxfw_init(void) |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 316 | { |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 317 | return driver_register(&oxfw_driver.driver); |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 318 | } |
| 319 | |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 320 | static void __exit snd_oxfw_exit(void) |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 321 | { |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 322 | driver_unregister(&oxfw_driver.driver); |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 323 | } |
| 324 | |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 325 | module_init(snd_oxfw_init); |
| 326 | module_exit(snd_oxfw_exit); |