summaryrefslogtreecommitdiffstats
path: root/sound/firewire
Commit message (Collapse)AuthorAgeFilesLines
* ALSA: oxfw: rename helper functions for duplex streamsTakashi Sakamoto2019-06-125-53/+58
| | | | | | | | | | | | In former commits, ALSA oxfw driver handles two isochronous contexts at the same time, except for some devices which supports one endpoint of isochronous packet stream. This commit renames some helper functions so that they handles duplex streams. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: oxfw: expand stop procedure for packet streamingTakashi Sakamoto2019-06-121-33/+35
| | | | | | | | The helper function stop packet streaming is not enough useful. This commit obsoletes it and expands its code. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: oxfw: break packet streaming at bus-reset handlerTakashi Sakamoto2019-06-121-10/+3
| | | | | | | | In most cases, recovery from bus reset is not successful. This commit aborts packet streaming in bus reset handler. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: oxfw: start duplex streams if supportedTakashi Sakamoto2019-06-121-53/+49
| | | | | | | | | It's inconvenient to handle two isochronous context separately each other. This commit unifies the counters to handle the two at the same time. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: oxfw: set packet parameter according to current configurationTakashi Sakamoto2019-06-121-24/+24
| | | | | | | | | After a call of pcm.hw_params, the state of target device is expected for applications. This commit retrieves the state and start packet streaming. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: oxfw: code refactoring for stop condition of packet streamingTakashi Sakamoto2019-06-121-5/+2
| | | | | | | | This commit unifies stop condition due to queueing error and unmatched state of the target device. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: fireworks: don't set XRUN in stop streamingTakashi Sakamoto2019-06-121-1/+0
| | | | | | | | When stopping packet streaming, no need to stop PCM substream with XRUN state. This commit suppresses it. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: fireworks: configure stream parameters in pcm.hw_params callbackTakashi Sakamoto2019-06-121-33/+49
| | | | | | | | | | | | This commit is a part of preparation to perform allocation/release of isochronous resources in pcm.hw_params/hw_free callbacks. This commit splits out an operation to configure stream parameters into pcm.hw_params callback. In pcm.prepare callback, establishing connections and start isochronous contexts. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: fireworks: configure sampling transfer frequency in pcm.hw_params callbackTakashi Sakamoto2019-06-124-32/+57
| | | | | | | | | | | | This commit is a part of preparation to perform allocation/release of isochronous resources in pcm.hw_params/hw_free callbacks. At present, several operations are done in pcm.prepare callback. To reduce load of the callback, This commit splits out an operation to set sampling transfer frequency in pcm.hw_params callback. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: fireworks: code refactoring for pcm.hw_params/hw_freeTakashi Sakamoto2019-06-121-39/+6
| | | | | | | | Two sets of callbacks for pcm.hw_params/hw_free but they have the same codes. This commit unifies each of the callbacks. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: fireworks: code refactoring for rawmidi.open/closeTakashi Sakamoto2019-06-121-39/+6
| | | | | | | | Two sets of callbacks for rawmidi.open/close but they have the same codes. This commit unifies each of the callbacks. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: fireworks: unify substream counterTakashi Sakamoto2019-06-124-27/+19
| | | | | | | | | | | | This commit is a part of preparation to perform allocation/release of isochronous resources in pcm.hw_params/hw_free callbacks. It's inconvenient to handle two isochronous context separately each other. This commit unifies the counters to handle the two at the same time. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: bebob: code refactoring to initialize/destroy stream dataTakashi Sakamoto2019-06-121-60/+61
| | | | | | | | This commit changes helper functions to initialize/destroy stream data so that it has an argument for direction. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: bebob: obsolete useless member of private structureTakashi Sakamoto2019-06-122-9/+0
| | | | | | | | The private structure of this driver has 'connected' member but nowadays it's useless. This commit removes it. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: bebob: don't set XRUN in stop streamingTakashi Sakamoto2019-06-121-3/+0
| | | | | | | | When stopping packet streaming, no need to stop PCM substream with XRUN state. This commit suppresses it. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: bebob: configure sampling transfer frequency in pcm.hw_params callbackTakashi Sakamoto2019-06-124-123/+136
| | | | | | | | | | | | This commit is a part of preparation to perform allocation/release of isochronous resources in pcm.hw_params/hw_free callbacks. At present, several operations are done in pcm.prepare callback. To reduce load of the callback, This commit splits out an operation to set sampling transfer frequency in pcm.hw_params callback. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: dice: code refactoring for pcm.hw_params/hw_free callbacksTakashi Sakamoto2019-06-111-47/+7
| | | | | | | | | | The pairs of pcm.hw_params callbacks and .hw_free callbacks for both direction have no differences. This commit unifies the pairs. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: dice: update isochronous resources when starting packet streaming ↵Takashi Sakamoto2019-06-111-0/+10
| | | | | | | | | | | | | | | | | | | | | | after bus-reset After bus reset, isochronous resource manager releases all of allocated isochronous resources. The nodes to transfer isochronous packet should request reallocation of the resources. However, between the bus-reset and invocation of 'struct fw_driver.update' handler, ALSA PCM application can detect this situation by XRUN because the target device cancelled to transmit packets once bus-reset occurs. Due to the above mechanism, ALSA fireface driver just stops packet streaming in the update handler, thus pcm.prepare handler should request the reallocation. This commit requests the reallocation in pcm.prepare callback when bus generation is changed. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: dice: reserve/release isochronous resources in pcm.hw_params/hw_free ↵Takashi Sakamoto2019-06-114-115/+143
| | | | | | | | | | | | | | | | | | | | | | | | | callbacks Once allocated, isochronous resources are available for packet streaming, even if the streaming is cancelled. For this reason, current implementation handles allocation of the resources and starting packet streaming at the same time. However, this brings complicated procedure to start packet streaming. This commit separates the allocation and starting. The allocation is done in pcm.hw_params callback and available till pcm.hw_free callback. Even if any XRUN occurs, pcm.prepare callback is done to restart packet streaming without releasing/allocating the resources. There are two points to stop packet streaming; in pcm.hw_params and pcm.prepare callbacks. The former point is a case that packet streaming is already started for any MIDI substream then packet streaming is requested with different sampling transfer frequency for any PCM substream. The latter point is cases of any XRUN or packet queueing error. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: dice: code refactoring to keep isochronous resourcesTakashi Sakamoto2019-06-111-59/+74
| | | | | | | | | | | | | This commit is a part of preparation to perform allocation/release of isochronous resources in pcm.hw_params/hw_free callbacks. This commit adds a helper function to allocate isochronous resources, separated from operations to start packet streaming, I note that some dice-based devices have two pair of endpoints for isochronous packet straeming. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: dice: code refactoring to stop packet streamingTakashi Sakamoto2019-06-111-13/+14
| | | | | | | | | | | | This commit is a part of preparation to perform allocation/release of isochronous resources in pcm.hw_params/hw_free callbacks. There're three points to finish packet streaming but no helper functions for common operations for it. This commit adds a helper function for operations to finish packet streaming. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: firewire-digi00x: code refactoring for pcm.hw_params/hw_free callbacksTakashi Sakamoto2019-06-111-48/+7
| | | | | | | | | | The pairs of pcm.hw_params callbacks and .hw_free callbacks for both direction have no differences. This commit unifies the pairs. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: firewire-digi00x: update isochronous resources when starting packet ↵Takashi Sakamoto2019-06-111-0/+11
| | | | | | | | | | | | | | | | | | | | | | streaming after bus-reset After bus reset, isochronous resource manager releases all of allocated isochronous resources. The nodes to transfer isochronous packet should request reallocation of the resources. However, between the bus-reset and invocation of 'struct fw_driver.update' handler, ALSA PCM application can detect this situation by XRUN because the target device cancelled to transmit packets once bus-reset occurs. Due to the above mechanism, ALSA fireface driver just stops packet streaming in the update handler, thus pcm.prepare handler should request the reallocation. This commit requests the reallocation in pcm.prepare callback when bus generation is changed. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: firewire-digi00x: reserve/release isochronous resources in ↵Takashi Sakamoto2019-06-114-51/+73
| | | | | | | | | | | | | | | | | | | | | | | | | pcm.hw_params/hw_free callbacks Once allocated, isochronous resources are available for packet streaming, even if the streaming is cancelled. For this reason, current implementation handles allocation of the resources and starting packet streaming at the same time. However, this brings complicated procedure to start packet streaming. This commit separates the allocation and starting. The allocation is done in pcm.hw_params callback and available till pcm.hw_free callback. Even if any XRUN occurs, pcm.prepare callback is done to restart packet streaming without releasing/allocating the resources. There are two points to stop packet streaming; in pcm.hw_params and pcm.prepare callbacks. The former point is a case that packet streaming is already started for any MIDI substream then packet streaming is requested with different sampling transfer frequency for any PCM substream. The latter point is cases of any XRUN or packet queueing error. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: firewire-digi00x: code refactoring to keep isochronous resourcesTakashi Sakamoto2019-06-111-24/+18
| | | | | | | | | | | | This commit is a part of preparation to perform allocation/release of isochronous resources in pcm.hw_params/hw_free callbacks. All of models in Digidesign Digi00x family have the same formation of data channels in isochronous packet for both directions. This commit simplifies allocation of isochronous resources in this point. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: firewire-digi00x: simplify error path to begin streaming sessionTakashi Sakamoto2019-06-111-6/+3
| | | | | | | | | | | | | This commit is a part of preparation to perform allocation/release of isochronous resources in pcm.hw_params/hw_free callbacks. The caller of begin_session() calls finish_session() in its error path, thus no need to call finish_session() in error path of begin_session(). This commit simplifies error path of begin_session(). Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: firewire-digi00x: code refactoring to finish streaming sessionTakashi Sakamoto2019-06-111-13/+9
| | | | | | | | | | | | This commit is a part of preparation to perform allocation/release of isochronous resources in pcm.hw_params/hw_free callbacks. The operation to finish packet streaming corresponds to stopping isochronous contexts. This commit applies code refactoring to move codes to stop into a helper function to finish the session. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: firewire-digi00x: refactoring to move timing of registration for ↵Takashi Sakamoto2019-06-111-22/+19
| | | | | | | | | | | | | | isochronous channel This commit is a part of preparation to perform allocation/release of isochronous resources in pcm.hw_params/hw_free callbacks. The registration of isochronous channels is done just after allocation of isochronous resources. This commit separates the registration just before starting packet streaming. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: fireface: code refactoring for pcm.hw_params/hw_free callbacksTakashi Sakamoto2019-06-111-48/+7
| | | | | | | | | | The pairs of pcm.hw_params callbacks and .hw_free callbacks for both direction have no differences. This commit unifies the pairs. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: fireface: minor code refactoring to finish streaming sessionTakashi Sakamoto2019-06-111-17/+6
| | | | | | | | | | | The operation to finish packet streaming corresponds to stopping isochronous contexts. This commit applies code refactoring to move codes to stop into a helper function to finish the session. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: fireface: update isochronous resources when starting packet streaming ↵Takashi Sakamoto2019-06-113-14/+36
| | | | | | | | | | | | | | | | | | | | | | after bus-reset After bus reset, isochronous resource manager releases all of allocated isochronous resources. The nodes to restart packet streaming should request reallocation of the resources. However, between the bus-reset and invocation of 'struct fw_driver.update' handler, ALSA PCM application can detect this situation by XRUN because the target device cancelled to transmit packets once bus-reset occurs. Due to the above mechanism, ALSA fireface driver just stops packet streaming in the update handler, thus pcm.prepare handler should request the reallocation. This commit requests the reallocation in pcm.prepare callback when bus generation is changed. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: fireface: reserve/release isochronous resources in ↵Takashi Sakamoto2019-06-113-30/+57
| | | | | | | | | | | | | | | | | | | | | pcm.hw_params/hw_free callbacks Once allocated, isochronous resources are available for packet streaming, even if the streaming is cancelled. For this reason, current implementation handles allocation of the resources and starting packet streaming at the same time. However, this brings complicated procedure to start packet streaming. This commit separates the allocation and starting. The allocation is done in pcm.hw_params callback and available till pcm.hw_free callback. Even if any XRUN occurs, pcm.prepare callback is done to restart packet streaming for allocated the resources. There are two points to stop packet streaming; in pcm.hw_params and pcm.prepare callbacks. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: fireface: support allocate_resources operation in latter protocolTakashi Sakamoto2019-06-111-57/+56
| | | | | | | | | | | | | | This commit is a part of preparation to perform allocation/release of isochronous channels in pcm.hw_params/hw_free callbacks. This commit implements allocate_resources callback for the protocol specific to latter models. The encoded values of constant table is split into several condition statements to separate the operation to configure sampling transfer frequency from the operation to configure the number of data channels in rx packet. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: fireface: support allocate_resources operation in ff400 protocolTakashi Sakamoto2019-06-111-20/+16
| | | | | | | | | | | | This commit is a part of preparation to perform allocation/release of isochronous channels in pcm.hw_params/hw_free callbacks. This commit implements allocate_resources callback for ff400 protocol. In this callback, sampling transfer frequency is configured to the device as well. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: fireface: support allocate_resources operation in ff800 protocolTakashi Sakamoto2019-06-111-24/+22
| | | | | | | | | | | | | | | This commit is a part of preparation to perform allocation/release of isochronous channels in pcm.hw_params/hw_free callbacks. This commit implements allocate_resources callback for ff800 protocol. As I noted in commit fc716397a5c7 ("ALSA: fireface: add support for packet streaming on Fireface 800"), this unit allocates isochronous resources for tx stream voluntarily. Therefore, this commit is to maintain isochronous rsources for rx stream. In the callback, sampling transfer frequency is configured to the device as well. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: fireface: add protocol-specific operation to allocate isochronous ↵Takashi Sakamoto2019-06-112-0/+5
| | | | | | | | | | | | | | | resources This commit is a part of preparation to perform allocation/release of isochronous channels in pcm.hw_params/hw_free callbacks. In ALSA fireface driver, the allocation of isochronous resources is programmed in each implementation of protocol. This commit adds protocol-specific operation for the allocation separated from the operation to begin session. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: firewire-tascam: code refactoring for pcm.hw_params/hw_free callbacksTakashi Sakamoto2019-06-111-48/+7
| | | | | | | | | | The pairs of pcm.hw_params callbacks and .hw_free callbacks for both direction have no differences. This commit unifies the pairs. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: firewire-tascam: minor code refactoring to finish streaming sessionTakashi Sakamoto2019-06-111-16/+5
| | | | | | | | | | | The operation to finish packet streaming corresponds to stopping isochronous contexts. This commit applies code refactoring to move codes to stop into a helper function to finish the session. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: firewire-tascam: update isochronous resources when starting packet ↵Takashi Sakamoto2019-06-111-1/+12
| | | | | | | | | | | | | | | | | | | | | | streaming after bus reset After bus reset, isochronous resource manager releases all of allocated isochronous resources. The nodes to restart packet streaming should request reallocation of the resources. However, between the bus-reset and invocation of 'struct fw_driver.update' handler, ALSA PCM application can detect this situation by XRUN because the target device cancelled to transmit packets once bus-reset occurs. Due to the above mechanism, ALSA firewire-tascam driver just stops packet streaming in the update handler, thus pcm.prepare handler should request the reallocation. This commit requests the reallocation in pcm.prepare callback when bus generation is changed. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: firewire-tascam: reserve/release isochronous resources in ↵Takashi Sakamoto2019-06-113-37/+66
| | | | | | | | | | | | | | | | | | | | | pcm.hw_params/hw_free callbacks Once allocated, isochronous resources are available for packet streaming, even if the streaming is cancelled. For this reason, current implementation handles allocation of the resources and starting packet streaming at the same time. However, this brings complicated procedure to start packet streaming. This commit separates the allocation and starting. The allocation is done in pcm.hw_params callback and available till pcm.hw_free callback. Even if any XRUN occurs, pcm.prepare callback is done to restart packet streaming for allocated the resources. There are two points to stop packet streaming; in pcm.hw_params and pcm.prepare callbacks. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: firewire-tascam: code refactoring for release of isochronous resourcesTakashi Sakamoto2019-06-111-10/+8
| | | | | | | | | | | This commit is a part of preparation to perform allocation/release of isochronous channels in pcm.hw_params/hw_free callbacks. This commit obsoletes a helper function to release isochronous resources for both direction. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: firewire-tascam: code refactoring for reservation of isochronous resourcesTakashi Sakamoto2019-06-111-22/+16
| | | | | | | | | | | This commit is a part of preparation to perform allocation/release of isochronous channels in pcm.hw_params/hw_free callbacks. This commit applies minor code refactoring for a helper function to allocate isochronous resources. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: firewire-tascam: code refactoring for registration of isochronous channelsTakashi Sakamoto2019-06-111-44/+40
| | | | | | | | | | | | This commit is a part of preparation to perform allocation/release of isochronous channels in pcm.hw_params/hw_free callbacks. The registration of isochronous channels is done just after allocation of isochronous resources. This commit separates the registration just before starting packet streaming. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: firewire-lib: refactoring to obsolete IR packet handlerTakashi Sakamoto2019-05-241-37/+39
| | | | | | | | | | | | As a result of heavy refactoring based on IR context header, the packet handler becomes simpler. This commit merges the packet handler into function for IR context callback. The logic to parse IR context header and tracepoints event is split to a function. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: firewire-lib: refactoring to obsolete IT packet handlerTakashi Sakamoto2019-05-241-31/+31
| | | | | | | | | | | | As a result of heavy refactoring based on IT packet header, the packet handler becomes simpler. This commit merges the packet handler into function for IT context callback. The logic to build IT packet header and tracepoints event is split to a function. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: firewire-lib: fix inverted node IDs for amdtp_packet eventsTakashi Sakamoto2019-05-241-3/+3
| | | | | | | | | The amdtp_packet events have inverted node IDs for src/dst. This commit fixes the bug. Fixes: 8d3f1fdf5211 ("ALSA: firewire-lib: unify tracing events to 'amdtp_packet' event") Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: firewire-lib: fix data block counter for incoming packet without CIP ↵Takashi Sakamoto2019-05-241-0/+2
| | | | | | | | | | | header The value of data block counter is not calculated for incoming packet without CIP header. This commit fixes the bug. Fixes: 947b437e1263 ("ALSA: firewire-lib: unify packet handler for IR context") Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: firewire-lib: use 8 byte packet header for IT context to separate CIP ↵Takashi Sakamoto2019-05-241-28/+35
| | | | | | | | | | | | | | | header from CIP payload In Linux firewire subsystem, for IT context, some quadlets of isochronous packet payload can be indicated as a part of packet header to queue to the context. This commit uses the packet header to split CIP headers from CIP payload. As a result, regardless of CIP or non-CIP, context payload includes data blocks only. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: firewire-lib: code refactoring to queueing packetsTakashi Sakamoto2019-05-241-28/+26
| | | | | | | | | This commit is a preparation to queue IT packet with header. To enable packet handler to fill the header, this commit uses kernel stack for data structure of packet parameter in several part of this file. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: firewire-lib: unify packet handler for IT contextTakashi Sakamoto2019-05-242-44/+18
| | | | | | | | | The handlers for packet with CIP and without CIP include common codes. This commit unifies them and remove an member for pointer to callback function from data structure. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>