dice.c (8dd06ef34b6e2f41b29fbf5fc1663780f2524285) dice.c (9a08676fc5968be8575ee2fa8926e55d8aef166c)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * TC Applied Technologies Digital Interface Communications Engine driver
4 *
5 * Copyright (c) Clemens Ladisch <clemens@ladisch.de>
6 */
7
8#include "dice.h"

--- 6 unchanged lines hidden (view full) ---

15#define OUI_LOUD 0x000ff2
16#define OUI_FOCUSRITE 0x00130e
17#define OUI_TCELECTRONIC 0x000166
18#define OUI_ALESIS 0x000595
19#define OUI_MAUDIO 0x000d6c
20#define OUI_MYTEK 0x001ee8
21#define OUI_SSL 0x0050c2 // Actually ID reserved by IEEE.
22#define OUI_PRESONUS 0x000a92
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * TC Applied Technologies Digital Interface Communications Engine driver
4 *
5 * Copyright (c) Clemens Ladisch <clemens@ladisch.de>
6 */
7
8#include "dice.h"

--- 6 unchanged lines hidden (view full) ---

15#define OUI_LOUD 0x000ff2
16#define OUI_FOCUSRITE 0x00130e
17#define OUI_TCELECTRONIC 0x000166
18#define OUI_ALESIS 0x000595
19#define OUI_MAUDIO 0x000d6c
20#define OUI_MYTEK 0x001ee8
21#define OUI_SSL 0x0050c2 // Actually ID reserved by IEEE.
22#define OUI_PRESONUS 0x000a92
23#define OUI_HARMAN 0x000fd7
23
24#define DICE_CATEGORY_ID 0x04
25#define WEISS_CATEGORY_ID 0x00
26#define LOUD_CATEGORY_ID 0x10
24
25#define DICE_CATEGORY_ID 0x04
26#define WEISS_CATEGORY_ID 0x00
27#define LOUD_CATEGORY_ID 0x10
28#define HARMAN_CATEGORY_ID 0x20
27
28#define MODEL_ALESIS_IO_BOTH 0x000001
29
30static int check_dice_category(struct fw_unit *unit)
31{
32 struct fw_device *device = fw_parent_device(unit);
33 struct fw_csr_iterator it;
34 int key, val, vendor = -1, model = -1;

--- 16 unchanged lines hidden (view full) ---

51 break;
52 }
53 }
54
55 if (vendor == OUI_WEISS)
56 category = WEISS_CATEGORY_ID;
57 else if (vendor == OUI_LOUD)
58 category = LOUD_CATEGORY_ID;
29
30#define MODEL_ALESIS_IO_BOTH 0x000001
31
32static int check_dice_category(struct fw_unit *unit)
33{
34 struct fw_device *device = fw_parent_device(unit);
35 struct fw_csr_iterator it;
36 int key, val, vendor = -1, model = -1;

--- 16 unchanged lines hidden (view full) ---

53 break;
54 }
55 }
56
57 if (vendor == OUI_WEISS)
58 category = WEISS_CATEGORY_ID;
59 else if (vendor == OUI_LOUD)
60 category = LOUD_CATEGORY_ID;
61 else if (vendor == OUI_HARMAN)
62 category = HARMAN_CATEGORY_ID;
59 else
60 category = DICE_CATEGORY_ID;
61 if (device->config_rom[3] != ((vendor << 8) | category) ||
62 device->config_rom[4] >> 22 != model)
63 return -ENODEV;
64
65 return 0;
66}

--- 316 unchanged lines hidden (view full) ---

383 // Presonus FireStudio.
384 {
385 .match_flags = IEEE1394_MATCH_VENDOR_ID |
386 IEEE1394_MATCH_MODEL_ID,
387 .vendor_id = OUI_PRESONUS,
388 .model_id = 0x000008,
389 .driver_data = (kernel_ulong_t)snd_dice_detect_presonus_formats,
390 },
63 else
64 category = DICE_CATEGORY_ID;
65 if (device->config_rom[3] != ((vendor << 8) | category) ||
66 device->config_rom[4] >> 22 != model)
67 return -ENODEV;
68
69 return 0;
70}

--- 316 unchanged lines hidden (view full) ---

387 // Presonus FireStudio.
388 {
389 .match_flags = IEEE1394_MATCH_VENDOR_ID |
390 IEEE1394_MATCH_MODEL_ID,
391 .vendor_id = OUI_PRESONUS,
392 .model_id = 0x000008,
393 .driver_data = (kernel_ulong_t)snd_dice_detect_presonus_formats,
394 },
395 // Lexicon I-ONYX FW810S.
391 {
396 {
397 .match_flags = IEEE1394_MATCH_VENDOR_ID |
398 IEEE1394_MATCH_MODEL_ID,
399 .vendor_id = OUI_HARMAN,
400 .model_id = 0x000001,
401 .driver_data = (kernel_ulong_t)snd_dice_detect_harman_formats,
402 },
403 {
392 .match_flags = IEEE1394_MATCH_VERSION,
393 .version = DICE_INTERFACE,
394 },
395 { }
396};
397MODULE_DEVICE_TABLE(ieee1394, dice_id_table);
398
399static struct fw_driver dice_driver = {

--- 23 unchanged lines hidden ---
404 .match_flags = IEEE1394_MATCH_VERSION,
405 .version = DICE_INTERFACE,
406 },
407 { }
408};
409MODULE_DEVICE_TABLE(ieee1394, dice_id_table);
410
411static struct fw_driver dice_driver = {

--- 23 unchanged lines hidden ---