2014-04-25 17:45:14 +04:00
|
|
|
/*
|
|
|
|
* bebob.c - a part of driver for BeBoB based devices
|
|
|
|
*
|
|
|
|
* Copyright (c) 2013-2014 Takashi Sakamoto
|
|
|
|
*
|
|
|
|
* Licensed under the terms of the GNU General Public License, version 2.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* BeBoB is 'BridgeCo enhanced Breakout Box'. This is installed to firewire
|
|
|
|
* devices with DM1000/DM1100/DM1500 chipset. It gives common way for host
|
|
|
|
* system to handle BeBoB based devices.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "bebob.h"
|
|
|
|
|
|
|
|
MODULE_DESCRIPTION("BridgeCo BeBoB driver");
|
|
|
|
MODULE_AUTHOR("Takashi Sakamoto <o-takashi@sakamocchi.jp>");
|
|
|
|
MODULE_LICENSE("GPL v2");
|
|
|
|
|
|
|
|
static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;
|
|
|
|
static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;
|
|
|
|
static bool enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;
|
|
|
|
|
|
|
|
module_param_array(index, int, NULL, 0444);
|
|
|
|
MODULE_PARM_DESC(index, "card index");
|
|
|
|
module_param_array(id, charp, NULL, 0444);
|
|
|
|
MODULE_PARM_DESC(id, "ID string");
|
|
|
|
module_param_array(enable, bool, NULL, 0444);
|
|
|
|
MODULE_PARM_DESC(enable, "enable BeBoB sound card");
|
|
|
|
|
|
|
|
static DEFINE_MUTEX(devices_mutex);
|
|
|
|
static DECLARE_BITMAP(devices_used, SNDRV_CARDS);
|
|
|
|
|
|
|
|
/* Offsets from information register. */
|
2015-06-14 06:49:33 +03:00
|
|
|
#define INFO_OFFSET_BEBOB_VERSION 0x08
|
2014-04-25 17:45:14 +04:00
|
|
|
#define INFO_OFFSET_GUID 0x10
|
|
|
|
#define INFO_OFFSET_HW_MODEL_ID 0x18
|
|
|
|
#define INFO_OFFSET_HW_MODEL_REVISION 0x1c
|
|
|
|
|
|
|
|
#define VEN_EDIROL 0x000040ab
|
|
|
|
#define VEN_PRESONUS 0x00000a92
|
|
|
|
#define VEN_BRIDGECO 0x000007f5
|
ALSA: bebob: support Firewire I/O card of Mackie Onyx 1220/1620/1640
Current ALSA BeBoB drivers has an entry for this model, while the value of
vendor ID seems to be wrong according to an user's report.
The vendor had released no updated firmware, thus we can judge that this
model had not changed the content of its config ROM. It's reasonable to fix
the ID according to the report.
$ ./linux-firewire-utils/src/crpp < /sys/bus/firewire/devices/fw1/config_rom
ROM header and bus information block
-----------------------------------------------------------------
400 0425720f bus_info_length 4, crc_length 37, crc 29199
404 31333934 bus_name "1394"
408 f0646122 irmc 1, cmc 1, isc 1, bmc 1, pmc 0, cyc_clk_acc 100,
max_rec 6 (128), max_rom 1, gen 2, spd 2 (S400)
40c 00000ff2 company_id 00000f |
410 00004697 device_id f200004697 | EUI-64 00000ff200004697
root directory
-----------------------------------------------------------------
414 000859be directory_length 8, crc 22974
418 04000082 hardware version
41c 0c0083c0 node capabilities per IEEE 1394
420 03000ff2 vendor
424 8100000a --> descriptor leaf at 44c
428 17010065 model
42c 8100000d --> descriptor leaf at 460
430 13000910 version
434 d1000001 --> unit directory at 438
unit directory at 438
-----------------------------------------------------------------
438 0004ccec directory_length 4, crc 52460
43c 1200a02d specifier id: 1394 TA
440 13010001 version: AV/C
444 17010065 model
448 8100000d --> descriptor leaf at 47c
descriptor leaf at 44c
-----------------------------------------------------------------
44c 0004152a leaf_length 4, crc 5418
450 00000000 textual descriptor
454 00000000 minimal ASCII
458 4d61636b "Mack"
45c 69650000 "ie"
descriptor leaf at 460
-----------------------------------------------------------------
460 000612b5 leaf_length 6, crc 4789
464 00000000 textual descriptor
468 00000000 minimal ASCII
46c 4f6e7978 "Onyx"
470 20466972 " Fir"
474 65776972 "ewir"
478 65000000 "e"
descriptor leaf at 47c
-----------------------------------------------------------------
47c 000612b5 leaf_length 6, crc 4789
480 00000000 textual descriptor
484 00000000 minimal ASCII
488 4f6e7978 "Onyx"
48c 20466972 " Fir"
490 65776972 "ewir"
494 65000000 "e"
$ cat /proc/asound/card3/firewire/firmware
Manufacturer: bridgeCo
Protocol Ver: 1
Build Ver: 0
GUID: 0x00000FF200004697
Model ID: 0x82
Model Rev: 1
Firmware Date: 20040430
Firmware Time: 131527
Firmware ID: 0x10065
Firmware Ver: 2320
Base Addr: 0x20080000
Max Size: 1572864
Loader Date: 20040430
Loader Time: 112036
Reported-by: Andrzej Gansiniec <andrzej@gansiniec.pl>
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-10-04 03:17:03 +03:00
|
|
|
#define VEN_MACKIE1 0x0000000f
|
|
|
|
#define VEN_MACKIE2 0x00000ff2
|
2014-04-25 17:45:14 +04:00
|
|
|
#define VEN_STANTON 0x00001260
|
|
|
|
#define VEN_TASCAM 0x0000022e
|
|
|
|
#define VEN_BEHRINGER 0x00001564
|
|
|
|
#define VEN_APOGEE 0x000003db
|
|
|
|
#define VEN_ESI 0x00000f1b
|
|
|
|
#define VEN_ACOUSTIC 0x00000002
|
|
|
|
#define VEN_CME 0x0000000a
|
|
|
|
#define VEN_PHONIC 0x00001496
|
|
|
|
#define VEN_LYNX 0x000019e5
|
|
|
|
#define VEN_ICON 0x00001a9e
|
|
|
|
#define VEN_PRISMSOUND 0x00001198
|
2014-04-25 17:45:22 +04:00
|
|
|
#define VEN_TERRATEC 0x00000aac
|
2014-04-25 17:45:23 +04:00
|
|
|
#define VEN_YAMAHA 0x0000a0de
|
2014-04-25 17:45:24 +04:00
|
|
|
#define VEN_FOCUSRITE 0x0000130e
|
2014-04-25 17:45:25 +04:00
|
|
|
#define VEN_MAUDIO1 0x00000d6c
|
|
|
|
#define VEN_MAUDIO2 0x000007f5
|
2015-05-24 14:51:45 +03:00
|
|
|
#define VEN_DIGIDESIGN 0x00a07e
|
2014-04-25 17:45:24 +04:00
|
|
|
|
|
|
|
#define MODEL_FOCUSRITE_SAFFIRE_BOTH 0x00000000
|
2014-04-25 17:45:25 +04:00
|
|
|
#define MODEL_MAUDIO_AUDIOPHILE_BOTH 0x00010060
|
2014-04-25 17:45:26 +04:00
|
|
|
#define MODEL_MAUDIO_FW1814 0x00010071
|
|
|
|
#define MODEL_MAUDIO_PROJECTMIX 0x00010091
|
2014-04-25 17:45:14 +04:00
|
|
|
|
|
|
|
static int
|
2016-03-27 10:09:06 +03:00
|
|
|
name_device(struct snd_bebob *bebob)
|
2014-04-25 17:45:14 +04:00
|
|
|
{
|
|
|
|
struct fw_device *fw_dev = fw_parent_device(bebob->unit);
|
|
|
|
char vendor[24] = {0};
|
|
|
|
char model[32] = {0};
|
2014-05-27 19:14:44 +04:00
|
|
|
u32 hw_id;
|
2014-04-25 17:45:14 +04:00
|
|
|
u32 data[2] = {0};
|
|
|
|
u32 revision;
|
2015-06-14 06:49:33 +03:00
|
|
|
u32 version;
|
2014-04-25 17:45:14 +04:00
|
|
|
int err;
|
|
|
|
|
|
|
|
/* get vendor name from root directory */
|
|
|
|
err = fw_csr_string(fw_dev->config_rom + 5, CSR_VENDOR,
|
|
|
|
vendor, sizeof(vendor));
|
|
|
|
if (err < 0)
|
|
|
|
goto end;
|
|
|
|
|
|
|
|
/* get model name from unit directory */
|
|
|
|
err = fw_csr_string(bebob->unit->directory, CSR_MODEL,
|
|
|
|
model, sizeof(model));
|
|
|
|
if (err < 0)
|
|
|
|
goto end;
|
|
|
|
|
|
|
|
/* get hardware id */
|
|
|
|
err = snd_bebob_read_quad(bebob->unit, INFO_OFFSET_HW_MODEL_ID,
|
2014-05-27 19:14:44 +04:00
|
|
|
&hw_id);
|
2014-04-25 17:45:14 +04:00
|
|
|
if (err < 0)
|
|
|
|
goto end;
|
|
|
|
|
|
|
|
/* get hardware revision */
|
|
|
|
err = snd_bebob_read_quad(bebob->unit, INFO_OFFSET_HW_MODEL_REVISION,
|
|
|
|
&revision);
|
|
|
|
if (err < 0)
|
|
|
|
goto end;
|
|
|
|
|
|
|
|
/* get GUID */
|
|
|
|
err = snd_bebob_read_block(bebob->unit, INFO_OFFSET_GUID,
|
|
|
|
data, sizeof(data));
|
|
|
|
if (err < 0)
|
|
|
|
goto end;
|
|
|
|
|
2015-06-14 06:49:33 +03:00
|
|
|
err = snd_bebob_read_quad(bebob->unit, INFO_OFFSET_BEBOB_VERSION,
|
|
|
|
&version);
|
|
|
|
if (err < 0)
|
|
|
|
goto end;
|
|
|
|
bebob->version = version;
|
|
|
|
|
2014-04-25 17:45:14 +04:00
|
|
|
strcpy(bebob->card->driver, "BeBoB");
|
|
|
|
strcpy(bebob->card->shortname, model);
|
|
|
|
strcpy(bebob->card->mixername, model);
|
|
|
|
snprintf(bebob->card->longname, sizeof(bebob->card->longname),
|
|
|
|
"%s %s (id:%d, rev:%d), GUID %08x%08x at %s, S%d",
|
2014-05-27 19:14:44 +04:00
|
|
|
vendor, model, hw_id, revision,
|
2014-04-25 17:45:14 +04:00
|
|
|
data[0], data[1], dev_name(&bebob->unit->device),
|
|
|
|
100 << fw_dev->max_speed);
|
|
|
|
end:
|
|
|
|
return err;
|
|
|
|
}
|
|
|
|
|
2018-10-10 09:35:02 +03:00
|
|
|
static void
|
|
|
|
bebob_card_free(struct snd_card *card)
|
2016-03-31 02:47:05 +03:00
|
|
|
{
|
2018-10-10 09:35:02 +03:00
|
|
|
struct snd_bebob *bebob = card->private_data;
|
|
|
|
|
2018-10-10 09:35:01 +03:00
|
|
|
mutex_lock(&devices_mutex);
|
|
|
|
clear_bit(bebob->card_index, devices_used);
|
|
|
|
mutex_unlock(&devices_mutex);
|
|
|
|
|
2016-03-31 02:47:05 +03:00
|
|
|
snd_bebob_stream_destroy_duplex(bebob);
|
|
|
|
}
|
|
|
|
|
2014-04-25 17:45:24 +04:00
|
|
|
static const struct snd_bebob_spec *
|
|
|
|
get_saffire_spec(struct fw_unit *unit)
|
|
|
|
{
|
|
|
|
char name[24] = {0};
|
|
|
|
|
|
|
|
if (fw_csr_string(unit->directory, CSR_MODEL, name, sizeof(name)) < 0)
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
if (strcmp(name, "SaffireLE") == 0)
|
|
|
|
return &saffire_le_spec;
|
|
|
|
else
|
|
|
|
return &saffire_spec;
|
|
|
|
}
|
|
|
|
|
2014-04-25 17:45:25 +04:00
|
|
|
static bool
|
|
|
|
check_audiophile_booted(struct fw_unit *unit)
|
|
|
|
{
|
ALSA: bebob: compare whole string for model name so that readers are not confused
A modalias of 'ieee1394:ven00000D6Cmo00010060sp' hits units for M-Audio
FireWire Audiophile only. However the unit has two states relevant to
loaded firmware. Initial firmware returns 'FW Audiophile Bootloader',
while functional firmware returns 'FW Audiophile'.
ALSA bebob driver compares the units' model name to strings of 24 characters
by the first 15 characters. This is shorter way to differentiate these two
states but confusing to readers.
This commit improves the code for this point. Kernel stack is consumed more in
call of check_audiophile_booted() by a bit.
With initial firmware:
$ ./linux-firewire-utils/src/crpp < /sys/bus/firewire/devices/fw1/config_rom
ROM header and bus information block
-----------------------------------------------------------------
400 04276da6 bus_info_length 4, crc_length 39, crc 28070
404 31333934 bus_name "1394"
408 006481f2 irmc 0, cmc 0, isc 0, bmc 0, pmc 0, cyc_clk_acc 100,
max_rec 8 (512), max_rom 1, gen 15, spd 2 (S400)
40c 000d6c03 company_id 000d6c |
410 102b7e2e device_id 03102b7e2e | EUI-64 000d6c03102b7e2e
root directory
-----------------------------------------------------------------
414 00067414 directory_length 6, crc 29716
418 0c0083c0 node capabilities per IEEE 1394
41c 03000d6c vendor
420 81000009 --> descriptor leaf at 444
424 17010060 model
428 8100000c --> descriptor leaf at 458
42c d1000001 --> unit directory at 430
unit directory at 430
-----------------------------------------------------------------
430 00049da1 directory_length 4, crc 40353 (should be 48611)
434 1200a02d specifier id: 1394 TA
438 13014001 version: Vender Unique and AV/C
43c 17010060 model
440 8100000f --> descriptor leaf at 47c
descriptor leaf at 444
-----------------------------------------------------------------
444 0004073e leaf_length 4, crc 1854
448 00000000 textual descriptor
44c 00000000 minimal ASCII
450 4d2d4155 "M-AU"
454 44494f00 "DIO"
descriptor leaf at 458
-----------------------------------------------------------------
458 00086f21 leaf_length 8, crc 28449
45c 00000000 textual descriptor
460 00000000 minimal ASCII
464 46572041 "FW A"
468 7564696f "udio"
46c 7068696c "phil"
470 6520426f "e Bo"
474 6f746c6f "otlo"
478 61646572 "ader"
descriptor leaf at 47c
-----------------------------------------------------------------
47c 00086f21 leaf_length 8, crc 28449
480 00000000 textual descriptor
484 00000000 minimal ASCII
488 46572041 "FW A"
48c 7564696f "udio"
490 7068696c "phil"
494 6520426f "e Bo"
498 6f746c6f "otlo"
49c 61646572 "ader"
With functional firmware:
$ ./linux-firewire-utils/src/crpp < /sys/bus/firewire/devices/fw1/config_rom
ROM header and bus information block
-----------------------------------------------------------------
400 042de16f bus_info_length 4, crc_length 45, crc 57711
404 31333934 bus_name "1394"
408 f0648122 irmc 1, cmc 1, isc 1, bmc 1, pmc 0, cyc_clk_acc 100,
max_rec 8 (512), max_rom 1, gen 2, spd 2 (S400)
40c 000d6c03 company_id 000d6c |
410 002b7e2e device_id 03002b7e2e | EUI-64 000d6c03002b7e2e
root directory
-----------------------------------------------------------------
414 0009dac4 directory_length 9, crc 56004
418 0400000d hardware version
41c 0c0083c0 node capabilities per IEEE 1394
420 03000d6c vendor
424 81000012 --> descriptor leaf at 46c
428 17010060 model
42c 81000015 --> descriptor leaf at 480
430 13ffffff version
434 d1000002 --> unit directory at 43c
438 d4000006 --> dependent info directory at 450
unit directory at 43c
-----------------------------------------------------------------
43c 00041eb9 directory_length 4, crc 7865
440 1200a02d specifier id: 1394 TA
444 13014001 version: Vender Unique and AV/C
448 17010060 model
44c 81000014 --> descriptor leaf at 49c
dependent info directory at 450
-----------------------------------------------------------------
450 000637c7 directory_length 6, crc 14279
454 120007f5 specifier id
458 13000001 version
45c 3affffc7 (immediate value)
460 3b100000 (immediate value)
464 3cffffc7 (immediate value)
468 3d600000 (immediate value)
descriptor leaf at 46c
-----------------------------------------------------------------
46c 0004b8e4 leaf_length 4, crc 47332
470 00000000 textual descriptor
474 00000000 minimal ASCII
478 4d2d4175 "M-Au"
47c 64696f00 "dio"
descriptor leaf at 480
-----------------------------------------------------------------
480 0006194b leaf_length 6, crc 6475
484 00000000 textual descriptor
488 00000000 minimal ASCII
48c 46572041 "FW A"
490 7564696f "udio"
494 7068696c "phil"
498 65000000 "e"
descriptor leaf at 49c
-----------------------------------------------------------------
49c 0006194b leaf_length 6, crc 6475
4a0 00000000 textual descriptor
4a4 00000000 minimal ASCII
4a8 46572041 "FW A"
4ac 7564696f "udio"
4b0 7068696c "phil"
4b4 65000000 "e"
Reported-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
Reported-by: Joe Perches <joe@perches.com>
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-11-18 00:11:24 +03:00
|
|
|
char name[28] = {0};
|
2014-04-25 17:45:25 +04:00
|
|
|
|
|
|
|
if (fw_csr_string(unit->directory, CSR_MODEL, name, sizeof(name)) < 0)
|
|
|
|
return false;
|
|
|
|
|
ALSA: bebob: compare whole string for model name so that readers are not confused
A modalias of 'ieee1394:ven00000D6Cmo00010060sp' hits units for M-Audio
FireWire Audiophile only. However the unit has two states relevant to
loaded firmware. Initial firmware returns 'FW Audiophile Bootloader',
while functional firmware returns 'FW Audiophile'.
ALSA bebob driver compares the units' model name to strings of 24 characters
by the first 15 characters. This is shorter way to differentiate these two
states but confusing to readers.
This commit improves the code for this point. Kernel stack is consumed more in
call of check_audiophile_booted() by a bit.
With initial firmware:
$ ./linux-firewire-utils/src/crpp < /sys/bus/firewire/devices/fw1/config_rom
ROM header and bus information block
-----------------------------------------------------------------
400 04276da6 bus_info_length 4, crc_length 39, crc 28070
404 31333934 bus_name "1394"
408 006481f2 irmc 0, cmc 0, isc 0, bmc 0, pmc 0, cyc_clk_acc 100,
max_rec 8 (512), max_rom 1, gen 15, spd 2 (S400)
40c 000d6c03 company_id 000d6c |
410 102b7e2e device_id 03102b7e2e | EUI-64 000d6c03102b7e2e
root directory
-----------------------------------------------------------------
414 00067414 directory_length 6, crc 29716
418 0c0083c0 node capabilities per IEEE 1394
41c 03000d6c vendor
420 81000009 --> descriptor leaf at 444
424 17010060 model
428 8100000c --> descriptor leaf at 458
42c d1000001 --> unit directory at 430
unit directory at 430
-----------------------------------------------------------------
430 00049da1 directory_length 4, crc 40353 (should be 48611)
434 1200a02d specifier id: 1394 TA
438 13014001 version: Vender Unique and AV/C
43c 17010060 model
440 8100000f --> descriptor leaf at 47c
descriptor leaf at 444
-----------------------------------------------------------------
444 0004073e leaf_length 4, crc 1854
448 00000000 textual descriptor
44c 00000000 minimal ASCII
450 4d2d4155 "M-AU"
454 44494f00 "DIO"
descriptor leaf at 458
-----------------------------------------------------------------
458 00086f21 leaf_length 8, crc 28449
45c 00000000 textual descriptor
460 00000000 minimal ASCII
464 46572041 "FW A"
468 7564696f "udio"
46c 7068696c "phil"
470 6520426f "e Bo"
474 6f746c6f "otlo"
478 61646572 "ader"
descriptor leaf at 47c
-----------------------------------------------------------------
47c 00086f21 leaf_length 8, crc 28449
480 00000000 textual descriptor
484 00000000 minimal ASCII
488 46572041 "FW A"
48c 7564696f "udio"
490 7068696c "phil"
494 6520426f "e Bo"
498 6f746c6f "otlo"
49c 61646572 "ader"
With functional firmware:
$ ./linux-firewire-utils/src/crpp < /sys/bus/firewire/devices/fw1/config_rom
ROM header and bus information block
-----------------------------------------------------------------
400 042de16f bus_info_length 4, crc_length 45, crc 57711
404 31333934 bus_name "1394"
408 f0648122 irmc 1, cmc 1, isc 1, bmc 1, pmc 0, cyc_clk_acc 100,
max_rec 8 (512), max_rom 1, gen 2, spd 2 (S400)
40c 000d6c03 company_id 000d6c |
410 002b7e2e device_id 03002b7e2e | EUI-64 000d6c03002b7e2e
root directory
-----------------------------------------------------------------
414 0009dac4 directory_length 9, crc 56004
418 0400000d hardware version
41c 0c0083c0 node capabilities per IEEE 1394
420 03000d6c vendor
424 81000012 --> descriptor leaf at 46c
428 17010060 model
42c 81000015 --> descriptor leaf at 480
430 13ffffff version
434 d1000002 --> unit directory at 43c
438 d4000006 --> dependent info directory at 450
unit directory at 43c
-----------------------------------------------------------------
43c 00041eb9 directory_length 4, crc 7865
440 1200a02d specifier id: 1394 TA
444 13014001 version: Vender Unique and AV/C
448 17010060 model
44c 81000014 --> descriptor leaf at 49c
dependent info directory at 450
-----------------------------------------------------------------
450 000637c7 directory_length 6, crc 14279
454 120007f5 specifier id
458 13000001 version
45c 3affffc7 (immediate value)
460 3b100000 (immediate value)
464 3cffffc7 (immediate value)
468 3d600000 (immediate value)
descriptor leaf at 46c
-----------------------------------------------------------------
46c 0004b8e4 leaf_length 4, crc 47332
470 00000000 textual descriptor
474 00000000 minimal ASCII
478 4d2d4175 "M-Au"
47c 64696f00 "dio"
descriptor leaf at 480
-----------------------------------------------------------------
480 0006194b leaf_length 6, crc 6475
484 00000000 textual descriptor
488 00000000 minimal ASCII
48c 46572041 "FW A"
490 7564696f "udio"
494 7068696c "phil"
498 65000000 "e"
descriptor leaf at 49c
-----------------------------------------------------------------
49c 0006194b leaf_length 6, crc 6475
4a0 00000000 textual descriptor
4a4 00000000 minimal ASCII
4a8 46572041 "FW A"
4ac 7564696f "udio"
4b0 7068696c "phil"
4b4 65000000 "e"
Reported-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
Reported-by: Joe Perches <joe@perches.com>
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-11-18 00:11:24 +03:00
|
|
|
return strncmp(name, "FW Audiophile Bootloader", 24) != 0;
|
2014-04-25 17:45:25 +04:00
|
|
|
}
|
|
|
|
|
2016-03-31 02:47:05 +03:00
|
|
|
static void
|
|
|
|
do_registration(struct work_struct *work)
|
2014-04-25 17:45:14 +04:00
|
|
|
{
|
2016-03-31 02:47:05 +03:00
|
|
|
struct snd_bebob *bebob =
|
|
|
|
container_of(work, struct snd_bebob, dwork.work);
|
2014-04-25 17:45:14 +04:00
|
|
|
unsigned int card_index;
|
|
|
|
int err;
|
|
|
|
|
2016-03-31 02:47:05 +03:00
|
|
|
if (bebob->registered)
|
|
|
|
return;
|
|
|
|
|
2014-04-25 17:45:14 +04:00
|
|
|
mutex_lock(&devices_mutex);
|
|
|
|
for (card_index = 0; card_index < SNDRV_CARDS; card_index++) {
|
|
|
|
if (!test_bit(card_index, devices_used) && enable[card_index])
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
if (card_index >= SNDRV_CARDS) {
|
2016-03-31 02:47:05 +03:00
|
|
|
mutex_unlock(&devices_mutex);
|
|
|
|
return;
|
2014-04-25 17:45:14 +04:00
|
|
|
}
|
|
|
|
|
2016-03-31 02:47:05 +03:00
|
|
|
err = snd_card_new(&bebob->unit->device, index[card_index],
|
|
|
|
id[card_index], THIS_MODULE, 0, &bebob->card);
|
|
|
|
if (err < 0) {
|
|
|
|
mutex_unlock(&devices_mutex);
|
|
|
|
return;
|
2014-04-25 17:45:21 +04:00
|
|
|
}
|
2018-10-10 09:35:01 +03:00
|
|
|
set_bit(card_index, devices_used);
|
|
|
|
mutex_unlock(&devices_mutex);
|
2014-04-25 17:45:21 +04:00
|
|
|
|
2018-10-10 09:35:02 +03:00
|
|
|
bebob->card->private_free = bebob_card_free;
|
|
|
|
bebob->card->private_data = bebob;
|
|
|
|
|
2016-03-27 10:09:06 +03:00
|
|
|
err = name_device(bebob);
|
2014-04-25 17:45:14 +04:00
|
|
|
if (err < 0)
|
|
|
|
goto error;
|
|
|
|
|
2016-03-31 02:47:05 +03:00
|
|
|
if (bebob->spec == &maudio_special_spec) {
|
|
|
|
if (bebob->entry->model_id == MODEL_MAUDIO_FW1814)
|
|
|
|
err = snd_bebob_maudio_special_discover(bebob, true);
|
|
|
|
else
|
|
|
|
err = snd_bebob_maudio_special_discover(bebob, false);
|
|
|
|
} else {
|
2014-04-25 17:45:26 +04:00
|
|
|
err = snd_bebob_stream_discover(bebob);
|
2016-03-31 02:47:05 +03:00
|
|
|
}
|
|
|
|
if (err < 0)
|
|
|
|
goto error;
|
|
|
|
|
|
|
|
err = snd_bebob_stream_init_duplex(bebob);
|
2014-04-25 17:45:14 +04:00
|
|
|
if (err < 0)
|
|
|
|
goto error;
|
2014-04-25 17:45:15 +04:00
|
|
|
|
2014-04-25 17:45:17 +04:00
|
|
|
snd_bebob_proc_init(bebob);
|
|
|
|
|
2016-03-31 02:47:05 +03:00
|
|
|
if (bebob->midi_input_ports > 0 || bebob->midi_output_ports > 0) {
|
2014-04-25 17:45:18 +04:00
|
|
|
err = snd_bebob_create_midi_devices(bebob);
|
|
|
|
if (err < 0)
|
|
|
|
goto error;
|
|
|
|
}
|
|
|
|
|
2014-04-25 17:45:19 +04:00
|
|
|
err = snd_bebob_create_pcm_devices(bebob);
|
|
|
|
if (err < 0)
|
|
|
|
goto error;
|
|
|
|
|
2014-04-25 17:45:20 +04:00
|
|
|
err = snd_bebob_create_hwdep_device(bebob);
|
|
|
|
if (err < 0)
|
|
|
|
goto error;
|
|
|
|
|
2016-03-31 02:47:05 +03:00
|
|
|
err = snd_card_register(bebob->card);
|
2014-04-25 17:45:15 +04:00
|
|
|
if (err < 0)
|
|
|
|
goto error;
|
|
|
|
|
2016-03-31 02:47:05 +03:00
|
|
|
bebob->registered = true;
|
|
|
|
|
|
|
|
return;
|
|
|
|
error:
|
|
|
|
snd_card_free(bebob->card);
|
|
|
|
dev_info(&bebob->unit->device,
|
|
|
|
"Sound card registration failed: %d\n", err);
|
|
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
|
|
bebob_probe(struct fw_unit *unit, const struct ieee1394_device_id *entry)
|
|
|
|
{
|
|
|
|
struct snd_bebob *bebob;
|
|
|
|
const struct snd_bebob_spec *spec;
|
|
|
|
|
|
|
|
if (entry->vendor_id == VEN_FOCUSRITE &&
|
|
|
|
entry->model_id == MODEL_FOCUSRITE_SAFFIRE_BOTH)
|
|
|
|
spec = get_saffire_spec(unit);
|
|
|
|
else if (entry->vendor_id == VEN_MAUDIO1 &&
|
|
|
|
entry->model_id == MODEL_MAUDIO_AUDIOPHILE_BOTH &&
|
|
|
|
!check_audiophile_booted(unit))
|
|
|
|
spec = NULL;
|
|
|
|
else
|
|
|
|
spec = (const struct snd_bebob_spec *)entry->driver_data;
|
|
|
|
|
|
|
|
if (spec == NULL) {
|
|
|
|
if (entry->vendor_id == VEN_MAUDIO1 ||
|
|
|
|
entry->vendor_id == VEN_MAUDIO2)
|
|
|
|
return snd_bebob_maudio_load_firmware(unit);
|
|
|
|
else
|
|
|
|
return -ENODEV;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Allocate this independent of sound card instance. */
|
2018-10-03 02:21:50 +03:00
|
|
|
bebob = devm_kzalloc(&unit->device, sizeof(struct snd_bebob),
|
|
|
|
GFP_KERNEL);
|
|
|
|
if (!bebob)
|
2016-03-31 02:47:05 +03:00
|
|
|
return -ENOMEM;
|
|
|
|
bebob->unit = fw_unit_get(unit);
|
|
|
|
dev_set_drvdata(&unit->device, bebob);
|
|
|
|
|
2018-10-03 02:21:50 +03:00
|
|
|
bebob->entry = entry;
|
|
|
|
bebob->spec = spec;
|
2016-03-31 02:47:05 +03:00
|
|
|
mutex_init(&bebob->mutex);
|
|
|
|
spin_lock_init(&bebob->lock);
|
|
|
|
init_waitqueue_head(&bebob->hwdep_wait);
|
|
|
|
|
|
|
|
/* Allocate and register this sound card later. */
|
|
|
|
INIT_DEFERRABLE_WORK(&bebob->dwork, do_registration);
|
|
|
|
|
|
|
|
if (entry->vendor_id != VEN_MAUDIO1 ||
|
|
|
|
(entry->model_id != MODEL_MAUDIO_FW1814 &&
|
|
|
|
entry->model_id != MODEL_MAUDIO_PROJECTMIX)) {
|
|
|
|
snd_fw_schedule_registration(unit, &bebob->dwork);
|
2014-04-25 17:45:30 +04:00
|
|
|
} else {
|
|
|
|
/*
|
|
|
|
* This is a workaround. This bus reset seems to have an effect
|
|
|
|
* to make devices correctly handling transactions. Without
|
|
|
|
* this, the devices have gap_count mismatch. This causes much
|
|
|
|
* failure of transaction.
|
|
|
|
*
|
|
|
|
* Just after registration, user-land application receive
|
|
|
|
* signals from dbus and starts I/Os. To avoid I/Os till the
|
|
|
|
* future bus reset, registration is done in next update().
|
|
|
|
*/
|
|
|
|
fw_schedule_bus_reset(fw_parent_device(bebob->unit)->card,
|
|
|
|
false, true);
|
2014-04-25 17:45:15 +04:00
|
|
|
}
|
|
|
|
|
2016-03-31 02:47:05 +03:00
|
|
|
return 0;
|
2014-04-25 17:45:14 +04:00
|
|
|
}
|
|
|
|
|
2016-02-20 10:18:59 +03:00
|
|
|
/*
|
|
|
|
* This driver doesn't update streams in bus reset handler.
|
|
|
|
*
|
|
|
|
* DM1000/ DM1100/DM1500 chipsets with BeBoB firmware transfer packets with
|
|
|
|
* discontinued counter at bus reset. This discontinuity is immediately
|
|
|
|
* detected in packet streaming layer, then it sets XRUN to PCM substream.
|
|
|
|
*
|
|
|
|
* ALSA PCM applications can know the XRUN by getting -EPIPE from PCM operation.
|
|
|
|
* Then, they can recover the PCM substream by executing ioctl(2) with
|
|
|
|
* SNDRV_PCM_IOCTL_PREPARE. 'struct snd_pcm_ops.prepare' is called and drivers
|
|
|
|
* restart packet streaming.
|
|
|
|
*
|
|
|
|
* The above processing may be executed before this bus-reset handler is
|
|
|
|
* executed. When this handler updates streams with current isochronous
|
|
|
|
* channels, the streams already have the current ones.
|
|
|
|
*/
|
2014-04-25 17:45:14 +04:00
|
|
|
static void
|
|
|
|
bebob_update(struct fw_unit *unit)
|
|
|
|
{
|
|
|
|
struct snd_bebob *bebob = dev_get_drvdata(&unit->device);
|
2014-04-25 17:45:25 +04:00
|
|
|
|
|
|
|
if (bebob == NULL)
|
|
|
|
return;
|
|
|
|
|
2016-03-31 02:47:05 +03:00
|
|
|
/* Postpone a workqueue for deferred registration. */
|
|
|
|
if (!bebob->registered)
|
|
|
|
snd_fw_schedule_registration(unit, &bebob->dwork);
|
|
|
|
else
|
|
|
|
fcp_bus_reset(bebob->unit);
|
2014-04-25 17:45:14 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
static void bebob_remove(struct fw_unit *unit)
|
|
|
|
{
|
|
|
|
struct snd_bebob *bebob = dev_get_drvdata(&unit->device);
|
2014-04-25 17:45:25 +04:00
|
|
|
|
|
|
|
if (bebob == NULL)
|
|
|
|
return;
|
|
|
|
|
2016-03-31 02:47:05 +03:00
|
|
|
/*
|
|
|
|
* Confirm to stop the work for registration before the sound card is
|
|
|
|
* going to be released. The work is not scheduled again because bus
|
|
|
|
* reset handler is not called anymore.
|
|
|
|
*/
|
|
|
|
cancel_delayed_work_sync(&bebob->dwork);
|
|
|
|
|
|
|
|
if (bebob->registered) {
|
2018-10-10 09:34:59 +03:00
|
|
|
// Block till all of ALSA character devices are released.
|
|
|
|
snd_card_free(bebob->card);
|
2016-03-31 02:47:05 +03:00
|
|
|
}
|
2018-10-10 09:35:00 +03:00
|
|
|
|
|
|
|
mutex_destroy(&bebob->mutex);
|
|
|
|
fw_unit_put(bebob->unit);
|
2014-04-25 17:45:14 +04:00
|
|
|
}
|
|
|
|
|
2015-10-11 09:10:55 +03:00
|
|
|
static const struct snd_bebob_rate_spec normal_rate_spec = {
|
2014-04-25 17:45:21 +04:00
|
|
|
.get = &snd_bebob_stream_get_rate,
|
|
|
|
.set = &snd_bebob_stream_set_rate
|
|
|
|
};
|
|
|
|
static const struct snd_bebob_spec spec_normal = {
|
|
|
|
.clock = NULL,
|
|
|
|
.rate = &normal_rate_spec,
|
|
|
|
.meter = NULL
|
|
|
|
};
|
|
|
|
|
2014-04-25 17:45:14 +04:00
|
|
|
static const struct ieee1394_device_id bebob_id_table[] = {
|
|
|
|
/* Edirol, FA-66 */
|
2014-04-25 17:45:21 +04:00
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_EDIROL, 0x00010049, &spec_normal),
|
2014-04-25 17:45:14 +04:00
|
|
|
/* Edirol, FA-101 */
|
2014-04-25 17:45:21 +04:00
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_EDIROL, 0x00010048, &spec_normal),
|
2014-04-25 17:45:14 +04:00
|
|
|
/* Presonus, FIREBOX */
|
2014-04-25 17:45:21 +04:00
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_PRESONUS, 0x00010000, &spec_normal),
|
2014-04-25 17:45:14 +04:00
|
|
|
/* PreSonus, FIREPOD/FP10 */
|
2014-04-25 17:45:21 +04:00
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_PRESONUS, 0x00010066, &spec_normal),
|
2014-04-25 17:45:14 +04:00
|
|
|
/* PreSonus, Inspire1394 */
|
2014-04-25 17:45:21 +04:00
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_PRESONUS, 0x00010001, &spec_normal),
|
2014-04-25 17:45:14 +04:00
|
|
|
/* BridgeCo, RDAudio1 */
|
2014-04-25 17:45:21 +04:00
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_BRIDGECO, 0x00010048, &spec_normal),
|
2014-04-25 17:45:14 +04:00
|
|
|
/* BridgeCo, Audio5 */
|
2014-04-25 17:45:21 +04:00
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_BRIDGECO, 0x00010049, &spec_normal),
|
2014-04-25 17:45:14 +04:00
|
|
|
/* Mackie, Onyx 1220/1620/1640 (Firewire I/O Card) */
|
ALSA: bebob: support Firewire I/O card of Mackie Onyx 1220/1620/1640
Current ALSA BeBoB drivers has an entry for this model, while the value of
vendor ID seems to be wrong according to an user's report.
The vendor had released no updated firmware, thus we can judge that this
model had not changed the content of its config ROM. It's reasonable to fix
the ID according to the report.
$ ./linux-firewire-utils/src/crpp < /sys/bus/firewire/devices/fw1/config_rom
ROM header and bus information block
-----------------------------------------------------------------
400 0425720f bus_info_length 4, crc_length 37, crc 29199
404 31333934 bus_name "1394"
408 f0646122 irmc 1, cmc 1, isc 1, bmc 1, pmc 0, cyc_clk_acc 100,
max_rec 6 (128), max_rom 1, gen 2, spd 2 (S400)
40c 00000ff2 company_id 00000f |
410 00004697 device_id f200004697 | EUI-64 00000ff200004697
root directory
-----------------------------------------------------------------
414 000859be directory_length 8, crc 22974
418 04000082 hardware version
41c 0c0083c0 node capabilities per IEEE 1394
420 03000ff2 vendor
424 8100000a --> descriptor leaf at 44c
428 17010065 model
42c 8100000d --> descriptor leaf at 460
430 13000910 version
434 d1000001 --> unit directory at 438
unit directory at 438
-----------------------------------------------------------------
438 0004ccec directory_length 4, crc 52460
43c 1200a02d specifier id: 1394 TA
440 13010001 version: AV/C
444 17010065 model
448 8100000d --> descriptor leaf at 47c
descriptor leaf at 44c
-----------------------------------------------------------------
44c 0004152a leaf_length 4, crc 5418
450 00000000 textual descriptor
454 00000000 minimal ASCII
458 4d61636b "Mack"
45c 69650000 "ie"
descriptor leaf at 460
-----------------------------------------------------------------
460 000612b5 leaf_length 6, crc 4789
464 00000000 textual descriptor
468 00000000 minimal ASCII
46c 4f6e7978 "Onyx"
470 20466972 " Fir"
474 65776972 "ewir"
478 65000000 "e"
descriptor leaf at 47c
-----------------------------------------------------------------
47c 000612b5 leaf_length 6, crc 4789
480 00000000 textual descriptor
484 00000000 minimal ASCII
488 4f6e7978 "Onyx"
48c 20466972 " Fir"
490 65776972 "ewir"
494 65000000 "e"
$ cat /proc/asound/card3/firewire/firmware
Manufacturer: bridgeCo
Protocol Ver: 1
Build Ver: 0
GUID: 0x00000FF200004697
Model ID: 0x82
Model Rev: 1
Firmware Date: 20040430
Firmware Time: 131527
Firmware ID: 0x10065
Firmware Ver: 2320
Base Addr: 0x20080000
Max Size: 1572864
Loader Date: 20040430
Loader Time: 112036
Reported-by: Andrzej Gansiniec <andrzej@gansiniec.pl>
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-10-04 03:17:03 +03:00
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_MACKIE2, 0x00010065, &spec_normal),
|
2014-04-25 17:45:14 +04:00
|
|
|
/* Mackie, d.2 (Firewire Option) */
|
ALSA: bebob: support Firewire I/O card of Mackie Onyx 1220/1620/1640
Current ALSA BeBoB drivers has an entry for this model, while the value of
vendor ID seems to be wrong according to an user's report.
The vendor had released no updated firmware, thus we can judge that this
model had not changed the content of its config ROM. It's reasonable to fix
the ID according to the report.
$ ./linux-firewire-utils/src/crpp < /sys/bus/firewire/devices/fw1/config_rom
ROM header and bus information block
-----------------------------------------------------------------
400 0425720f bus_info_length 4, crc_length 37, crc 29199
404 31333934 bus_name "1394"
408 f0646122 irmc 1, cmc 1, isc 1, bmc 1, pmc 0, cyc_clk_acc 100,
max_rec 6 (128), max_rom 1, gen 2, spd 2 (S400)
40c 00000ff2 company_id 00000f |
410 00004697 device_id f200004697 | EUI-64 00000ff200004697
root directory
-----------------------------------------------------------------
414 000859be directory_length 8, crc 22974
418 04000082 hardware version
41c 0c0083c0 node capabilities per IEEE 1394
420 03000ff2 vendor
424 8100000a --> descriptor leaf at 44c
428 17010065 model
42c 8100000d --> descriptor leaf at 460
430 13000910 version
434 d1000001 --> unit directory at 438
unit directory at 438
-----------------------------------------------------------------
438 0004ccec directory_length 4, crc 52460
43c 1200a02d specifier id: 1394 TA
440 13010001 version: AV/C
444 17010065 model
448 8100000d --> descriptor leaf at 47c
descriptor leaf at 44c
-----------------------------------------------------------------
44c 0004152a leaf_length 4, crc 5418
450 00000000 textual descriptor
454 00000000 minimal ASCII
458 4d61636b "Mack"
45c 69650000 "ie"
descriptor leaf at 460
-----------------------------------------------------------------
460 000612b5 leaf_length 6, crc 4789
464 00000000 textual descriptor
468 00000000 minimal ASCII
46c 4f6e7978 "Onyx"
470 20466972 " Fir"
474 65776972 "ewir"
478 65000000 "e"
descriptor leaf at 47c
-----------------------------------------------------------------
47c 000612b5 leaf_length 6, crc 4789
480 00000000 textual descriptor
484 00000000 minimal ASCII
488 4f6e7978 "Onyx"
48c 20466972 " Fir"
490 65776972 "ewir"
494 65000000 "e"
$ cat /proc/asound/card3/firewire/firmware
Manufacturer: bridgeCo
Protocol Ver: 1
Build Ver: 0
GUID: 0x00000FF200004697
Model ID: 0x82
Model Rev: 1
Firmware Date: 20040430
Firmware Time: 131527
Firmware ID: 0x10065
Firmware Ver: 2320
Base Addr: 0x20080000
Max Size: 1572864
Loader Date: 20040430
Loader Time: 112036
Reported-by: Andrzej Gansiniec <andrzej@gansiniec.pl>
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-10-04 03:17:03 +03:00
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_MACKIE1, 0x00010067, &spec_normal),
|
2014-04-25 17:45:14 +04:00
|
|
|
/* Stanton, ScratchAmp */
|
2014-04-25 17:45:21 +04:00
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_STANTON, 0x00000001, &spec_normal),
|
2014-04-25 17:45:14 +04:00
|
|
|
/* Tascam, IF-FW DM */
|
2014-04-25 17:45:21 +04:00
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_TASCAM, 0x00010067, &spec_normal),
|
2014-04-25 17:45:14 +04:00
|
|
|
/* Behringer, XENIX UFX 1204 */
|
2014-04-25 17:45:21 +04:00
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_BEHRINGER, 0x00001204, &spec_normal),
|
2014-04-25 17:45:14 +04:00
|
|
|
/* Behringer, XENIX UFX 1604 */
|
2014-04-25 17:45:21 +04:00
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_BEHRINGER, 0x00001604, &spec_normal),
|
2014-04-25 17:45:14 +04:00
|
|
|
/* Behringer, Digital Mixer X32 series (X-UF Card) */
|
2014-04-25 17:45:21 +04:00
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_BEHRINGER, 0x00000006, &spec_normal),
|
2015-06-14 06:49:37 +03:00
|
|
|
/* Behringer, F-Control Audio 1616 */
|
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_BEHRINGER, 0x001616, &spec_normal),
|
|
|
|
/* Behringer, F-Control Audio 610 */
|
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_BEHRINGER, 0x000610, &spec_normal),
|
2014-04-25 17:45:14 +04:00
|
|
|
/* Apogee Electronics, Rosetta 200/400 (X-FireWire card) */
|
|
|
|
/* Apogee Electronics, DA/AD/DD-16X (X-FireWire card) */
|
2014-04-25 17:45:21 +04:00
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_APOGEE, 0x00010048, &spec_normal),
|
2014-04-25 17:45:14 +04:00
|
|
|
/* Apogee Electronics, Ensemble */
|
ALSA: bebob: fix model-id of unit for Apogee Ensemble
This commit fixes hard-coded model-id for an unit of Apogee Ensemble with
a correct value. This unit uses DM1500 ASIC produced ArchWave AG (formerly
known as BridgeCo AG).
I note that this model supports three modes in the number of data channels
in tx/rx streams; 8 ch pairs, 10 ch pairs, 18 ch pairs. The mode is
switched by Vendor-dependent AV/C command, like:
$ cd linux-firewire-utils
$ ./firewire-request /dev/fw1 fcp 0x00ff000003dbeb0600000000 (8ch pairs)
$ ./firewire-request /dev/fw1 fcp 0x00ff000003dbeb0601000000 (10ch pairs)
$ ./firewire-request /dev/fw1 fcp 0x00ff000003dbeb0602000000 (18ch pairs)
When switching between different mode, the unit disappears from IEEE 1394
bus, then appears on the bus with different combination of stream formats.
In a mode of 18 ch pairs, available sampling rate is up to 96.0 kHz, else
up to 192.0 kHz.
$ ./hinawa-config-rom-printer /dev/fw1
{ 'bus-info': { 'adj': False,
'bmc': True,
'chip_ID': 21474898341,
'cmc': True,
'cyc_clk_acc': 100,
'generation': 2,
'imc': True,
'isc': True,
'link_spd': 2,
'max_ROM': 1,
'max_rec': 512,
'name': '1394',
'node_vendor_ID': 987,
'pmc': False},
'root-directory': [ ['HARDWARE_VERSION', 19],
[ 'NODE_CAPABILITIES',
{ 'addressing': {'64': True, 'fix': True, 'prv': False},
'misc': {'int': False, 'ms': False, 'spt': True},
'state': { 'atn': False,
'ded': False,
'drq': True,
'elo': False,
'init': False,
'lst': True,
'off': False},
'testing': {'bas': False, 'ext': False}}],
['VENDOR', 987],
['DESCRIPTOR', 'Apogee Electronics'],
['MODEL', 126702],
['DESCRIPTOR', 'Ensemble'],
['VERSION', 5297],
[ 'UNIT',
[ ['SPECIFIER_ID', 41005],
['VERSION', 65537],
['MODEL', 126702],
['DESCRIPTOR', 'Ensemble']]],
[ 'DEPENDENT_INFO',
[ ['SPECIFIER_ID', 2037],
['VERSION', 1],
[(58, 'IMMEDIATE'), 16777159],
[(59, 'IMMEDIATE'), 1048576],
[(60, 'IMMEDIATE'), 16777159],
[(61, 'IMMEDIATE'), 6291456]]]]}
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-12-19 14:00:42 +03:00
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_APOGEE, 0x01eeee, &spec_normal),
|
2014-04-25 17:45:14 +04:00
|
|
|
/* ESI, Quatafire610 */
|
2014-04-25 17:45:21 +04:00
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_ESI, 0x00010064, &spec_normal),
|
2014-04-25 17:45:14 +04:00
|
|
|
/* AcousticReality, eARMasterOne */
|
2014-04-25 17:45:21 +04:00
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_ACOUSTIC, 0x00000002, &spec_normal),
|
2014-04-25 17:45:14 +04:00
|
|
|
/* CME, MatrixKFW */
|
2014-04-25 17:45:21 +04:00
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_CME, 0x00030000, &spec_normal),
|
2014-04-25 17:45:14 +04:00
|
|
|
/* Phonic, Helix Board 12 MkII */
|
2014-04-25 17:45:21 +04:00
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_PHONIC, 0x00050000, &spec_normal),
|
2014-04-25 17:45:14 +04:00
|
|
|
/* Phonic, Helix Board 18 MkII */
|
2014-04-25 17:45:21 +04:00
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_PHONIC, 0x00060000, &spec_normal),
|
2014-04-25 17:45:14 +04:00
|
|
|
/* Phonic, Helix Board 24 MkII */
|
2014-04-25 17:45:21 +04:00
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_PHONIC, 0x00070000, &spec_normal),
|
2014-04-25 17:45:14 +04:00
|
|
|
/* Phonic, Helix Board 12 Universal/18 Universal/24 Universal */
|
2014-04-25 17:45:21 +04:00
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_PHONIC, 0x00000000, &spec_normal),
|
2014-04-25 17:45:14 +04:00
|
|
|
/* Lynx, Aurora 8/16 (LT-FW) */
|
2014-04-25 17:45:21 +04:00
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_LYNX, 0x00000001, &spec_normal),
|
2014-04-25 17:45:14 +04:00
|
|
|
/* ICON, FireXon */
|
2014-04-25 17:45:21 +04:00
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_ICON, 0x00000001, &spec_normal),
|
2014-04-25 17:45:14 +04:00
|
|
|
/* PrismSound, Orpheus */
|
2014-04-25 17:45:21 +04:00
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_PRISMSOUND, 0x00010048, &spec_normal),
|
2014-04-25 17:45:14 +04:00
|
|
|
/* PrismSound, ADA-8XR */
|
2014-04-25 17:45:21 +04:00
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_PRISMSOUND, 0x0000ada8, &spec_normal),
|
2014-04-25 17:45:22 +04:00
|
|
|
/* TerraTec Electronic GmbH, PHASE 88 Rack FW */
|
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_TERRATEC, 0x00000003, &phase88_rack_spec),
|
|
|
|
/* TerraTec Electronic GmbH, PHASE 24 FW */
|
2016-08-24 15:42:43 +03:00
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_TERRATEC, 0x00000004, &yamaha_terratec_spec),
|
2014-04-25 17:45:22 +04:00
|
|
|
/* TerraTec Electronic GmbH, Phase X24 FW */
|
2016-08-24 15:42:43 +03:00
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_TERRATEC, 0x00000007, &yamaha_terratec_spec),
|
2014-04-25 17:45:22 +04:00
|
|
|
/* TerraTec Electronic GmbH, EWS MIC2/MIC8 */
|
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_TERRATEC, 0x00000005, &spec_normal),
|
|
|
|
/* Terratec Electronic GmbH, Aureon 7.1 Firewire */
|
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_TERRATEC, 0x00000002, &spec_normal),
|
2014-04-25 17:45:23 +04:00
|
|
|
/* Yamaha, GO44 */
|
2016-08-24 15:42:43 +03:00
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_YAMAHA, 0x0010000b, &yamaha_terratec_spec),
|
2014-04-25 17:45:23 +04:00
|
|
|
/* YAMAHA, GO46 */
|
2016-08-24 15:42:43 +03:00
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_YAMAHA, 0x0010000c, &yamaha_terratec_spec),
|
2014-04-25 17:45:24 +04:00
|
|
|
/* Focusrite, SaffirePro 26 I/O */
|
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_FOCUSRITE, 0x00000003, &saffirepro_26_spec),
|
|
|
|
/* Focusrite, SaffirePro 10 I/O */
|
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_FOCUSRITE, 0x00000006, &saffirepro_10_spec),
|
|
|
|
/* Focusrite, Saffire(no label and LE) */
|
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_FOCUSRITE, MODEL_FOCUSRITE_SAFFIRE_BOTH,
|
|
|
|
&saffire_spec),
|
2014-04-25 17:45:25 +04:00
|
|
|
/* M-Audio, Firewire 410 */
|
2014-04-25 17:45:29 +04:00
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_MAUDIO2, 0x00010058, NULL), /* bootloader */
|
2014-04-25 17:45:25 +04:00
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_MAUDIO2, 0x00010046, &maudio_fw410_spec),
|
|
|
|
/* M-Audio, Firewire Audiophile */
|
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_MAUDIO1, MODEL_MAUDIO_AUDIOPHILE_BOTH,
|
|
|
|
&maudio_audiophile_spec),
|
|
|
|
/* M-Audio, Firewire Solo */
|
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_MAUDIO1, 0x00010062, &maudio_solo_spec),
|
|
|
|
/* M-Audio, Ozonic */
|
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_MAUDIO1, 0x0000000a, &maudio_ozonic_spec),
|
|
|
|
/* M-Audio NRV10 */
|
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_MAUDIO1, 0x00010081, &maudio_nrv10_spec),
|
|
|
|
/* M-Audio, ProFireLightbridge */
|
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_MAUDIO1, 0x000100a1, &spec_normal),
|
2014-04-25 17:45:26 +04:00
|
|
|
/* Firewire 1814 */
|
2014-04-25 17:45:29 +04:00
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_MAUDIO1, 0x00010070, NULL), /* bootloader */
|
2014-04-25 17:45:26 +04:00
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_MAUDIO1, MODEL_MAUDIO_FW1814,
|
|
|
|
&maudio_special_spec),
|
|
|
|
/* M-Audio ProjectMix */
|
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_MAUDIO1, MODEL_MAUDIO_PROJECTMIX,
|
|
|
|
&maudio_special_spec),
|
2015-05-24 14:51:45 +03:00
|
|
|
/* Digidesign Mbox 2 Pro */
|
|
|
|
SND_BEBOB_DEV_ENTRY(VEN_DIGIDESIGN, 0x0000a9, &spec_normal),
|
2014-04-25 17:45:14 +04:00
|
|
|
/* IDs are unknown but able to be supported */
|
|
|
|
/* Apogee, Mini-ME Firewire */
|
|
|
|
/* Apogee, Mini-DAC Firewire */
|
|
|
|
/* Cakawalk, Sonar Power Studio 66 */
|
|
|
|
/* CME, UF400e */
|
|
|
|
/* ESI, Quotafire XL */
|
|
|
|
/* Infrasonic, DewX */
|
|
|
|
/* Infrasonic, Windy6 */
|
|
|
|
/* Mackie, Digital X Bus x.200 */
|
|
|
|
/* Mackie, Digital X Bus x.400 */
|
|
|
|
/* Phonic, HB 12 */
|
|
|
|
/* Phonic, HB 24 */
|
|
|
|
/* Phonic, HB 18 */
|
|
|
|
/* Phonic, FireFly 202 */
|
|
|
|
/* Phonic, FireFly 302 */
|
|
|
|
/* Rolf Spuler, Firewire Guitar */
|
|
|
|
{}
|
|
|
|
};
|
|
|
|
MODULE_DEVICE_TABLE(ieee1394, bebob_id_table);
|
|
|
|
|
|
|
|
static struct fw_driver bebob_driver = {
|
|
|
|
.driver = {
|
|
|
|
.owner = THIS_MODULE,
|
|
|
|
.name = "snd-bebob",
|
|
|
|
.bus = &fw_bus_type,
|
|
|
|
},
|
|
|
|
.probe = bebob_probe,
|
|
|
|
.update = bebob_update,
|
|
|
|
.remove = bebob_remove,
|
|
|
|
.id_table = bebob_id_table,
|
|
|
|
};
|
|
|
|
|
|
|
|
static int __init
|
|
|
|
snd_bebob_init(void)
|
|
|
|
{
|
|
|
|
return driver_register(&bebob_driver.driver);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void __exit
|
|
|
|
snd_bebob_exit(void)
|
|
|
|
{
|
|
|
|
driver_unregister(&bebob_driver.driver);
|
|
|
|
}
|
|
|
|
|
|
|
|
module_init(snd_bebob_init);
|
|
|
|
module_exit(snd_bebob_exit);
|