summaryrefslogtreecommitdiffstats
path: root/sound/usb/card.c
diff options
context:
space:
mode:
authorEldad Zack <eldad@fogrefinery.com>2013-04-03 23:18:56 +0200
committerTakashi Iwai <tiwai@suse.de>2013-04-04 08:31:32 +0200
commitef02e29b0180ddbcc1ecf3c362e333c572f27c08 (patch)
tree2c645903e9fbff3996c5e32cb8993a86d9a6b0b4 /sound/usb/card.c
parent8c55af3f69be6021631628b968cad301d3f294c8 (diff)
downloadop-kernel-dev-ef02e29b0180ddbcc1ecf3c362e333c572f27c08.zip
op-kernel-dev-ef02e29b0180ddbcc1ecf3c362e333c572f27c08.tar.gz
ALSA: usb-audio: UAC2: auto clock selection module param
Add a module param to disable auto clock selection. This is provided for users that expect the audio stream to fail when the clock source is invalid (e.g., the word clock was unintentionally disconnected). Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/card.c')
-rw-r--r--sound/usb/card.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/usb/card.c b/sound/usb/card.c
index 314e8a2..5254b18 100644
--- a/sound/usb/card.c
+++ b/sound/usb/card.c
@@ -82,6 +82,7 @@ static int pid[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = -1 };
static int nrpacks = 8; /* max. number of packets per urb */
static int device_setup[SNDRV_CARDS]; /* device parameter for this card */
static bool ignore_ctl_error;
+static bool autoclock = true;
module_param_array(index, int, NULL, 0444);
MODULE_PARM_DESC(index, "Index value for the USB audio adapter.");
@@ -100,6 +101,8 @@ 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.");
+module_param(autoclock, bool, 0444);
+MODULE_PARM_DESC(autoclock, "Enable auto-clock selection for UAC2 devices (default: yes).");
/*
* we keep the snd_usb_audio_t instances by ourselves for merging
@@ -354,6 +357,7 @@ static int snd_usb_audio_create(struct usb_device *dev, int idx,
chip->card = card;
chip->setup = device_setup[idx];
chip->nrpacks = nrpacks;
+ chip->autoclock = autoclock;
chip->probing = 1;
chip->usb_id = USB_ID(le16_to_cpu(dev->descriptor.idVendor),
OpenPOWER on IntegriCloud