summaryrefslogtreecommitdiff
path: root/sound/firewire/digi00x/digi00x.c
AgeCommit message (Collapse)Author
2017-04-05ALSA: firewire-digi00x: add support for console models of Digi00x seriesTakashi Sakamoto
Digi00x series includes two types of unit; rack and console. As long as reading information on config rom of Digi 002 console, 'MODEL_ID' field has a different value from the one on Digi 002 rack. We've already got a test report from users with Digi 003 rack. We can assume that console type and rack type has different value in the field. This commit adds a device entry for console type. For following commits, this commit also adds a member to 'struct snd_digi00x' to identify console type. $ cd linux-firewire-utils/src $ python2 ./crpp < /sys/bus/firewire/devices/fw1/config_rom ROM header and bus information block ----------------------------------------------------------------- 400 0404f9d0 bus_info_length 4, crc_length 4, crc 63952 404 31333934 bus_name "1394" 408 60647002 irmc 0, cmc 1, isc 1, bmc 0, cyc_clk_acc 100, max_rec 7 (256) 40c 00a07e00 company_id 00a07e | 410 00a30000 device_id 0000a30000 | EUI-64 00a07e0000a30000 root directory ----------------------------------------------------------------- 414 00058a39 directory_length 5, crc 35385 418 0c0043a0 node capabilities 41c 04000001 hardware version 420 0300a07e vendor 424 81000007 --> descriptor leaf at 440 428 d1000001 --> unit directory at 42c unit directory at 42c ----------------------------------------------------------------- 42c 00046674 directory_length 4, crc 26228 430 120000a3 specifier id 434 13000001 version 438 17000001 model 43c 81000007 --> descriptor leaf at 458 descriptor leaf at 440 ----------------------------------------------------------------- 440 00055913 leaf_length 5, crc 22803 444 000050f2 descriptor_type 00, specifier_ID 50f2 448 80000000 44c 44696769 450 64657369 454 676e0000 descriptor leaf at 458 ----------------------------------------------------------------- 458 0004a6fd leaf_length 4, crc 42749 45c 00000000 textual descriptor 460 00000000 minimal ASCII 464 44696769 "Digi" 468 20303032 " 002" Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-03-31ALSA: firewire-digi00x: delayed registration of sound cardTakashi Sakamoto
When some digi00x units are connected sequentially, userspace applications are involved at bus-reset state on IEEE 1394 bus. In the state, any communications can be canceled. Therefore, sound card registration should be delayed till the bus gets calm. This commit achieves it. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-10-19ALSA: firewire-digi00x/firewire-tascam: remove wrong conversion for Config ROMTakashi Sakamoto
The contents of Config ROM in firewire device structure are already aligned to CPU-endianness. Thus, no need to convert it again. This commit removes needless conversions Fixes: 9edf723fd858('ALSA: firewire-digi00x: add skeleton for Digi 002/003 family') Fixes: c0949b278515('ALSA: firewire-tascam: add skeleton for TASCAM FireWire series') Reported-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-10-11ALSA: firewire-digi00x: add support for MIDI ports corresponding to ↵Takashi Sakamoto
isochronous packet streaming This commit adds MIDI functionality to capture/playback MIDI messages from/to physical MIDI ports. These messages are transferred in isochronous packets. When no substreams request AMDTP streams to run, this driver starts the streams at current sampling rate. When other substreams start at different sampling rate, the streams are stopped temporarily, then start again at requested sampling rate. This operation can generate missing MIDI bytes, thus it's preferable to start PCM substreams at favorite sampling rate in advance. Digi 002/003 console also has a set of MIDI port for physical controls. These ports are added in later commits. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-09-30ALSA: firewire-digi00x: add support for asynchronous messagingTakashi Sakamoto
Digi 002/003 family uses asynchronous transaction for messaging. The address to transmit this message is stored on a certain register. This commit allocates a range of address on OHCI 1394 host controller to handle the messaging. As long as I know, the purpose of this message seems to notify lost of synchronization. While, the meaning of content of the message is not clear. Actual examples of this messaging: * When clock source is set as internal: - 0x00007051 - 0x00007052 - 0x00007054 - 0x00007057 - 0x00007058 * When clock source is set as somewhat external: - 0x00009000 - 0x00009010 - 0x00009020 - 0x00009021 - 0x00009022 The lost often occurs when using internal clock source. In this case, users hear sounds with quite short gap every several minutes. In fact, the lost is recovered temporarily. When using with external clock source, the lost seems not to occur. The mechanism is not clear yet. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-09-30ALSA: firewire-digi00x: add hwdep interfaceTakashi Sakamoto
This commit adds hwdep interface so as the other sound drivers for units on IEEE 1394 bus have. This interface is designed for mixer/control applications. By using this interface, an application can get information about firewire node, can lock/unlock kernel streaming and can get notification at starting/stopping kernel streaming. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-09-30ALSA: firewire-digi00x: add PCM functionalityTakashi Sakamoto
This commit adds PCM functionality to transmit/receive PCM samples. Any PCM substreams are jointed because incoming/outgoing AMDTP streams are bound. When one of PCM substream is running or external clock source is selected, current sampling rate is used. Else, the sampling rate is changed as an userspace application requests. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-09-30ALSA: firewire-digi00x: add proc node to show clock statusTakashi Sakamoto
This commit adds proc node to show current clock status for debugging. As long as testing Digi 002 rack, registers can show local clock rate, local clock source. When external clock input such as S/PDIF is connected, the registers show the detection and external clock rate. Additionally, the registers show the mode of optical digital input interface. Although, a tester with Digi 003 rack reports this makes no sense. Further investigation is required for Digi 003 series. Besides, in Digi 002 rack, the S/PDIF format must be IEC 60958-4, so-called professional. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-09-30ALSA: firewire-digi00x: add stream functionalityTakashi Sakamoto
This commit adds a functionality to manage streaming. The streaming is not controlled by CMP in IEC 61883-6. It's controlled by IEEE 1394 write transaction to certain addresses. Several clock sources are available, while there're no differences about packet transmission. The value of SYT field in transmitted packets is always zero. Thus, streams in both direction don't build synchronization. And the device always requires received packets to transmit packets. This driver keeps to transfer outgoing stream even if they're not required. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-09-30ALSA: firewire-digi00x: add skeleton for Digi 002/003 familyTakashi Sakamoto
This commit adds a new driver for Digidesign 002/003 family. This commit just creates/removes card instance according to bus event. More functions will be added in following commits. Digidesign 002/003 family consists of: * Agere FW802B for IEEE 1394 PHY layer * PDI 1394L40 for IEEE 1394 LINK layer and IEC 61883 interface * ALTERA ACEX EP1K50 for IEC 61883 layer and DSP controller * ADSP-21065L for signal processing [minor cleanup using skip_spaces() by tiwai] Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>