Commit a83c8170 authored by Jaroslav Kysela's avatar Jaroslav Kysela

[ALSA] Fix open handling

USB USX2Y
Return -EBUSY from snd_usX2Y_usbpcm_open(), if the associated hwdep
device is not opened.

It now works as originally intended. Had forgotten a pair of parenthesis.
Signed-off-by: default avatarKarsten Wiese <annabellesgarden@yahoo.de>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 65ebc272
/*
* usbusy2y.c - ALSA USB US-428 Driver
*
2004-12-14 Karsten Wiese
Version 0.8.7.1:
snd_pcm_open for rawusb pcm-devices now returns -EBUSY if called without rawusb's hwdep device being open.
2004-12-02 Karsten Wiese
Version 0.8.7:
Use macro usb_maxpacket() for portability.
......@@ -139,7 +143,7 @@
MODULE_AUTHOR("Karsten Wiese <annabellesgarden@yahoo.de>");
MODULE_DESCRIPTION("TASCAM "NAME_ALLCAPS" Version 0.8.7");
MODULE_DESCRIPTION("TASCAM "NAME_ALLCAPS" Version 0.8.7.1");
MODULE_LICENSE("GPL");
MODULE_SUPPORTED_DEVICE("{{TASCAM(0x1604), "NAME_ALLCAPS"(0x8001)(0x8005)(0x8007) }}");
......
......@@ -22,7 +22,7 @@
It provides the alsa kernel half of the usx2y-alsa-jack driver pair.
The pair uses a hardware dependant alsa-device for mmaped pcm transport.
Advantage achieved:
The usb_hcd places reads/writes pcm data into dma-memory.
The usb_hc moves pcm data from/into memory via DMA.
That memory is mmaped by jack's usx2y driver.
Jack's usx2y driver is the first/last to read/write pcm data.
Read/write is a combination of power of 2 period shaping and
......@@ -568,7 +568,7 @@ static int snd_usX2Y_usbpcm_open(snd_pcm_substream_t *substream)
snd_pcm_substream_chip(substream))[substream->stream];
snd_pcm_runtime_t *runtime = substream->runtime;
if (!subs->usX2Y->chip_status & USX2Y_STAT_CHIP_MMAP_PCM_URBS)
if (!(subs->usX2Y->chip_status & USX2Y_STAT_CHIP_MMAP_PCM_URBS))
return -EBUSY;
runtime->hw = SNDRV_PCM_STREAM_PLAYBACK == substream->stream ? snd_usX2Y_2c :
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment