oxfw-midi.c (0898782247ae533d1f4e47a06bc5d4870931b284) oxfw-midi.c (1d6a722c4a0146ac20fd0daa541a177279adcbb2)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * oxfw_midi.c - a part of driver for OXFW970/971 based devices
4 *
5 * Copyright (c) 2014 Takashi Sakamoto
6 */
7
8#include "oxfw.h"

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

13 int err;
14
15 err = snd_oxfw_stream_lock_try(oxfw);
16 if (err < 0)
17 return err;
18
19 mutex_lock(&oxfw->mutex);
20
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * oxfw_midi.c - a part of driver for OXFW970/971 based devices
4 *
5 * Copyright (c) 2014 Takashi Sakamoto
6 */
7
8#include "oxfw.h"

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

13 int err;
14
15 err = snd_oxfw_stream_lock_try(oxfw);
16 if (err < 0)
17 return err;
18
19 mutex_lock(&oxfw->mutex);
20
21 err = snd_oxfw_stream_reserve_duplex(oxfw, &oxfw->tx_stream, 0, 0);
21 err = snd_oxfw_stream_reserve_duplex(oxfw, &oxfw->tx_stream, 0, 0, 0);
22 if (err >= 0) {
23 ++oxfw->substreams_count;
24 err = snd_oxfw_stream_start_duplex(oxfw);
25 if (err < 0)
26 --oxfw->substreams_count;
27 }
28
29 mutex_unlock(&oxfw->mutex);

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

40 int err;
41
42 err = snd_oxfw_stream_lock_try(oxfw);
43 if (err < 0)
44 return err;
45
46 mutex_lock(&oxfw->mutex);
47
22 if (err >= 0) {
23 ++oxfw->substreams_count;
24 err = snd_oxfw_stream_start_duplex(oxfw);
25 if (err < 0)
26 --oxfw->substreams_count;
27 }
28
29 mutex_unlock(&oxfw->mutex);

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

40 int err;
41
42 err = snd_oxfw_stream_lock_try(oxfw);
43 if (err < 0)
44 return err;
45
46 mutex_lock(&oxfw->mutex);
47
48 err = snd_oxfw_stream_reserve_duplex(oxfw, &oxfw->rx_stream, 0, 0);
48 err = snd_oxfw_stream_reserve_duplex(oxfw, &oxfw->rx_stream, 0, 0, 0);
49 if (err >= 0) {
50 ++oxfw->substreams_count;
51 err = snd_oxfw_stream_start_duplex(oxfw);
52 }
53
54 mutex_unlock(&oxfw->mutex);
55
56 if (err < 0)

--- 138 unchanged lines hidden ---
49 if (err >= 0) {
50 ++oxfw->substreams_count;
51 err = snd_oxfw_stream_start_duplex(oxfw);
52 }
53
54 mutex_unlock(&oxfw->mutex);
55
56 if (err < 0)

--- 138 unchanged lines hidden ---