motu-stream.c (8edc56ec8f14a586a55b2ab2fda76e6bf4738ee6) motu-stream.c (2d103420c6eae2ef7d464798242f0d5283526054)
1/*
2 * motu-stream.c - a part of driver for MOTU FireWire series
3 *
4 * Copyright (c) 2015-2017 Takashi Sakamoto <o-takashi@sakamocchi.jp>
5 *
6 * Licensed under the terms of the GNU General Public License, version 2.
7 */
8

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

231
232 reg = cpu_to_be32(data);
233 return snd_motu_transaction_write(motu, PACKET_FORMAT_OFFSET, &reg,
234 sizeof(reg));
235}
236
237int snd_motu_stream_start_duplex(struct snd_motu *motu)
238{
1/*
2 * motu-stream.c - a part of driver for MOTU FireWire series
3 *
4 * Copyright (c) 2015-2017 Takashi Sakamoto <o-takashi@sakamocchi.jp>
5 *
6 * Licensed under the terms of the GNU General Public License, version 2.
7 */
8

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

231
232 reg = cpu_to_be32(data);
233 return snd_motu_transaction_write(motu, PACKET_FORMAT_OFFSET, &reg,
234 sizeof(reg));
235}
236
237int snd_motu_stream_start_duplex(struct snd_motu *motu)
238{
239 unsigned int generation = motu->rx_resources.generation;
239 int err = 0;
240
241 if (motu->substreams_counter == 0)
242 return 0;
243
244 if (amdtp_streaming_error(&motu->rx_stream) ||
245 amdtp_streaming_error(&motu->tx_stream))
246 finish_session(motu);
247
240 int err = 0;
241
242 if (motu->substreams_counter == 0)
243 return 0;
244
245 if (amdtp_streaming_error(&motu->rx_stream) ||
246 amdtp_streaming_error(&motu->tx_stream))
247 finish_session(motu);
248
249 if (generation != fw_parent_device(motu->unit)->card->generation) {
250 err = fw_iso_resources_update(&motu->rx_resources);
251 if (err < 0)
252 return err;
253
254 err = fw_iso_resources_update(&motu->tx_resources);
255 if (err < 0)
256 return err;
257 }
258
248 if (!amdtp_stream_running(&motu->rx_stream)) {
249 err = ensure_packet_formats(motu);
250 if (err < 0)
251 return err;
252
253 err = begin_session(motu);
254 if (err < 0) {
255 dev_err(&motu->unit->device,

--- 150 unchanged lines hidden ---
259 if (!amdtp_stream_running(&motu->rx_stream)) {
260 err = ensure_packet_formats(motu);
261 if (err < 0)
262 return err;
263
264 err = begin_session(motu);
265 if (err < 0) {
266 dev_err(&motu->unit->device,

--- 150 unchanged lines hidden ---