summaryrefslogtreecommitdiffstats
path: root/sound/firewire/fireworks/fireworks_stream.c
Commit message (Collapse)AuthorAgeFilesLines
* ALSA: fireworks/bebob: Shorten critical section for stream_stop_duplex()Takashi Sakamoto2014-06-041-2/+2
| | | | | | | | All assignment for local variables in these functions are not related to critical section. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: fireworks/bebob: Change type of argument for sampling rateTakashi Sakamoto2014-05-271-1/+1
| | | | | | | | | Originally, I intent to this argument given with 'struct snd_pcm_runtime.rate' or params_rate(). They return value of 'unsigned int'. So 'unsigned int' is better for the type of this argument. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: fireworks: Add hwdep interfaceTakashi Sakamoto2014-05-261-0/+39
| | | | | | | | | | This interface is designed for mixer/control application. To use hwdep interface, the 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>
* ALSA: fireworks: Add PCM interfaceTakashi Sakamoto2014-05-261-33/+0
| | | | | | | | | | This commit adds a functionality to capture/playback PCM samples. When AMDTP stream is already running for PCM or the source of clock is not internal, available sampling rate is limited at current one. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: fireworks/firewire-lib: Add a quirk of data blocks for MIDI in out-streamTakashi Sakamoto2014-05-261-0/+5
| | | | | | | | | Fireworks has a quirk to ignore MIDI messages in data blocks more than 8. This commit adds a flag for this quirk and codes to skip 8 or more data blocks to transfer MIDI messages. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: fireworks/firewire-lib: Add a quirk to reset data block counter at bus ↵Takashi Sakamoto2014-05-261-0/+2
| | | | | | | | | | | | reset Fireworks has a quirk to reset data block counter at bus reset. This commit adds a flag of CIP_SKIP_DBC_ZERO_CHECK. This flag has an effect to skip checking dbc continuity when dbc is zero. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: fireworks/firewire-lib: Add a quirk for fixed interval of reported dbcTakashi Sakamoto2014-05-261-0/+3
| | | | | | | | | | | | | | | | | | | | | | Fireworks firmware version 5.5 reports fix interval for dbc in each packet. For example, AudioFire4: CIP0 CIP1 Payload 00070000 900484FF 72 00070008 9004A8FF 72 00070008 90FFFFFF 02 00070010 9004D0FF 72 00070018 9004C4FF 72 00070020 9004E8FF 72 00070020 90FFFFFF 02 00070028 900410FE 72 The interval of each dbc should be 16 except for empty packet but it's still 8. This commit adds a flag for this quirk and codes to refer to a fixed value. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: fireworks/firewire-lib: Add a quirk for wrong dbs in tx packetsTakashi Sakamoto2014-05-261-0/+3
| | | | | | | | | | | | One of Fireworks firmware, named as 'AudioFire9', seems to transmit packets with wrong value of dbs. It's always 0x11 but actual size of data block is different. This commit adds a flag for this quirk and some codes to calculate correct size. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: fireworks/firewire-lib: Add a quirk for the meaning of dbcTakashi Sakamoto2014-05-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fireworks has a quirk for the value of dbc field in transmitted packets. For Fireworks, dbc means the end of events in current packet. This is out of specification. For example, AudioFire4: CIP0 CIP1 Payload 01070092 90FFFFFF 02 0107009A 9001E17B 3A <- 010700A2 9001F6E5 3A 010700A2 90FFFFFF 02 010700AA 9001104F 3A <- 010700B2 900125B9 3A 010700BA 90013B23 3A 010700BA 90FFFFFF 02 010700C2 9001548E 3A <- 010700CA 900169F8 3A 010700CA 90FFFFFF 02 010700D2 90018362 3A <- 010700DA 900198CC 3A According to IEC 61883-1/6, a packet following to empty packet has the same value for its dbc. But for Fireworks, it's incremented and empty packet has the same value as previous packet in dbc field. This commit adds a flag for Fireworks and some codes to checking dbc continuity. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: fireworks/firewire-lib: Add a quirk for empty packet with TAG0Takashi Sakamoto2014-05-261-0/+2
| | | | | | | | Fireworks has a quirk to transmit empty packets with TAG0. This commit adds handling this quirk for full duplex stream synchronization. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: fireworks: Add connection and stream managementTakashi Sakamoto2014-05-261-0/+349
Fireworks manages connections by CMP and can transmit/receive AMDTP streams with a few quirks. This commit adds functionality to start/stop the streams. Major Fireworks products don't support 'SYT-Match' clock source mode, except for AudioFire12/8(till 2009 July) with firmware version 1.0. Already in previous commit, this driver don't support such old firmwares. So this commit adds support for non 'SYT-Match' clock source modes. I note that this driver has a short gap for MIDI streams when starting PCM stream. When AMDTP streams are running only for MIDI data and PCM data is going to be joined at different sampling rate, then AMDTP streams are stopped once and started again after changing sampling rate. Unfortunately, Fireworks is not fully compliant to IEC 61883-1/6. Some commits following to this commit add these quirks. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>