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) |
| 46 | return err; |
| 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 | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 107 | static void oxfw_card_free(struct snd_card *card) |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 108 | { |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 109 | struct snd_oxfw *oxfw = card->private_data; |
Takashi Sakamoto | 5cd1d3f | 2014-12-09 00:10:42 +0900 | [diff] [blame] | 110 | unsigned int i; |
| 111 | |
Takashi Sakamoto | b0ac000 | 2014-12-09 00:10:46 +0900 | [diff] [blame^] | 112 | for (i = 0; i < SND_OXFW_STREAM_FORMAT_ENTRIES; i++) { |
| 113 | kfree(oxfw->tx_stream_formats[i]); |
Takashi Sakamoto | 5cd1d3f | 2014-12-09 00:10:42 +0900 | [diff] [blame] | 114 | kfree(oxfw->rx_stream_formats[i]); |
Takashi Sakamoto | b0ac000 | 2014-12-09 00:10:46 +0900 | [diff] [blame^] | 115 | } |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 116 | |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 117 | mutex_destroy(&oxfw->mutex); |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 118 | } |
| 119 | |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 120 | static int oxfw_probe(struct fw_unit *unit, |
Stefan Richter | 94a8715 | 2013-06-09 18:15:00 +0200 | [diff] [blame] | 121 | const struct ieee1394_device_id *id) |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 122 | { |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 123 | struct snd_card *card; |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 124 | struct snd_oxfw *oxfw; |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 125 | int err; |
| 126 | |
Takashi Sakamoto | ec4dba5 | 2014-12-09 00:10:45 +0900 | [diff] [blame] | 127 | if ((id->vendor_id == VENDOR_LOUD) && !detect_loud_models(unit)) |
| 128 | return -ENODEV; |
| 129 | |
Takashi Iwai | 06b45f0 | 2014-01-29 14:23:55 +0100 | [diff] [blame] | 130 | err = snd_card_new(&unit->device, -1, NULL, THIS_MODULE, |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 131 | sizeof(*oxfw), &card); |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 132 | if (err < 0) |
| 133 | return err; |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 134 | |
Takashi Sakamoto | e2786ca | 2014-11-29 00:59:27 +0900 | [diff] [blame] | 135 | card->private_free = oxfw_card_free; |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 136 | oxfw = card->private_data; |
| 137 | oxfw->card = card; |
| 138 | mutex_init(&oxfw->mutex); |
Takashi Sakamoto | e2786ca | 2014-11-29 00:59:27 +0900 | [diff] [blame] | 139 | oxfw->unit = unit; |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 140 | oxfw->device_info = (const struct device_info *)id->driver_data; |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 141 | |
Takashi Sakamoto | 5cd1d3f | 2014-12-09 00:10:42 +0900 | [diff] [blame] | 142 | err = snd_oxfw_stream_discover(oxfw); |
| 143 | if (err < 0) |
| 144 | goto error; |
| 145 | |
Takashi Sakamoto | fec7b75 | 2014-12-09 00:10:40 +0900 | [diff] [blame] | 146 | err = name_card(oxfw); |
| 147 | if (err < 0) |
| 148 | goto error; |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 149 | |
Takashi Sakamoto | 3713d93 | 2014-11-29 00:59:28 +0900 | [diff] [blame] | 150 | err = snd_oxfw_create_pcm(oxfw); |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 151 | if (err < 0) |
| 152 | goto error; |
| 153 | |
Takashi Sakamoto | ec4dba5 | 2014-12-09 00:10:45 +0900 | [diff] [blame] | 154 | if (oxfw->device_info) { |
| 155 | err = snd_oxfw_create_mixer(oxfw); |
| 156 | if (err < 0) |
| 157 | goto error; |
| 158 | } |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 159 | |
Takashi Sakamoto | 3c96101 | 2014-12-09 00:10:43 +0900 | [diff] [blame] | 160 | snd_oxfw_proc_init(oxfw); |
| 161 | |
Takashi Sakamoto | b0ac000 | 2014-12-09 00:10:46 +0900 | [diff] [blame^] | 162 | err = snd_oxfw_stream_init_simplex(oxfw, &oxfw->rx_stream); |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 163 | if (err < 0) |
| 164 | goto error; |
Takashi Sakamoto | b0ac000 | 2014-12-09 00:10:46 +0900 | [diff] [blame^] | 165 | if (oxfw->has_output) { |
| 166 | err = snd_oxfw_stream_init_simplex(oxfw, &oxfw->tx_stream); |
| 167 | if (err < 0) |
| 168 | goto error; |
| 169 | } |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 170 | |
Takashi Sakamoto | e2786ca | 2014-11-29 00:59:27 +0900 | [diff] [blame] | 171 | err = snd_card_register(card); |
| 172 | if (err < 0) { |
Takashi Sakamoto | b0ac000 | 2014-12-09 00:10:46 +0900 | [diff] [blame^] | 173 | snd_oxfw_stream_destroy_simplex(oxfw, &oxfw->rx_stream); |
| 174 | if (oxfw->has_output) |
| 175 | snd_oxfw_stream_destroy_simplex(oxfw, &oxfw->tx_stream); |
Takashi Sakamoto | e2786ca | 2014-11-29 00:59:27 +0900 | [diff] [blame] | 176 | goto error; |
| 177 | } |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 178 | dev_set_drvdata(&unit->device, oxfw); |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 179 | |
| 180 | return 0; |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 181 | error: |
| 182 | snd_card_free(card); |
| 183 | return err; |
| 184 | } |
| 185 | |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 186 | static void oxfw_bus_reset(struct fw_unit *unit) |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 187 | { |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 188 | struct snd_oxfw *oxfw = dev_get_drvdata(&unit->device); |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 189 | |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 190 | fcp_bus_reset(oxfw->unit); |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 191 | |
Takashi Sakamoto | e2786ca | 2014-11-29 00:59:27 +0900 | [diff] [blame] | 192 | mutex_lock(&oxfw->mutex); |
Takashi Sakamoto | b0ac000 | 2014-12-09 00:10:46 +0900 | [diff] [blame^] | 193 | |
| 194 | snd_oxfw_stream_update_simplex(oxfw, &oxfw->rx_stream); |
| 195 | if (oxfw->has_output) |
| 196 | snd_oxfw_stream_update_simplex(oxfw, &oxfw->tx_stream); |
| 197 | |
Takashi Sakamoto | e2786ca | 2014-11-29 00:59:27 +0900 | [diff] [blame] | 198 | mutex_unlock(&oxfw->mutex); |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 199 | } |
| 200 | |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 201 | static void oxfw_remove(struct fw_unit *unit) |
Stefan Richter | 94a8715 | 2013-06-09 18:15:00 +0200 | [diff] [blame] | 202 | { |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 203 | struct snd_oxfw *oxfw = dev_get_drvdata(&unit->device); |
Stefan Richter | 94a8715 | 2013-06-09 18:15:00 +0200 | [diff] [blame] | 204 | |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 205 | snd_card_disconnect(oxfw->card); |
Stefan Richter | 94a8715 | 2013-06-09 18:15:00 +0200 | [diff] [blame] | 206 | |
Takashi Sakamoto | b0ac000 | 2014-12-09 00:10:46 +0900 | [diff] [blame^] | 207 | snd_oxfw_stream_destroy_simplex(oxfw, &oxfw->rx_stream); |
| 208 | if (oxfw->has_output) |
| 209 | snd_oxfw_stream_destroy_simplex(oxfw, &oxfw->tx_stream); |
Stefan Richter | 94a8715 | 2013-06-09 18:15:00 +0200 | [diff] [blame] | 210 | |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 211 | snd_card_free_when_closed(oxfw->card); |
Stefan Richter | 94a8715 | 2013-06-09 18:15:00 +0200 | [diff] [blame] | 212 | } |
| 213 | |
| 214 | static const struct device_info griffin_firewave = { |
| 215 | .driver_name = "FireWave", |
Takashi Sakamoto | fec7b75 | 2014-12-09 00:10:40 +0900 | [diff] [blame] | 216 | .vendor_name = "Griffin", |
| 217 | .model_name = "FireWave", |
Stefan Richter | 94a8715 | 2013-06-09 18:15:00 +0200 | [diff] [blame] | 218 | .mixer_channels = 6, |
| 219 | .mute_fb_id = 0x01, |
| 220 | .volume_fb_id = 0x02, |
| 221 | }; |
| 222 | |
| 223 | static const struct device_info lacie_speakers = { |
| 224 | .driver_name = "FWSpeakers", |
Takashi Sakamoto | fec7b75 | 2014-12-09 00:10:40 +0900 | [diff] [blame] | 225 | .vendor_name = "LaCie", |
| 226 | .model_name = "FireWire Speakers", |
Stefan Richter | 94a8715 | 2013-06-09 18:15:00 +0200 | [diff] [blame] | 227 | .mixer_channels = 1, |
| 228 | .mute_fb_id = 0x01, |
| 229 | .volume_fb_id = 0x01, |
| 230 | }; |
| 231 | |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 232 | static const struct ieee1394_device_id oxfw_id_table[] = { |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 233 | { |
| 234 | .match_flags = IEEE1394_MATCH_VENDOR_ID | |
| 235 | IEEE1394_MATCH_MODEL_ID | |
| 236 | IEEE1394_MATCH_SPECIFIER_ID | |
| 237 | IEEE1394_MATCH_VERSION, |
| 238 | .vendor_id = VENDOR_GRIFFIN, |
| 239 | .model_id = 0x00f970, |
| 240 | .specifier_id = SPECIFIER_1394TA, |
| 241 | .version = VERSION_AVC, |
Stefan Richter | 94a8715 | 2013-06-09 18:15:00 +0200 | [diff] [blame] | 242 | .driver_data = (kernel_ulong_t)&griffin_firewave, |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 243 | }, |
| 244 | { |
| 245 | .match_flags = IEEE1394_MATCH_VENDOR_ID | |
| 246 | IEEE1394_MATCH_MODEL_ID | |
| 247 | IEEE1394_MATCH_SPECIFIER_ID | |
| 248 | IEEE1394_MATCH_VERSION, |
| 249 | .vendor_id = VENDOR_LACIE, |
| 250 | .model_id = 0x00f970, |
| 251 | .specifier_id = SPECIFIER_1394TA, |
| 252 | .version = VERSION_AVC, |
Stefan Richter | 94a8715 | 2013-06-09 18:15:00 +0200 | [diff] [blame] | 253 | .driver_data = (kernel_ulong_t)&lacie_speakers, |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 254 | }, |
Takashi Sakamoto | ec4dba5 | 2014-12-09 00:10:45 +0900 | [diff] [blame] | 255 | /* Behringer,F-Control Audio 202 */ |
| 256 | { |
| 257 | .match_flags = IEEE1394_MATCH_VENDOR_ID | |
| 258 | IEEE1394_MATCH_MODEL_ID, |
| 259 | .vendor_id = VENDOR_BEHRINGER, |
| 260 | .model_id = 0x00fc22, |
| 261 | }, |
| 262 | /* |
| 263 | * Any Mackie(Loud) models (name string/model id): |
| 264 | * Onyx-i series (former models): 0x081216 |
| 265 | * Mackie Onyx Satellite: 0x00200f |
| 266 | * Tapco LINK.firewire 4x6: 0x000460 |
| 267 | * d.2 pro: Unknown |
| 268 | * d.4 pro: Unknown |
| 269 | * U.420: Unknown |
| 270 | * U.420d: Unknown |
| 271 | */ |
| 272 | { |
| 273 | .match_flags = IEEE1394_MATCH_VENDOR_ID | |
| 274 | IEEE1394_MATCH_SPECIFIER_ID | |
| 275 | IEEE1394_MATCH_VERSION, |
| 276 | .vendor_id = VENDOR_LOUD, |
| 277 | .specifier_id = SPECIFIER_1394TA, |
| 278 | .version = VERSION_AVC, |
| 279 | }, |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 280 | { } |
| 281 | }; |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 282 | MODULE_DEVICE_TABLE(ieee1394, oxfw_id_table); |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 283 | |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 284 | static struct fw_driver oxfw_driver = { |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 285 | .driver = { |
| 286 | .owner = THIS_MODULE, |
| 287 | .name = KBUILD_MODNAME, |
| 288 | .bus = &fw_bus_type, |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 289 | }, |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 290 | .probe = oxfw_probe, |
| 291 | .update = oxfw_bus_reset, |
| 292 | .remove = oxfw_remove, |
| 293 | .id_table = oxfw_id_table, |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 294 | }; |
| 295 | |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 296 | static int __init snd_oxfw_init(void) |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 297 | { |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 298 | return driver_register(&oxfw_driver.driver); |
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 | static void __exit snd_oxfw_exit(void) |
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 | driver_unregister(&oxfw_driver.driver); |
Clemens Ladisch | 31ef913 | 2011-03-15 07:53:21 +0100 | [diff] [blame] | 304 | } |
| 305 | |
Takashi Sakamoto | 8832c5a | 2014-11-29 00:59:25 +0900 | [diff] [blame] | 306 | module_init(snd_oxfw_init); |
| 307 | module_exit(snd_oxfw_exit); |