Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 110899
b: refs/heads/master
c: 7a9b806
h: refs/heads/master
i:
  110897: 19c730b
  110895: 8042705
v: v3
  • Loading branch information
Takashi Iwai authored and Jaroslav Kysela committed Aug 15, 2008
1 parent 9fc86a1 commit c3ce5d3
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8a8f2662c535e1dedced896cc68cb8473fd98fa0
refs/heads/master: 7a9b8063cf7d78d7de4f2555357101087548c699
5 changes: 5 additions & 0 deletions trunk/Documentation/sound/alsa/ALSA-Configuration.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1983,6 +1983,8 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
device_setup - Device specific magic number (optional)
- Influence depends on the device
- Default: 0x0000
ignore_ctl_error - Ignore any USB-controller regarding mixer
interface (default: no)

This module supports multiple devices, autoprobe and hotplugging.

Expand All @@ -1991,6 +1993,9 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
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
the mixer element such as URB error -22. This happens on some
buggy USB device or the controller.

Module snd-usb-caiaq
--------------------
Expand Down
7 changes: 5 additions & 2 deletions trunk/sound/usb/usbaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ static int pid[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = -1 };
static int nrpacks = 8; /* max. number of packets per urb */
static int async_unlink = 1;
static int device_setup[SNDRV_CARDS]; /* device parameter for this card*/
static int ignore_ctl_error;

module_param_array(index, int, NULL, 0444);
MODULE_PARM_DESC(index, "Index value for the USB audio adapter.");
Expand All @@ -88,7 +89,9 @@ module_param(async_unlink, bool, 0444);
MODULE_PARM_DESC(async_unlink, "Use async unlink mode.");
module_param_array(device_setup, int, NULL, 0444);
MODULE_PARM_DESC(device_setup, "Specific device setup (if needed).");

module_param(ignore_ctl_error, bool, 0444);
MODULE_PARM_DESC(ignore_ctl_error,
"Ignore errors from USB controller for mixer interfaces.");

/*
* debug the h/w constraints
Expand Down Expand Up @@ -3633,7 +3636,7 @@ static void *snd_usb_audio_probe(struct usb_device *dev,
if (err > 0) {
/* create normal USB audio interfaces */
if (snd_usb_create_streams(chip, ifnum) < 0 ||
snd_usb_create_mixer(chip, ifnum) < 0) {
snd_usb_create_mixer(chip, ifnum, ignore_ctl_error) < 0) {
goto __error;
}
}
Expand Down
3 changes: 2 additions & 1 deletion trunk/sound/usb/usbaudio.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,8 @@ int snd_usb_ctl_msg(struct usb_device *dev, unsigned int pipe,
__u8 request, __u8 requesttype, __u16 value, __u16 index,
void *data, __u16 size, int timeout);

int snd_usb_create_mixer(struct snd_usb_audio *chip, int ctrlif);
int snd_usb_create_mixer(struct snd_usb_audio *chip, int ctrlif,
int ignore_error);
void snd_usb_mixer_disconnect(struct list_head *p);

int snd_usb_create_midi_interface(struct snd_usb_audio *chip, struct usb_interface *iface,
Expand Down
7 changes: 3 additions & 4 deletions trunk/sound/usb/usbmixer.c
Original file line number Diff line number Diff line change
Expand Up @@ -2014,7 +2014,8 @@ static void snd_audigy2nx_proc_read(struct snd_info_entry *entry,
}
}

int snd_usb_create_mixer(struct snd_usb_audio *chip, int ctrlif)
int snd_usb_create_mixer(struct snd_usb_audio *chip, int ctrlif,
int ignore_error)
{
static struct snd_device_ops dev_ops = {
.dev_free = snd_usb_mixer_dev_free
Expand All @@ -2029,9 +2030,7 @@ int snd_usb_create_mixer(struct snd_usb_audio *chip, int ctrlif)
return -ENOMEM;
mixer->chip = chip;
mixer->ctrlif = ctrlif;
#ifdef IGNORE_CTL_ERROR
mixer->ignore_ctl_error = 1;
#endif
mixer->ignore_ctl_error = ignore_error;
mixer->id_elems = kcalloc(256, sizeof(*mixer->id_elems), GFP_KERNEL);
if (!mixer->id_elems) {
kfree(mixer);
Expand Down

0 comments on commit c3ce5d3

Please sign in to comment.