Commit 9c712fbc authored by Jaroslav Kysela's avatar Jaroslav Kysela

ALSA CVS update

USB generic driver
remove whitespace at end of lines
Signed-off-by: default avatarClemens Ladisch <clemens@ladisch.de>
parent 07415b53
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* *
* Copyright (c) 2002 by Takashi Iwai <tiwai@suse.de> * Copyright (c) 2002 by Takashi Iwai <tiwai@suse.de>
* *
* Many codes borrowed from audio.c by * Many codes borrowed from audio.c by
* Alan Cox (alan@lxorguk.ukuu.org.uk) * Alan Cox (alan@lxorguk.ukuu.org.uk)
* Thomas Sailer (sailer@ife.ee.ethz.ch) * Thomas Sailer (sailer@ife.ee.ethz.ch)
* *
...@@ -96,7 +96,7 @@ MODULE_PARM_DESC(async_unlink, "Use async unlink mode."); ...@@ -96,7 +96,7 @@ MODULE_PARM_DESC(async_unlink, "Use async unlink mode.");
* *
*/ */
#define MAX_PACKS 10 #define MAX_PACKS 10
#define MAX_PACKS_HS (MAX_PACKS * 8) /* in high speed mode */ #define MAX_PACKS_HS (MAX_PACKS * 8) /* in high speed mode */
#define MAX_URBS 5 /* max. 20ms long packets */ #define MAX_URBS 5 /* max. 20ms long packets */
#define SYNC_URBS 2 /* always two urbs for sync */ #define SYNC_URBS 2 /* always two urbs for sync */
...@@ -344,7 +344,7 @@ static int prepare_capture_urb(snd_usb_substream_t *subs, ...@@ -344,7 +344,7 @@ static int prepare_capture_urb(snd_usb_substream_t *subs,
if (! urb->bandwidth) { if (! urb->bandwidth) {
int bustime; int bustime;
bustime = usb_check_bandwidth(urb->dev, urb); bustime = usb_check_bandwidth(urb->dev, urb);
if (bustime < 0) if (bustime < 0)
return bustime; return bustime;
printk("urb %d: bandwidth = %d (packets = %d)\n", ctx->index, bustime, urb->number_of_packets); printk("urb %d: bandwidth = %d (packets = %d)\n", ctx->index, bustime, urb->number_of_packets);
usb_claim_bandwidth(urb->dev, urb, bustime, 1); usb_claim_bandwidth(urb->dev, urb, bustime, 1);
...@@ -816,7 +816,7 @@ static int start_urbs(snd_usb_substream_t *subs, snd_pcm_runtime_t *runtime) ...@@ -816,7 +816,7 @@ static int start_urbs(snd_usb_substream_t *subs, snd_pcm_runtime_t *runtime)
} }
/* /*
* wait until all urbs are processed. * wait until all urbs are processed.
*/ */
static int wait_clear_urbs(snd_usb_substream_t *subs) static int wait_clear_urbs(snd_usb_substream_t *subs)
...@@ -1138,7 +1138,7 @@ static int init_usb_pitch(struct usb_device *dev, int iface, ...@@ -1138,7 +1138,7 @@ static int init_usb_pitch(struct usb_device *dev, int iface,
if (fmt->attributes & EP_CS_ATTR_PITCH_CONTROL) { if (fmt->attributes & EP_CS_ATTR_PITCH_CONTROL) {
data[0] = 1; data[0] = 1;
if ((err = snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), SET_CUR, if ((err = snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), SET_CUR,
USB_TYPE_CLASS|USB_RECIP_ENDPOINT|USB_DIR_OUT, USB_TYPE_CLASS|USB_RECIP_ENDPOINT|USB_DIR_OUT,
PITCH_CONTROL << 8, ep, data, 1, HZ)) < 0) { PITCH_CONTROL << 8, ep, data, 1, HZ)) < 0) {
snd_printk(KERN_ERR "%d:%d:%d: cannot set enable PITCH\n", snd_printk(KERN_ERR "%d:%d:%d: cannot set enable PITCH\n",
dev->devnum, iface, ep); dev->devnum, iface, ep);
...@@ -1164,7 +1164,7 @@ static int init_usb_sample_rate(struct usb_device *dev, int iface, ...@@ -1164,7 +1164,7 @@ static int init_usb_sample_rate(struct usb_device *dev, int iface,
data[1] = rate >> 8; data[1] = rate >> 8;
data[2] = rate >> 16; data[2] = rate >> 16;
if ((err = snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), SET_CUR, if ((err = snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), SET_CUR,
USB_TYPE_CLASS|USB_RECIP_ENDPOINT|USB_DIR_OUT, USB_TYPE_CLASS|USB_RECIP_ENDPOINT|USB_DIR_OUT,
SAMPLING_FREQ_CONTROL << 8, ep, data, 3, HZ)) < 0) { SAMPLING_FREQ_CONTROL << 8, ep, data, 3, HZ)) < 0) {
snd_printk(KERN_ERR "%d:%d:%d: cannot set freq %d to ep 0x%x\n", snd_printk(KERN_ERR "%d:%d:%d: cannot set freq %d to ep 0x%x\n",
dev->devnum, iface, fmt->altsetting, rate, ep); dev->devnum, iface, fmt->altsetting, rate, ep);
...@@ -1313,7 +1313,7 @@ static int snd_usb_hw_params(snd_pcm_substream_t *substream, ...@@ -1313,7 +1313,7 @@ static int snd_usb_hw_params(snd_pcm_substream_t *substream,
ret = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); ret = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params));
if (ret < 0) if (ret < 0)
return ret; return ret;
format = params_format(hw_params); format = params_format(hw_params);
rate = params_rate(hw_params); rate = params_rate(hw_params);
channels = params_channels(hw_params); channels = params_channels(hw_params);
...@@ -1472,7 +1472,7 @@ static int hw_rule_rate(snd_pcm_hw_params_t *params, ...@@ -1472,7 +1472,7 @@ static int hw_rule_rate(snd_pcm_hw_params_t *params,
snd_interval_t *it = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE); snd_interval_t *it = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE);
unsigned int rmin, rmax; unsigned int rmin, rmax;
int changed; int changed;
hwc_debug("hw_rule_rate: (%d,%d)\n", it->min, it->max); hwc_debug("hw_rule_rate: (%d,%d)\n", it->min, it->max);
changed = 0; changed = 0;
rmin = rmax = 0; rmin = rmax = 0;
...@@ -1526,7 +1526,7 @@ static int hw_rule_channels(snd_pcm_hw_params_t *params, ...@@ -1526,7 +1526,7 @@ static int hw_rule_channels(snd_pcm_hw_params_t *params,
snd_interval_t *it = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS); snd_interval_t *it = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS);
unsigned int rmin, rmax; unsigned int rmin, rmax;
int changed; int changed;
hwc_debug("hw_rule_channels: (%d,%d)\n", it->min, it->max); hwc_debug("hw_rule_channels: (%d,%d)\n", it->min, it->max);
changed = 0; changed = 0;
rmin = rmax = 0; rmin = rmax = 0;
...@@ -1580,7 +1580,7 @@ static int hw_rule_format(snd_pcm_hw_params_t *params, ...@@ -1580,7 +1580,7 @@ static int hw_rule_format(snd_pcm_hw_params_t *params,
u64 fbits; u64 fbits;
u32 oldbits[2]; u32 oldbits[2];
int changed; int changed;
hwc_debug("hw_rule_format: %x:%x\n", fmt->bits[0], fmt->bits[1]); hwc_debug("hw_rule_format: %x:%x\n", fmt->bits[0], fmt->bits[1]);
fbits = 0; fbits = 0;
list_for_each(p, &subs->fmt_list) { list_for_each(p, &subs->fmt_list) {
...@@ -1724,13 +1724,13 @@ static int setup_hw_info(snd_pcm_runtime_t *runtime, snd_usb_substream_t *subs) ...@@ -1724,13 +1724,13 @@ static int setup_hw_info(snd_pcm_runtime_t *runtime, snd_usb_substream_t *subs)
if (check_hw_params_convention(subs)) { if (check_hw_params_convention(subs)) {
hwc_debug("setting extra hw constraints...\n"); hwc_debug("setting extra hw constraints...\n");
if ((err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, if ((err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_RATE,
hw_rule_rate, subs, hw_rule_rate, subs,
SNDRV_PCM_HW_PARAM_FORMAT, SNDRV_PCM_HW_PARAM_FORMAT,
SNDRV_PCM_HW_PARAM_CHANNELS, SNDRV_PCM_HW_PARAM_CHANNELS,
-1)) < 0) -1)) < 0)
return err; return err;
if ((err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS, if ((err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS,
hw_rule_channels, subs, hw_rule_channels, subs,
SNDRV_PCM_HW_PARAM_FORMAT, SNDRV_PCM_HW_PARAM_FORMAT,
SNDRV_PCM_HW_PARAM_RATE, SNDRV_PCM_HW_PARAM_RATE,
...@@ -1992,7 +1992,7 @@ static void proc_dump_substream_status(snd_usb_substream_t *subs, snd_info_buffe ...@@ -1992,7 +1992,7 @@ static void proc_dump_substream_status(snd_usb_substream_t *subs, snd_info_buffe
static void proc_pcm_format_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer) static void proc_pcm_format_read(snd_info_entry_t *entry, snd_info_buffer_t *buffer)
{ {
snd_usb_stream_t *stream = entry->private_data; snd_usb_stream_t *stream = entry->private_data;
snd_iprintf(buffer, "%s : %s\n", stream->chip->card->longname, stream->pcm->name); snd_iprintf(buffer, "%s : %s\n", stream->chip->card->longname, stream->pcm->name);
if (stream->substream[SNDRV_PCM_STREAM_PLAYBACK].num_formats) { if (stream->substream[SNDRV_PCM_STREAM_PLAYBACK].num_formats) {
...@@ -2285,7 +2285,7 @@ static int parse_audio_format_rates(struct usb_device *dev, struct audioformat * ...@@ -2285,7 +2285,7 @@ static int parse_audio_format_rates(struct usb_device *dev, struct audioformat *
{ {
int nr_rates = fmt[offset]; int nr_rates = fmt[offset];
if (fmt[0] < offset + 1 + 3 * (nr_rates ? nr_rates : 2)) { if (fmt[0] < offset + 1 + 3 * (nr_rates ? nr_rates : 2)) {
snd_printk(KERN_ERR "%d:%u:%d : invalid FORMAT_TYPE desc\n", snd_printk(KERN_ERR "%d:%u:%d : invalid FORMAT_TYPE desc\n",
dev->devnum, fp->iface, fp->altsetting); dev->devnum, fp->iface, fp->altsetting);
return -1; return -1;
} }
...@@ -2423,7 +2423,7 @@ static int parse_audio_format(struct usb_device *dev, struct audioformat *fp, ...@@ -2423,7 +2423,7 @@ static int parse_audio_format(struct usb_device *dev, struct audioformat *fp,
} }
#endif #endif
return 0; return 0;
} }
static int parse_audio_endpoints(snd_usb_audio_t *chip, int iface_no) static int parse_audio_endpoints(snd_usb_audio_t *chip, int iface_no)
{ {
...@@ -2469,22 +2469,22 @@ static int parse_audio_endpoints(snd_usb_audio_t *chip, int iface_no) ...@@ -2469,22 +2469,22 @@ static int parse_audio_endpoints(snd_usb_audio_t *chip, int iface_no)
} }
if (fmt[0] < 7) { if (fmt[0] < 7) {
snd_printk(KERN_ERR "%d:%u:%d : invalid AS_GENERAL desc\n", snd_printk(KERN_ERR "%d:%u:%d : invalid AS_GENERAL desc\n",
dev->devnum, iface_no, altno); dev->devnum, iface_no, altno);
continue; continue;
} }
format = (fmt[6] << 8) | fmt[5]; /* remember the format value */ format = (fmt[6] << 8) | fmt[5]; /* remember the format value */
/* get format type */ /* get format type */
fmt = snd_usb_find_csint_desc(alts->extra, alts->extralen, NULL, FORMAT_TYPE); fmt = snd_usb_find_csint_desc(alts->extra, alts->extralen, NULL, FORMAT_TYPE);
if (!fmt) { if (!fmt) {
snd_printk(KERN_ERR "%d:%u:%d : no FORMAT_TYPE desc\n", snd_printk(KERN_ERR "%d:%u:%d : no FORMAT_TYPE desc\n",
dev->devnum, iface_no, altno); dev->devnum, iface_no, altno);
continue; continue;
} }
if (fmt[0] < 8) { if (fmt[0] < 8) {
snd_printk(KERN_ERR "%d:%u:%d : invalid FORMAT_TYPE desc\n", snd_printk(KERN_ERR "%d:%u:%d : invalid FORMAT_TYPE desc\n",
dev->devnum, iface_no, altno); dev->devnum, iface_no, altno);
continue; continue;
} }
...@@ -2494,7 +2494,7 @@ static int parse_audio_endpoints(snd_usb_audio_t *chip, int iface_no) ...@@ -2494,7 +2494,7 @@ static int parse_audio_endpoints(snd_usb_audio_t *chip, int iface_no)
if (!csep && altsd->bNumEndpoints >= 2) if (!csep && altsd->bNumEndpoints >= 2)
csep = snd_usb_find_desc(alts->endpoint[1].extra, alts->endpoint[1].extralen, NULL, USB_DT_CS_ENDPOINT); csep = snd_usb_find_desc(alts->endpoint[1].extra, alts->endpoint[1].extralen, NULL, USB_DT_CS_ENDPOINT);
if (!csep || csep[0] < 7 || csep[2] != EP_GENERAL) { if (!csep || csep[0] < 7 || csep[2] != EP_GENERAL) {
snd_printk(KERN_ERR "%d:%u:%d : no or invalid class specific endpoint descriptor\n", snd_printk(KERN_ERR "%d:%u:%d : no or invalid class specific endpoint descriptor\n",
dev->devnum, iface_no, altno); dev->devnum, iface_no, altno);
continue; continue;
} }
...@@ -2979,7 +2979,7 @@ static int snd_usb_audio_create(struct usb_device *dev, int idx, ...@@ -2979,7 +2979,7 @@ static int snd_usb_audio_create(struct usb_device *dev, int idx,
static snd_device_ops_t ops = { static snd_device_ops_t ops = {
.dev_free = snd_usb_audio_dev_free, .dev_free = snd_usb_audio_dev_free,
}; };
*rchip = NULL; *rchip = NULL;
if (snd_usb_get_speed(dev) != USB_SPEED_FULL && if (snd_usb_get_speed(dev) != USB_SPEED_FULL &&
...@@ -3175,7 +3175,7 @@ static void *snd_usb_audio_probe(struct usb_device *dev, ...@@ -3175,7 +3175,7 @@ static void *snd_usb_audio_probe(struct usb_device *dev,
/* /*
* we need to take care of counter, since disconnection can be called also * we need to take care of counter, since disconnection can be called also
* many times as well as usb_audio_probe(). * many times as well as usb_audio_probe().
*/ */
static void snd_usb_audio_disconnect(struct usb_device *dev, void *ptr) static void snd_usb_audio_disconnect(struct usb_device *dev, void *ptr)
{ {
......
...@@ -124,7 +124,6 @@ ...@@ -124,7 +124,6 @@
typedef struct snd_usb_audio snd_usb_audio_t; typedef struct snd_usb_audio snd_usb_audio_t;
struct snd_usb_audio { struct snd_usb_audio {
int index; int index;
struct usb_device *dev; struct usb_device *dev;
snd_card_t *card; snd_card_t *card;
...@@ -138,15 +137,17 @@ struct snd_usb_audio { ...@@ -138,15 +137,17 @@ struct snd_usb_audio {
int next_midi_device; int next_midi_device;
unsigned int ignore_ctl_error; /* for mixer */ unsigned int ignore_ctl_error; /* for mixer */
}; };
/* /*
* Information about devices with broken descriptors * Information about devices with broken descriptors
*/ */
/* special values for .ifnum */
#define QUIRK_NO_INTERFACE -2 #define QUIRK_NO_INTERFACE -2
#define QUIRK_ANY_INTERFACE -1 #define QUIRK_ANY_INTERFACE -1
/* quirk type */
#define QUIRK_MIDI_FIXED_ENDPOINT 0 #define QUIRK_MIDI_FIXED_ENDPOINT 0
#define QUIRK_MIDI_YAMAHA 1 #define QUIRK_MIDI_YAMAHA 1
#define QUIRK_MIDI_MIDIMAN 2 #define QUIRK_MIDI_MIDIMAN 2
......
...@@ -393,7 +393,7 @@ static void snd_usbmidi_do_output(snd_usb_midi_out_endpoint_t* ep) ...@@ -393,7 +393,7 @@ static void snd_usbmidi_do_output(snd_usb_midi_out_endpoint_t* ep)
int p; int p;
struct urb* urb = ep->urb; struct urb* urb = ep->urb;
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&ep->buffer_lock, flags); spin_lock_irqsave(&ep->buffer_lock, flags);
if (urb->status == -EINPROGRESS || ep->umidi->chip->shutdown) { if (urb->status == -EINPROGRESS || ep->umidi->chip->shutdown) {
spin_unlock_irqrestore(&ep->buffer_lock, flags); spin_unlock_irqrestore(&ep->buffer_lock, flags);
...@@ -418,7 +418,7 @@ static void snd_usbmidi_do_output(snd_usb_midi_out_endpoint_t* ep) ...@@ -418,7 +418,7 @@ static void snd_usbmidi_do_output(snd_usb_midi_out_endpoint_t* ep)
static void snd_usbmidi_out_tasklet(unsigned long data) static void snd_usbmidi_out_tasklet(unsigned long data)
{ {
snd_usb_midi_out_endpoint_t* ep = (snd_usb_midi_out_endpoint_t *) data; snd_usb_midi_out_endpoint_t* ep = (snd_usb_midi_out_endpoint_t *) data;
snd_usbmidi_do_output(ep); snd_usbmidi_do_output(ep);
} }
...@@ -964,7 +964,7 @@ static int snd_usbmidi_get_ms_info(snd_usb_midi_t* umidi, ...@@ -964,7 +964,7 @@ static int snd_usbmidi_get_ms_info(snd_usb_midi_t* umidi,
* If the endpoints aren't specified, use the first bulk endpoints in the * If the endpoints aren't specified, use the first bulk endpoints in the
* first alternate setting of the interface. * first alternate setting of the interface.
*/ */
static int snd_usbmidi_detect_endpoint(snd_usb_midi_t* umidi, static int snd_usbmidi_detect_endpoint(snd_usb_midi_t* umidi,
snd_usb_midi_endpoint_info_t* endpoint) snd_usb_midi_endpoint_info_t* endpoint)
{ {
struct usb_interface* intf; struct usb_interface* intf;
...@@ -998,7 +998,7 @@ static int snd_usbmidi_detect_endpoint(snd_usb_midi_t* umidi, ...@@ -998,7 +998,7 @@ static int snd_usbmidi_detect_endpoint(snd_usb_midi_t* umidi,
/* /*
* Detects the endpoints and ports of Yamaha devices. * Detects the endpoints and ports of Yamaha devices.
*/ */
static int snd_usbmidi_detect_yamaha(snd_usb_midi_t* umidi, static int snd_usbmidi_detect_yamaha(snd_usb_midi_t* umidi,
snd_usb_midi_endpoint_info_t* endpoint) snd_usb_midi_endpoint_info_t* endpoint)
{ {
struct usb_interface* intf; struct usb_interface* intf;
...@@ -1145,7 +1145,7 @@ static int snd_usbmidi_create_rawmidi(snd_usb_midi_t* umidi, ...@@ -1145,7 +1145,7 @@ static int snd_usbmidi_create_rawmidi(snd_usb_midi_t* umidi,
} }
/* /*
* Temporarily stop input. * Temporarily stop input.
*/ */
void snd_usbmidi_input_stop(struct list_head* p) void snd_usbmidi_input_stop(struct list_head* p)
{ {
...@@ -1163,7 +1163,7 @@ void snd_usbmidi_input_stop(struct list_head* p) ...@@ -1163,7 +1163,7 @@ void snd_usbmidi_input_stop(struct list_head* p)
static void snd_usbmidi_input_start_ep(snd_usb_midi_in_endpoint_t* ep) static void snd_usbmidi_input_start_ep(snd_usb_midi_in_endpoint_t* ep)
{ {
if (ep) { if (ep) {
struct urb* urb = ep->urb; struct urb* urb = ep->urb;
urb->dev = ep->umidi->chip->dev; urb->dev = ep->umidi->chip->dev;
snd_usbmidi_submit_urb(urb, GFP_KERNEL); snd_usbmidi_submit_urb(urb, GFP_KERNEL);
} }
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* *
* Copyright (c) 2002 by Takashi Iwai <tiwai@suse.de> * Copyright (c) 2002 by Takashi Iwai <tiwai@suse.de>
* *
* Many codes borrowed from audio.c by * Many codes borrowed from audio.c by
* Alan Cox (alan@lxorguk.ukuu.org.uk) * Alan Cox (alan@lxorguk.ukuu.org.uk)
* Thomas Sailer (sailer@ife.ee.ethz.ch) * Thomas Sailer (sailer@ife.ee.ethz.ch)
* *
...@@ -77,7 +77,7 @@ struct usb_mixer_elem_info { ...@@ -77,7 +77,7 @@ struct usb_mixer_elem_info {
unsigned int ctrlif; unsigned int ctrlif;
unsigned int id; unsigned int id;
unsigned int control; /* CS or ICN (high byte) */ unsigned int control; /* CS or ICN (high byte) */
unsigned int cmask; /* channel mask bitmap: 0 = master */ unsigned int cmask; /* channel mask bitmap: 0 = master */
int channels; int channels;
int val_type; int val_type;
int min, max, res; int min, max, res;
...@@ -299,7 +299,7 @@ static int get_ctl_value(usb_mixer_elem_info_t *cval, int request, int validx, i ...@@ -299,7 +299,7 @@ static int get_ctl_value(usb_mixer_elem_info_t *cval, int request, int validx, i
unsigned char buf[2]; unsigned char buf[2];
int val_len = cval->val_type >= USB_MIXER_S16 ? 2 : 1; int val_len = cval->val_type >= USB_MIXER_S16 ? 2 : 1;
int timeout = 10; int timeout = 10;
while (timeout-- > 0) { while (timeout-- > 0) {
if (snd_usb_ctl_msg(cval->chip->dev, usb_rcvctrlpipe(cval->chip->dev, 0), if (snd_usb_ctl_msg(cval->chip->dev, usb_rcvctrlpipe(cval->chip->dev, 0),
request, request,
...@@ -334,7 +334,7 @@ static int set_ctl_value(usb_mixer_elem_info_t *cval, int request, int validx, i ...@@ -334,7 +334,7 @@ static int set_ctl_value(usb_mixer_elem_info_t *cval, int request, int validx, i
unsigned char buf[2]; unsigned char buf[2];
int val_len = cval->val_type >= USB_MIXER_S16 ? 2 : 1; int val_len = cval->val_type >= USB_MIXER_S16 ? 2 : 1;
int timeout = 10; int timeout = 10;
value_set = convert_bytes_value(cval, value_set); value_set = convert_bytes_value(cval, value_set);
buf[0] = value_set & 0xff; buf[0] = value_set & 0xff;
buf[1] = (value_set >> 8) & 0xff; buf[1] = (value_set >> 8) & 0xff;
...@@ -361,7 +361,7 @@ inline static int set_cur_mix_value(usb_mixer_elem_info_t *cval, int channel, in ...@@ -361,7 +361,7 @@ inline static int set_cur_mix_value(usb_mixer_elem_info_t *cval, int channel, in
/* /*
* parser routines begin here... * parser routines begin here...
*/ */
static int parse_audio_unit(mixer_build_t *state, int unitid); static int parse_audio_unit(mixer_build_t *state, int unitid);
...@@ -443,7 +443,7 @@ static struct iterm_name_combo { ...@@ -443,7 +443,7 @@ static struct iterm_name_combo {
{ 0x0712, "Multi-Track Recorder" }, { 0x0712, "Multi-Track Recorder" },
{ 0x0713, "Synthesizer" }, { 0x0713, "Synthesizer" },
{ 0 }, { 0 },
}; };
static int get_term_name(mixer_build_t *state, usb_audio_term_t *iterm, static int get_term_name(mixer_build_t *state, usb_audio_term_t *iterm,
unsigned char *name, int maxlen, int term_only) unsigned char *name, int maxlen, int term_only)
...@@ -615,7 +615,7 @@ static int get_min_max(usb_mixer_elem_info_t *cval, int default_min) ...@@ -615,7 +615,7 @@ static int get_min_max(usb_mixer_elem_info_t *cval, int default_min)
cval->res = 1; cval->res = 1;
} else { } else {
int last_valid_res = cval->res; int last_valid_res = cval->res;
while (cval->res > 1) { while (cval->res > 1) {
if (set_ctl_value(cval, SET_RES, (cval->control << 8) | minchn, cval->res / 2) < 0) if (set_ctl_value(cval, SET_RES, (cval->control << 8) | minchn, cval->res / 2) < 0)
break; break;
...@@ -634,7 +634,7 @@ static int get_min_max(usb_mixer_elem_info_t *cval, int default_min) ...@@ -634,7 +634,7 @@ static int get_min_max(usb_mixer_elem_info_t *cval, int default_min)
/* get a feature/mixer unit info */ /* get a feature/mixer unit info */
static int mixer_ctl_feature_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) static int mixer_ctl_feature_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
{ {
usb_mixer_elem_info_t *cval = kcontrol->private_data; usb_mixer_elem_info_t *cval = kcontrol->private_data;
if (cval->val_type == USB_MIXER_BOOLEAN || if (cval->val_type == USB_MIXER_BOOLEAN ||
...@@ -914,7 +914,7 @@ static int parse_audio_feature_unit(mixer_build_t *state, int unitid, unsigned c ...@@ -914,7 +914,7 @@ static int parse_audio_feature_unit(mixer_build_t *state, int unitid, unsigned c
if (master_bits & (1 << i)) if (master_bits & (1 << i))
build_feature_ctl(state, ftr, 0, i, &iterm, unitid); build_feature_ctl(state, ftr, 0, i, &iterm, unitid);
} }
return 0; return 0;
} }
...@@ -1243,7 +1243,7 @@ static int parse_audio_extension_unit(mixer_build_t *state, int unitid, unsigned ...@@ -1243,7 +1243,7 @@ static int parse_audio_extension_unit(mixer_build_t *state, int unitid, unsigned
* use an enumerator type for routing * use an enumerator type for routing
*/ */
static int mixer_ctl_selector_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) static int mixer_ctl_selector_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo)
{ {
usb_mixer_elem_info_t *cval = kcontrol->private_data; usb_mixer_elem_info_t *cval = kcontrol->private_data;
char **itemlist = (char **)kcontrol->private_value; char **itemlist = (char **)kcontrol->private_value;
......
...@@ -32,7 +32,7 @@ struct usbmix_ctl_map { ...@@ -32,7 +32,7 @@ struct usbmix_ctl_map {
const struct usbmix_name_map *map; const struct usbmix_name_map *map;
int ignore_ctl_error; int ignore_ctl_error;
}; };
/* /*
* USB control mappers for SB Exitigy * USB control mappers for SB Exitigy
*/ */
......
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