Commit 20d32022 authored by Takashi Iwai's avatar Takashi Iwai

ALSA: usb-audio: Deprecate async_unlink option

The async unlink behavior has been working over years.  The option was
provided only as a workaround for 2.4.x kernel.  Let's get rid of it.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 8ad10dc6
...@@ -1905,7 +1905,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. ...@@ -1905,7 +1905,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
vid - Vendor ID for the device (optional) vid - Vendor ID for the device (optional)
pid - Product ID for the device (optional) pid - Product ID for the device (optional)
nrpacks - Max. number of packets per URB (default: 8) nrpacks - Max. number of packets per URB (default: 8)
async_unlink - Use async unlink mode (default: yes)
device_setup - Device specific magic number (optional) device_setup - Device specific magic number (optional)
- Influence depends on the device - Influence depends on the device
- Default: 0x0000 - Default: 0x0000
...@@ -1917,8 +1916,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. ...@@ -1917,8 +1916,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
NB: nrpacks parameter can be modified dynamically via sysfs. NB: nrpacks parameter can be modified dynamically via sysfs.
Don't put the value over 20. Changing via sysfs has no sanity Don't put the value over 20. Changing via sysfs has no sanity
check. check.
NB: async_unlink=0 would cause Oops. It remains just for
debugging purpose (if any).
NB: ignore_ctl_error=1 may help when you get an error at accessing NB: ignore_ctl_error=1 may help when you get an error at accessing
the mixer element such as URB error -22. This happens on some the mixer element such as URB error -22. This happens on some
buggy USB device or the controller. buggy USB device or the controller.
......
...@@ -25,9 +25,6 @@ ...@@ -25,9 +25,6 @@
* *
* NOTES: * NOTES:
* *
* - async unlink should be used for avoiding the sleep inside lock.
* 2.4.22 usb-uhci seems buggy for async unlinking and results in
* oops. in such a cse, pass async_unlink=0 option.
* - the linked URBs would be preferred but not used so far because of * - the linked URBs would be preferred but not used so far because of
* the instability of unlinking. * the instability of unlinking.
* - type II is not supported properly. there is no device which supports * - type II is not supported properly. there is no device which supports
...@@ -83,7 +80,6 @@ static bool enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;/* Enable this card * ...@@ -83,7 +80,6 @@ static bool enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;/* Enable this card *
static int vid[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = -1 }; static int vid[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = -1 };
static int pid[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = -1 }; static int pid[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = -1 };
static int nrpacks = 8; /* max. number of packets per urb */ static int nrpacks = 8; /* max. number of packets per urb */
static bool async_unlink = 1;
static int device_setup[SNDRV_CARDS]; /* device parameter for this card */ static int device_setup[SNDRV_CARDS]; /* device parameter for this card */
static bool ignore_ctl_error; static bool ignore_ctl_error;
...@@ -99,8 +95,6 @@ module_param_array(pid, int, NULL, 0444); ...@@ -99,8 +95,6 @@ module_param_array(pid, int, NULL, 0444);
MODULE_PARM_DESC(pid, "Product ID for the USB audio device."); MODULE_PARM_DESC(pid, "Product ID for the USB audio device.");
module_param(nrpacks, int, 0644); module_param(nrpacks, int, 0644);
MODULE_PARM_DESC(nrpacks, "Max. number of packets per URB."); MODULE_PARM_DESC(nrpacks, "Max. number of packets per URB.");
module_param(async_unlink, bool, 0444);
MODULE_PARM_DESC(async_unlink, "Use async unlink mode.");
module_param_array(device_setup, int, NULL, 0444); module_param_array(device_setup, int, NULL, 0444);
MODULE_PARM_DESC(device_setup, "Specific device setup (if needed)."); MODULE_PARM_DESC(device_setup, "Specific device setup (if needed).");
module_param(ignore_ctl_error, bool, 0444); module_param(ignore_ctl_error, bool, 0444);
...@@ -345,7 +339,6 @@ static int snd_usb_audio_create(struct usb_device *dev, int idx, ...@@ -345,7 +339,6 @@ static int snd_usb_audio_create(struct usb_device *dev, int idx,
chip->card = card; chip->card = card;
chip->setup = device_setup[idx]; chip->setup = device_setup[idx];
chip->nrpacks = nrpacks; chip->nrpacks = nrpacks;
chip->async_unlink = async_unlink;
chip->probing = 1; chip->probing = 1;
chip->usb_id = USB_ID(le16_to_cpu(dev->descriptor.idVendor), chip->usb_id = USB_ID(le16_to_cpu(dev->descriptor.idVendor),
......
...@@ -523,7 +523,7 @@ static int deactivate_urbs(struct snd_usb_endpoint *ep, int force, int can_sleep ...@@ -523,7 +523,7 @@ static int deactivate_urbs(struct snd_usb_endpoint *ep, int force, int can_sleep
if (!force && ep->chip->shutdown) /* to be sure... */ if (!force && ep->chip->shutdown) /* to be sure... */
return -EBADFD; return -EBADFD;
async = !can_sleep && ep->chip->async_unlink; async = !can_sleep;
clear_bit(EP_FLAG_RUNNING, &ep->flags); clear_bit(EP_FLAG_RUNNING, &ep->flags);
......
...@@ -56,7 +56,6 @@ struct snd_usb_audio { ...@@ -56,7 +56,6 @@ struct snd_usb_audio {
int setup; /* from the 'device_setup' module param */ int setup; /* from the 'device_setup' module param */
int nrpacks; /* from the 'nrpacks' module param */ int nrpacks; /* from the 'nrpacks' module param */
int async_unlink; /* from the 'async_unlink' module param */
struct usb_host_interface *ctrl_intf; /* the audio control interface */ struct usb_host_interface *ctrl_intf; /* the audio control interface */
}; };
......
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