ALSA: usb: handle descriptor with SYNC_NONE illegal value
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Fri, 14 Aug 2015 22:19:43 +0000 (17:19 -0500)
committerTakashi Iwai <tiwai@suse.de>
Sun, 16 Aug 2015 06:48:47 +0000 (08:48 +0200)
commit395ae54bd8775508a9616817188cabbcd6f53260
treede6bdb631be10f249c341ee86c056d6a00ae6f97
parent630184477e7eccb2b31ee4c20b6905ca5fa4b3a8
ALSA: usb: handle descriptor with SYNC_NONE illegal value

The M-Audio Transit exposes an interface with a SYNC_NONE attribute.
This is not a valid value according to the USB audio classspec. However
there is a sync endpoint associated to this record. Changing the logic to
try to use this sync endpoint allows for seamless transitions between
altset 2 and altset 3. If any errors happen, the behavior remains the same.

$ more /proc/asound/card1/stream0
M-Audio Transit USB at usb-0000:00:14.0-2, full speed : USB Audio

Playback:
  Status: Stop
  Interface 1
    Altset 1
    Format: S24_3LE
    Channels: 2
    Endpoint: 3 OUT (ADAPTIVE)
    Rates: 48001 - 96000 (continuous)
  Interface 1
    Altset 2
    Format: S24_3LE
    Channels: 2
    Endpoint: 3 OUT (NONE)
    Rates: 8000 - 48000 (continuous)
  Interface 1
    Altset 3
    Format: S16_LE
    Channels: 2
    Endpoint: 3 OUT (ASYNC)
    Rates: 8000 - 48000 (continuous)

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/pcm.c