]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ALSA: firewire-lib: enable the same feature as CIP_SKIP_INIT_DBC_CHECK flag
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Mon, 9 May 2016 14:15:56 +0000 (23:15 +0900)
committerTakashi Iwai <tiwai@suse.de>
Tue, 10 May 2016 15:04:01 +0000 (17:04 +0200)
In former commit, drivers in ALSA firewire stack always starts IT context
before IR context. If IR context starts after packets are transmitted by
peer unit, packet discontinuity may be detected because the context starts
in the middle of packet streaming. This situation is rare because IT
context usually starts immediately. However, it's better to solve this
issue. This is suppressed with CIP_SKIP_INIT_DBC_CHECK flag.

This commit enables the same feature as CIP_SKIP_INIT_DBC_CHECK.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/firewire/amdtp-stream.c
sound/firewire/amdtp-stream.h
sound/firewire/bebob/bebob_stream.c
sound/firewire/digi00x/amdtp-dot.c
sound/firewire/oxfw/oxfw-stream.c

index 6db2a73d7140faeedca9e43befb7f5c51ad3a97b..830a95c0b0e432b612c06d63e0397950e3328742 100644 (file)
@@ -723,8 +723,7 @@ int amdtp_stream_start(struct amdtp_stream *s, int channel, int speed)
                goto err_unlock;
        }
 
-       if (s->direction == AMDTP_IN_STREAM &&
-           s->flags & CIP_SKIP_INIT_DBC_CHECK)
+       if (s->direction == AMDTP_IN_STREAM)
                s->data_block_counter = UINT_MAX;
        else
                s->data_block_counter = 0;
index da028b0afb48c83d0eeb33abe260c446debf77c1..349c405f3d99812c953c2ecaaf2ab1c291af461e 100644 (file)
@@ -24,8 +24,6 @@
  *     The value of data_block_quadlets is used instead of reported value.
  * @CIP_SKIP_DBC_ZERO_CHECK: Only for in-stream.  Packets with zero in dbc is
  *     skipped for detecting discontinuity.
- * @CIP_SKIP_INIT_DBC_CHECK: Only for in-stream. The value of dbc in first
- *     packet is not continuous from an initial value.
  * @CIP_EMPTY_HAS_WRONG_DBC: Only for in-stream. The value of dbc in empty
  *     packet is wrong but the others are correct.
  * @CIP_JUMBO_PAYLOAD: Only for in-stream. The number of data blocks in an
@@ -39,9 +37,8 @@ enum cip_flags {
        CIP_DBC_IS_END_EVENT    = 0x04,
        CIP_WRONG_DBS           = 0x08,
        CIP_SKIP_DBC_ZERO_CHECK = 0x10,
-       CIP_SKIP_INIT_DBC_CHECK = 0x20,
-       CIP_EMPTY_HAS_WRONG_DBC = 0x40,
-       CIP_JUMBO_PAYLOAD       = 0x80,
+       CIP_EMPTY_HAS_WRONG_DBC = 0x20,
+       CIP_JUMBO_PAYLOAD       = 0x40,
 };
 
 /**
index 0141813815b3a37451afc5cbc92f0a65af3da10f..4d3034a68bdfbd587163566484eea57804260eb7 100644 (file)
@@ -526,8 +526,6 @@ int snd_bebob_stream_init_duplex(struct snd_bebob *bebob)
                goto end;
        }
 
-       bebob->tx_stream.flags |= CIP_SKIP_INIT_DBC_CHECK;
-
        /*
         * BeBoB v3 transfers packets with these qurks:
         *  - In the beginning of streaming, the value of dbc is incremented
index 0ac92aba5bc1c9a4c01b1764a6f16a098e3bbae1..b3cffd01a19f711f3572920a33fa75098f39ffde 100644 (file)
@@ -421,7 +421,7 @@ int amdtp_dot_init(struct amdtp_stream *s, struct fw_unit *unit,
 
        /* Use different mode between incoming/outgoing. */
        if (dir == AMDTP_IN_STREAM) {
-               flags = CIP_NONBLOCKING | CIP_SKIP_INIT_DBC_CHECK;
+               flags = CIP_NONBLOCKING;
                process_data_blocks = process_tx_data_blocks;
        } else {
                flags = CIP_BLOCKING;
index 7cb5743c073bbed3f88d2452b6b6a7047f7619f3..d9361f3521338bce3befa1ddaa422a4e935680b4 100644 (file)
@@ -242,8 +242,7 @@ int snd_oxfw_stream_init_simplex(struct snd_oxfw *oxfw,
         * blocks than IEC 61883-6 defines.
         */
        if (stream == &oxfw->tx_stream) {
-               oxfw->tx_stream.flags |= CIP_SKIP_INIT_DBC_CHECK |
-                                        CIP_JUMBO_PAYLOAD;
+               oxfw->tx_stream.flags |= CIP_JUMBO_PAYLOAD;
                if (oxfw->wrong_dbs)
                        oxfw->tx_stream.flags |= CIP_WRONG_DBS;
        }