dice-stream.c (8fc01fc0674e3ea7fdd13bd3d138793619227f89) dice-stream.c (a113ff886b9a6e892dd4107be1fd7883cf020885)
1/*
2 * dice_stream.c - a part of driver for DICE based devices
3 *
4 * Copyright (c) Clemens Ladisch <clemens@ladisch.de>
5 * Copyright (c) 2014 Takashi Sakamoto <o-takashi@sakamocchi.jp>
6 *
7 * Licensed under the terms of the GNU General Public License, version 2.
8 */

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

213
214 /* Stop stream if rate is different. */
215 err = snd_dice_transaction_get_rate(dice, &curr_rate);
216 if (err < 0) {
217 dev_err(&dice->unit->device,
218 "fail to get sampling rate\n");
219 goto end;
220 }
1/*
2 * dice_stream.c - a part of driver for DICE based devices
3 *
4 * Copyright (c) Clemens Ladisch <clemens@ladisch.de>
5 * Copyright (c) 2014 Takashi Sakamoto <o-takashi@sakamocchi.jp>
6 *
7 * Licensed under the terms of the GNU General Public License, version 2.
8 */

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

213
214 /* Stop stream if rate is different. */
215 err = snd_dice_transaction_get_rate(dice, &curr_rate);
216 if (err < 0) {
217 dev_err(&dice->unit->device,
218 "fail to get sampling rate\n");
219 goto end;
220 }
221 if (rate == 0)
222 rate = curr_rate;
221 if (rate != curr_rate)
222 stop_stream(dice, master);
223
224 if (!amdtp_stream_running(master)) {
225 stop_stream(dice, slave);
226 snd_dice_transaction_clear_enable(dice);
227
228 amdtp_stream_set_sync(sync_mode, master, slave);

--- 177 unchanged lines hidden ---
223 if (rate != curr_rate)
224 stop_stream(dice, master);
225
226 if (!amdtp_stream_running(master)) {
227 stop_stream(dice, slave);
228 snd_dice_transaction_clear_enable(dice);
229
230 amdtp_stream_set_sync(sync_mode, master, slave);

--- 177 unchanged lines hidden ---