Lines Matching +full:hall +full:- +full:channel
1 // SPDX-License-Identifier: GPL-2.0-or-later
5 * Quirks and vendor-specific extensions for mixer interfaces
50 * See the quirks for M-Audio FTUs or Ebox-44.
70 return -ENOMEM; in snd_create_std_mono_ctl_offset()
72 snd_usb_mixer_elem_init_std(&cval->head, mixer, unitid); in snd_create_std_mono_ctl_offset()
73 cval->val_type = val_type; in snd_create_std_mono_ctl_offset()
74 cval->channels = 1; in snd_create_std_mono_ctl_offset()
75 cval->control = control; in snd_create_std_mono_ctl_offset()
76 cval->cmask = cmask; in snd_create_std_mono_ctl_offset()
77 cval->idx_off = idx_off; in snd_create_std_mono_ctl_offset()
80 * so provide a short-cut for booleans */ in snd_create_std_mono_ctl_offset()
81 cval->min = 0; in snd_create_std_mono_ctl_offset()
82 cval->max = 1; in snd_create_std_mono_ctl_offset()
83 cval->res = 0; in snd_create_std_mono_ctl_offset()
84 cval->dBmin = 0; in snd_create_std_mono_ctl_offset()
85 cval->dBmax = 0; in snd_create_std_mono_ctl_offset()
91 return -ENOMEM; in snd_create_std_mono_ctl_offset()
95 snprintf(kctl->id.name, sizeof(kctl->id.name), name); in snd_create_std_mono_ctl_offset()
96 kctl->private_free = snd_usb_mixer_elem_free; in snd_create_std_mono_ctl_offset()
100 kctl->tlv.c = tlv_callback; in snd_create_std_mono_ctl_offset()
101 kctl->vd[0].access |= in snd_create_std_mono_ctl_offset()
106 return snd_usb_mixer_add_control(&cval->head, kctl); in snd_create_std_mono_ctl_offset()
129 while (t->name != NULL) { in snd_create_std_mono_table()
130 err = snd_create_std_mono_ctl(mixer, t->unitid, t->control, in snd_create_std_mono_table()
131 t->cmask, t->val_type, t->name, t->tlv_callback); in snd_create_std_mono_table()
151 return -ENOMEM; in add_single_ctl_with_resume()
154 list->mixer = mixer; in add_single_ctl_with_resume()
155 list->id = id; in add_single_ctl_with_resume()
156 list->resume = resume; in add_single_ctl_with_resume()
160 return -ENOMEM; in add_single_ctl_with_resume()
162 kctl->private_free = snd_usb_mixer_elem_free; in add_single_ctl_with_resume()
173 * Live! 24-bit: 06 80 xx yy 22 83
186 { USB_ID(0x041e, 0x3040), 2, 2, 6, 6, 2, 0x6e91 }, /* Live! 24-bit */
187 { USB_ID(0x041e, 0x3042), 0, 1, 1, 1, 1, 0x000d }, /* Usb X-Fi S51 */
188 { USB_ID(0x041e, 0x30df), 0, 1, 1, 1, 1, 0x000d }, /* Usb X-Fi S51 Pro */
189 { USB_ID(0x041e, 0x3237), 0, 1, 1, 1, 1, 0x000d }, /* Usb X-Fi S51 Pro */
190 { USB_ID(0x041e, 0x3263), 0, 1, 1, 1, 1, 0x000d }, /* Usb X-Fi S51 Pro */
196 struct usb_mixer_interface *mixer = urb->context; in snd_usb_soundblaster_remote_complete()
197 const struct rc_config *rc = mixer->rc_cfg; in snd_usb_soundblaster_remote_complete()
200 if (urb->status < 0 || urb->actual_length < rc->min_packet_length) in snd_usb_soundblaster_remote_complete()
203 code = mixer->rc_buffer[rc->offset]; in snd_usb_soundblaster_remote_complete()
204 if (rc->length == 2) in snd_usb_soundblaster_remote_complete()
205 code |= mixer->rc_buffer[rc->offset + 1] << 8; in snd_usb_soundblaster_remote_complete()
208 if (code == rc->mute_code) in snd_usb_soundblaster_remote_complete()
209 snd_usb_mixer_notify_id(mixer, rc->mute_mixer_id); in snd_usb_soundblaster_remote_complete()
210 mixer->rc_code = code; in snd_usb_soundblaster_remote_complete()
212 wake_up(&mixer->rc_waitq); in snd_usb_soundblaster_remote_complete()
218 struct usb_mixer_interface *mixer = hw->private_data; in snd_usb_sbrc_hwdep_read()
223 return -EINVAL; in snd_usb_sbrc_hwdep_read()
224 err = wait_event_interruptible(mixer->rc_waitq, in snd_usb_sbrc_hwdep_read()
225 (rc_code = xchg(&mixer->rc_code, 0)) != 0); in snd_usb_sbrc_hwdep_read()
238 struct usb_mixer_interface *mixer = hw->private_data; in snd_usb_sbrc_hwdep_poll()
240 poll_wait(file, &mixer->rc_waitq, wait); in snd_usb_sbrc_hwdep_poll()
241 return mixer->rc_code ? EPOLLIN | EPOLLRDNORM : 0; in snd_usb_sbrc_hwdep_poll()
250 if (rc_configs[i].usb_id == mixer->chip->usb_id) in snd_usb_soundblaster_remote_init()
254 mixer->rc_cfg = &rc_configs[i]; in snd_usb_soundblaster_remote_init()
256 len = mixer->rc_cfg->packet_length; in snd_usb_soundblaster_remote_init()
258 init_waitqueue_head(&mixer->rc_waitq); in snd_usb_soundblaster_remote_init()
259 err = snd_hwdep_new(mixer->chip->card, "SB remote control", 0, &hwdep); in snd_usb_soundblaster_remote_init()
262 snprintf(hwdep->name, sizeof(hwdep->name), in snd_usb_soundblaster_remote_init()
263 "%s remote control", mixer->chip->card->shortname); in snd_usb_soundblaster_remote_init()
264 hwdep->iface = SNDRV_HWDEP_IFACE_SB_RC; in snd_usb_soundblaster_remote_init()
265 hwdep->private_data = mixer; in snd_usb_soundblaster_remote_init()
266 hwdep->ops.read = snd_usb_sbrc_hwdep_read; in snd_usb_soundblaster_remote_init()
267 hwdep->ops.poll = snd_usb_sbrc_hwdep_poll; in snd_usb_soundblaster_remote_init()
268 hwdep->exclusive = 1; in snd_usb_soundblaster_remote_init()
270 mixer->rc_urb = usb_alloc_urb(0, GFP_KERNEL); in snd_usb_soundblaster_remote_init()
271 if (!mixer->rc_urb) in snd_usb_soundblaster_remote_init()
272 return -ENOMEM; in snd_usb_soundblaster_remote_init()
273 mixer->rc_setup_packet = kmalloc(sizeof(*mixer->rc_setup_packet), GFP_KERNEL); in snd_usb_soundblaster_remote_init()
274 if (!mixer->rc_setup_packet) { in snd_usb_soundblaster_remote_init()
275 usb_free_urb(mixer->rc_urb); in snd_usb_soundblaster_remote_init()
276 mixer->rc_urb = NULL; in snd_usb_soundblaster_remote_init()
277 return -ENOMEM; in snd_usb_soundblaster_remote_init()
279 mixer->rc_setup_packet->bRequestType = in snd_usb_soundblaster_remote_init()
281 mixer->rc_setup_packet->bRequest = UAC_GET_MEM; in snd_usb_soundblaster_remote_init()
282 mixer->rc_setup_packet->wValue = cpu_to_le16(0); in snd_usb_soundblaster_remote_init()
283 mixer->rc_setup_packet->wIndex = cpu_to_le16(0); in snd_usb_soundblaster_remote_init()
284 mixer->rc_setup_packet->wLength = cpu_to_le16(len); in snd_usb_soundblaster_remote_init()
285 usb_fill_control_urb(mixer->rc_urb, mixer->chip->dev, in snd_usb_soundblaster_remote_init()
286 usb_rcvctrlpipe(mixer->chip->dev, 0), in snd_usb_soundblaster_remote_init()
287 (u8*)mixer->rc_setup_packet, mixer->rc_buffer, len, in snd_usb_soundblaster_remote_init()
296 ucontrol->value.integer.value[0] = kcontrol->private_value >> 8; in snd_audigy2nx_led_get()
303 struct snd_usb_audio *chip = mixer->chip; in snd_audigy2nx_led_update()
310 if (chip->usb_id == USB_ID(0x041e, 0x3042)) in snd_audigy2nx_led_update()
311 err = snd_usb_ctl_msg(chip->dev, in snd_audigy2nx_led_update()
312 usb_sndctrlpipe(chip->dev, 0), 0x24, in snd_audigy2nx_led_update()
315 /* USB X-Fi S51 Pro */ in snd_audigy2nx_led_update()
316 if (chip->usb_id == USB_ID(0x041e, 0x30df)) in snd_audigy2nx_led_update()
317 err = snd_usb_ctl_msg(chip->dev, in snd_audigy2nx_led_update()
318 usb_sndctrlpipe(chip->dev, 0), 0x24, in snd_audigy2nx_led_update()
322 err = snd_usb_ctl_msg(chip->dev, in snd_audigy2nx_led_update()
323 usb_sndctrlpipe(chip->dev, 0), 0x24, in snd_audigy2nx_led_update()
334 struct usb_mixer_interface *mixer = list->mixer; in snd_audigy2nx_led_put()
335 int index = kcontrol->private_value & 0xff; in snd_audigy2nx_led_put()
336 unsigned int value = ucontrol->value.integer.value[0]; in snd_audigy2nx_led_put()
337 int old_value = kcontrol->private_value >> 8; in snd_audigy2nx_led_put()
341 return -EINVAL; in snd_audigy2nx_led_put()
344 kcontrol->private_value = (value << 8) | index; in snd_audigy2nx_led_put()
351 int priv_value = list->kctl->private_value; in snd_audigy2nx_led_resume()
353 return snd_audigy2nx_led_update(list->mixer, priv_value >> 8, in snd_audigy2nx_led_resume()
378 /* USB X-Fi S51 doesn't have a CMSS LED */ in snd_audigy2nx_controls_create()
379 if ((mixer->chip->usb_id == USB_ID(0x041e, 0x3042)) && i == 0) in snd_audigy2nx_controls_create()
381 /* USB X-Fi S51 Pro doesn't have one either */ in snd_audigy2nx_controls_create()
382 if ((mixer->chip->usb_id == USB_ID(0x041e, 0x30df)) && i == 0) in snd_audigy2nx_controls_create()
385 (mixer->chip->usb_id == USB_ID(0x041e, 0x3040) || in snd_audigy2nx_controls_create()
386 mixer->chip->usb_id == USB_ID(0x041e, 0x3042) || in snd_audigy2nx_controls_create()
387 mixer->chip->usb_id == USB_ID(0x041e, 0x30df) || in snd_audigy2nx_controls_create()
388 mixer->chip->usb_id == USB_ID(0x041e, 0x3048))) in snd_audigy2nx_controls_create()
414 {-1, NULL} in snd_audigy2nx_proc_read()
419 {-1, NULL} in snd_audigy2nx_proc_read()
422 struct usb_mixer_interface *mixer = entry->private_data; in snd_audigy2nx_proc_read()
426 snd_iprintf(buffer, "%s jacks\n\n", mixer->chip->card->shortname); in snd_audigy2nx_proc_read()
427 if (mixer->chip->usb_id == USB_ID(0x041e, 0x3020)) in snd_audigy2nx_proc_read()
429 else if (mixer->chip->usb_id == USB_ID(0x041e, 0x3040) || in snd_audigy2nx_proc_read()
430 mixer->chip->usb_id == USB_ID(0x041e, 0x3048)) in snd_audigy2nx_proc_read()
437 err = snd_usb_lock_shutdown(mixer->chip); in snd_audigy2nx_proc_read()
440 err = snd_usb_ctl_msg(mixer->chip->dev, in snd_audigy2nx_proc_read()
441 usb_rcvctrlpipe(mixer->chip->dev, 0), in snd_audigy2nx_proc_read()
445 snd_usb_unlock_shutdown(mixer->chip); in snd_audigy2nx_proc_read()
465 ucontrol->value.enumerated.item[0] = kcontrol->private_value; in snd_emu0204_ch_switch_get()
472 struct snd_usb_audio *chip = mixer->chip; in snd_emu0204_ch_switch_update()
482 err = snd_usb_ctl_msg(chip->dev, in snd_emu0204_ch_switch_update()
483 usb_sndctrlpipe(chip->dev, 0), UAC_SET_CUR, in snd_emu0204_ch_switch_update()
494 struct usb_mixer_interface *mixer = list->mixer; in snd_emu0204_ch_switch_put()
495 unsigned int value = ucontrol->value.enumerated.item[0]; in snd_emu0204_ch_switch_put()
499 return -EINVAL; in snd_emu0204_ch_switch_put()
501 if (value == kcontrol->private_value) in snd_emu0204_ch_switch_put()
504 kcontrol->private_value = value; in snd_emu0204_ch_switch_put()
511 return snd_emu0204_ch_switch_update(list->mixer, in snd_emu0204_ch_switch_resume()
512 list->kctl->private_value); in snd_emu0204_ch_switch_resume()
536 ucontrol->value.integer.value[0] = !!(kcontrol->private_value & 0x02); in snd_xonar_u1_switch_get()
543 struct snd_usb_audio *chip = mixer->chip; in snd_xonar_u1_switch_update()
549 err = snd_usb_ctl_msg(chip->dev, in snd_xonar_u1_switch_update()
550 usb_sndctrlpipe(chip->dev, 0), 0x08, in snd_xonar_u1_switch_update()
564 old_status = kcontrol->private_value; in snd_xonar_u1_switch_put()
565 if (ucontrol->value.integer.value[0]) in snd_xonar_u1_switch_put()
572 kcontrol->private_value = new_status; in snd_xonar_u1_switch_put()
573 err = snd_xonar_u1_switch_update(list->mixer, new_status); in snd_xonar_u1_switch_put()
579 return snd_xonar_u1_switch_update(list->mixer, in snd_xonar_u1_switch_resume()
580 list->kctl->private_value); in snd_xonar_u1_switch_resume()
608 err = snd_usb_ctl_msg(chip->dev, in snd_mbox1_is_spdif_synced()
609 usb_rcvctrlpipe(chip->dev, 0), 0x81, in snd_mbox1_is_spdif_synced()
623 /* 2 possibilities: Internal -> expects sample rate in snd_mbox1_set_clk_source()
624 * S/PDIF sync -> expects rate = 0 in snd_mbox1_set_clk_source()
633 return snd_usb_ctl_msg(chip->dev, in snd_mbox1_set_clk_source()
634 usb_sndctrlpipe(chip->dev, 0), 0x1, in snd_mbox1_set_clk_source()
641 /* Hardware gives 2 possibilities: ANALOG Source -> 0x01 in snd_mbox1_is_spdif_input()
642 * S/PDIF Source -> 0x02 in snd_mbox1_is_spdif_input()
648 err = snd_usb_ctl_msg(chip->dev, in snd_mbox1_is_spdif_input()
649 usb_rcvctrlpipe(chip->dev, 0), 0x81, in snd_mbox1_is_spdif_input()
662 * Hardware expects 2 possibilities: ANALOG Source -> 0x01 in snd_mbox1_set_input_source()
663 * S/PDIF Source -> 0x02 in snd_mbox1_set_input_source()
670 return snd_usb_ctl_msg(chip->dev, in snd_mbox1_set_input_source()
671 usb_sndctrlpipe(chip->dev, 0), 0x1, in snd_mbox1_set_input_source()
682 struct snd_usb_audio *chip = list->mixer->chip; in snd_mbox1_clk_switch_get()
693 kctl->private_value = err; in snd_mbox1_clk_switch_get()
695 ucontrol->value.enumerated.item[0] = kctl->private_value; in snd_mbox1_clk_switch_get()
703 struct snd_usb_audio *chip = mixer->chip; in snd_mbox1_clk_switch_update()
733 struct usb_mixer_interface *mixer = list->mixer; in snd_mbox1_clk_switch_put()
737 cur_val = kctl->private_value; in snd_mbox1_clk_switch_put()
738 new_val = ucontrol->value.enumerated.item[0]; in snd_mbox1_clk_switch_put()
742 kctl->private_value = new_val; in snd_mbox1_clk_switch_put()
760 return snd_mbox1_clk_switch_update(list->mixer, list->kctl->private_value); in snd_mbox1_clk_switch_resume()
768 ucontrol->value.enumerated.item[0] = kctl->private_value; in snd_mbox1_src_switch_get()
774 struct snd_usb_audio *chip = mixer->chip; in snd_mbox1_src_switch_update()
803 struct usb_mixer_interface *mixer = list->mixer; in snd_mbox1_src_switch_put()
807 cur_val = kctl->private_value; in snd_mbox1_src_switch_put()
808 new_val = ucontrol->value.enumerated.item[0]; in snd_mbox1_src_switch_put()
812 kctl->private_value = new_val; in snd_mbox1_src_switch_put()
830 return snd_mbox1_src_switch_update(list->mixer, list->kctl->private_value); in snd_mbox1_src_switch_resume()
876 struct usb_device *dev = mixer->chip->dev; in snd_ni_control_init_val()
877 unsigned int pval = kctl->private_value; in snd_ni_control_init_val()
886 dev_err(&dev->dev, in snd_ni_control_init_val()
891 kctl->private_value |= ((unsigned int)value << 24); in snd_ni_control_init_val()
898 ucontrol->value.integer.value[0] = kcontrol->private_value >> 24; in snd_nativeinstruments_control_get()
904 struct snd_usb_audio *chip = list->mixer->chip; in snd_ni_update_cur_val()
905 unsigned int pval = list->kctl->private_value; in snd_ni_update_cur_val()
911 err = usb_control_msg(chip->dev, usb_sndctrlpipe(chip->dev, 0), in snd_ni_update_cur_val()
923 u8 oldval = (kcontrol->private_value >> 24) & 0xff; in snd_nativeinstruments_control_put()
924 u8 newval = ucontrol->value.integer.value[0]; in snd_nativeinstruments_control_put()
930 kcontrol->private_value &= ~(0xff << 24); in snd_nativeinstruments_control_put()
931 kcontrol->private_value |= (unsigned int)newval << 24; in snd_nativeinstruments_control_put()
938 .name = "Direct Thru Channel A",
942 .name = "Direct Thru Channel B",
946 .name = "Phono Input Channel A",
950 .name = "Phono Input Channel B",
957 .name = "Direct Thru Channel A",
961 .name = "Direct Thru Channel B",
965 .name = "Direct Thru Channel C",
969 .name = "Direct Thru Channel D",
973 .name = "Phono Input Channel A",
977 .name = "Phono Input Channel B",
981 .name = "Phono Input Channel C",
985 .name = "Phono Input Channel D",
1014 snd_ni_control_init_val(mixer, list->kctl); in snd_nativeinstruments_create_mixer()
1020 /* M-Audio FastTrack Ultra quirks */
1026 "Room 1", "Room 2", "Room 3", "Hall 1", in snd_ftu_eff_switch_info()
1027 "Hall 2", "Plate", "Delay", "Echo" in snd_ftu_eff_switch_info()
1036 struct usb_device *dev = mixer->chip->dev; in snd_ftu_eff_switch_init()
1037 unsigned int pval = kctl->private_value; in snd_ftu_eff_switch_init()
1047 snd_usb_ctrl_intf(mixer->hostif) | ((pval & 0xff) << 8), in snd_ftu_eff_switch_init()
1052 kctl->private_value |= (unsigned int)value[0] << 24; in snd_ftu_eff_switch_init()
1059 ucontrol->value.enumerated.item[0] = kctl->private_value >> 24; in snd_ftu_eff_switch_get()
1065 struct snd_usb_audio *chip = list->mixer->chip; in snd_ftu_eff_switch_update()
1066 unsigned int pval = list->kctl->private_value; in snd_ftu_eff_switch_update()
1076 err = snd_usb_ctl_msg(chip->dev, in snd_ftu_eff_switch_update()
1077 usb_sndctrlpipe(chip->dev, 0), in snd_ftu_eff_switch_update()
1081 snd_usb_ctrl_intf(list->mixer->hostif) | ((pval & 0xff) << 8), in snd_ftu_eff_switch_update()
1091 unsigned int pval = list->kctl->private_value; in snd_ftu_eff_switch_put()
1095 new_val = ucontrol->value.enumerated.item[0]; in snd_ftu_eff_switch_put()
1099 kctl->private_value &= ~(0xff << 24); in snd_ftu_eff_switch_put()
1100 kctl->private_value |= new_val << 24; in snd_ftu_eff_switch_put()
1125 list->kctl->private_value = (validx << 8) | bUnitID; in snd_ftu_create_effect_switch()
1126 snd_ftu_eff_switch_init(mixer, list->kctl); in snd_ftu_create_effect_switch()
1145 "AIn%d - Out%d Capture Volume", in snd_ftu_create_volume_ctls()
1156 "DIn%d - Out%d Playback Volume", in snd_ftu_create_volume_ctls()
1157 in - 7, out + 1); in snd_ftu_create_volume_ctls()
1255 "Effect Send DIn%d Volume", ch - 7); in snd_ftu_create_effect_send_ctls()
1307 list_for_each_entry(mixer, &chip->mixer_list, list) { in snd_emuusb_set_samplerate()
1308 if (mixer->id_elems[unitid]) { in snd_emuusb_set_samplerate()
1309 cval = mixer_elem_list_to_info(mixer->id_elems[unitid]); in snd_emuusb_set_samplerate()
1311 cval->control << 8, in snd_emuusb_set_samplerate()
1319 /* M-Audio Fast Track C400/C600 */
1333 switch (mixer->chip->usb_id) { in snd_c400_create_vol_ctls()
1348 "PCM%d-Out%d Playback Volume", in snd_c400_create_vol_ctls()
1352 "In%d-Out%d Playback Volume", in snd_c400_create_vol_ctls()
1353 chan - num_outs + 1, out + 1); in snd_c400_create_vol_ctls()
1356 cmask = (out == 0) ? 0 : BIT(out - 1); in snd_c400_create_vol_ctls()
1420 switch (mixer->chip->usb_id) { in snd_c400_create_effect_vol_ctls()
1439 chan - num_outs + 1); in snd_c400_create_effect_vol_ctls()
1442 cmask = (chan == 0) ? 0 : BIT(chan - 1); in snd_c400_create_effect_vol_ctls()
1465 switch (mixer->chip->usb_id) { in snd_c400_create_effect_ret_vol_ctls()
1484 BIT(chan + (chan % 2) * num_outs - 1); in snd_c400_create_effect_ret_vol_ctls()
1531 * The mixer units for Ebox-44 are corrupt, and even where they
1608 * AES0: [0 0 0 0 2.3 2.2 2.1 2.0] - default 0x00
1609 * AES1: [3.3 3.2.3.1.3.0 2.7 2.6 2.5 2.4] - default: 0x01
1611 * AES3: [0 0 0 0 0 0 x 0] - 'x' bit is set basing on standard usb request
1623 * 0 - on (0x28 register value)
1624 * 1 - off (0x2a register value)
1630 uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; in snd_microii_spdif_info()
1631 uinfo->count = 1; in snd_microii_spdif_info()
1639 struct snd_usb_audio *chip = list->mixer->chip; in snd_microii_spdif_default_get()
1651 ucontrol->value.iec958.status[0] = kcontrol->private_value & 0xff; in snd_microii_spdif_default_get()
1652 ucontrol->value.iec958.status[1] = (kcontrol->private_value >> 8) & 0xff; in snd_microii_spdif_default_get()
1653 ucontrol->value.iec958.status[2] = 0x00; in snd_microii_spdif_default_get()
1656 iface = usb_ifnum_to_if(chip->dev, 1); in snd_microii_spdif_default_get()
1657 if (!iface || iface->num_altsetting < 2) { in snd_microii_spdif_default_get()
1658 err = -EINVAL; in snd_microii_spdif_default_get()
1661 alts = &iface->altsetting[1]; in snd_microii_spdif_default_get()
1662 if (get_iface_desc(alts)->bNumEndpoints < 1) { in snd_microii_spdif_default_get()
1663 err = -EINVAL; in snd_microii_spdif_default_get()
1666 ep = get_endpoint(alts, 0)->bEndpointAddress; in snd_microii_spdif_default_get()
1668 err = snd_usb_ctl_msg(chip->dev, in snd_microii_spdif_default_get()
1669 usb_rcvctrlpipe(chip->dev, 0), in snd_microii_spdif_default_get()
1680 ucontrol->value.iec958.status[3] = (rate == 48000) ? in snd_microii_spdif_default_get()
1691 struct snd_usb_audio *chip = list->mixer->chip; in snd_microii_spdif_default_update()
1692 unsigned int pval = list->kctl->private_value; in snd_microii_spdif_default_update()
1701 err = snd_usb_ctl_msg(chip->dev, in snd_microii_spdif_default_update()
1702 usb_sndctrlpipe(chip->dev, 0), in snd_microii_spdif_default_update()
1714 err = snd_usb_ctl_msg(chip->dev, in snd_microii_spdif_default_update()
1715 usb_sndctrlpipe(chip->dev, 0), in snd_microii_spdif_default_update()
1737 pval = pval_old = kcontrol->private_value; in snd_microii_spdif_default_put()
1739 pval |= (ucontrol->value.iec958.status[1] & 0x0f) << 8; in snd_microii_spdif_default_put()
1740 pval |= (ucontrol->value.iec958.status[0] & 0x0f); in snd_microii_spdif_default_put()
1743 pval |= (ucontrol->value.iec958.status[1] & 0xf0) << 8; in snd_microii_spdif_default_put()
1752 kcontrol->private_value = pval; in snd_microii_spdif_default_put()
1760 ucontrol->value.iec958.status[0] = 0x0f; in snd_microii_spdif_mask_get()
1761 ucontrol->value.iec958.status[1] = 0xff; in snd_microii_spdif_mask_get()
1762 ucontrol->value.iec958.status[2] = 0x00; in snd_microii_spdif_mask_get()
1763 ucontrol->value.iec958.status[3] = 0x00; in snd_microii_spdif_mask_get()
1771 ucontrol->value.integer.value[0] = !(kcontrol->private_value & 0x02); in snd_microii_spdif_switch_get()
1778 struct snd_usb_audio *chip = list->mixer->chip; in snd_microii_spdif_switch_update()
1779 u8 reg = list->kctl->private_value; in snd_microii_spdif_switch_update()
1786 err = snd_usb_ctl_msg(chip->dev, in snd_microii_spdif_switch_update()
1787 usb_sndctrlpipe(chip->dev, 0), in snd_microii_spdif_switch_update()
1806 reg = ucontrol->value.integer.value[0] ? 0x28 : 0x2a; in snd_microii_spdif_switch_put()
1807 if (reg != list->kctl->private_value) in snd_microii_spdif_switch_put()
1810 kcontrol->private_value = reg; in snd_microii_spdif_switch_put()
1867 ucontrol->value.integer.value[0] = kcontrol->private_value; in snd_soundblaster_e1_switch_get()
1874 struct snd_usb_audio *chip = mixer->chip; in snd_soundblaster_e1_switch_update()
1884 err = snd_usb_ctl_msg(chip->dev, in snd_soundblaster_e1_switch_update()
1885 usb_sndctrlpipe(chip->dev, 0), HID_REQ_SET_REPORT, in snd_soundblaster_e1_switch_update()
1896 unsigned char value = !!ucontrol->value.integer.value[0]; in snd_soundblaster_e1_switch_put()
1899 if (kcontrol->private_value == value) in snd_soundblaster_e1_switch_put()
1901 kcontrol->private_value = value; in snd_soundblaster_e1_switch_put()
1902 err = snd_soundblaster_e1_switch_update(list->mixer, value); in snd_soundblaster_e1_switch_put()
1908 return snd_soundblaster_e1_switch_update(list->mixer, in snd_soundblaster_e1_switch_resume()
1909 list->kctl->private_value); in snd_soundblaster_e1_switch_resume()
1945 * vendor-type USB messages.
1970 struct usb_device *dev = chip->dev; in realtek_hda_set()
1980 struct usb_device *dev = chip->dev; in realtek_hda_get()
2002 struct usb_mixer_elem_info *cval = kcontrol->private_data; in realtek_ctl_connector_get()
2003 struct snd_usb_audio *chip = cval->head.mixer->chip; in realtek_ctl_connector_get()
2004 u32 pv = kcontrol->private_value; in realtek_ctl_connector_get()
2041 ucontrol->value.integer.value[0] = presence; in realtek_ctl_connector_get()
2055 snd_ctl_notify(list->mixer->chip->card, SNDRV_CTL_EVENT_MASK_VALUE, in realtek_resume_jack()
2056 &list->kctl->id); in realtek_resume_jack()
2068 return -ENOMEM; in realtek_add_jack()
2069 snd_usb_mixer_elem_init_std(&cval->head, mixer, in realtek_add_jack()
2071 cval->head.resume = realtek_resume_jack; in realtek_add_jack()
2072 cval->val_type = USB_MIXER_BOOLEAN; in realtek_add_jack()
2073 cval->channels = 1; in realtek_add_jack()
2074 cval->min = 0; in realtek_add_jack()
2075 cval->max = 1; in realtek_add_jack()
2079 return -ENOMEM; in realtek_add_jack()
2081 kctl->private_value = val; in realtek_add_jack()
2082 strscpy(kctl->id.name, name, sizeof(kctl->id.name)); in realtek_add_jack()
2083 kctl->private_free = snd_usb_mixer_elem_free; in realtek_add_jack()
2084 return snd_usb_mixer_add_control(&cval->head, kctl); in realtek_add_jack()
2090 struct usb_device *dev = mixer->chip->dev; in dell_dock_mixer_create()
2093 realtek_hda_set(mixer->chip, in dell_dock_mixer_create()
2121 struct snd_usb_audio *chip = mixer->chip; in dell_dock_init_vol()
2124 snd_usb_ctl_msg(chip->dev, usb_sndctrlpipe(chip->dev, 0), UAC_SET_CUR, in dell_dock_init_vol()
2127 snd_usb_ctrl_intf(mixer->hostif) | (id << 8), in dell_dock_init_vol()
2202 struct usb_device *dev = chip->dev; in snd_rme_read_value()
2211 dev_err(&dev->dev, in snd_rme_read_value()
2221 struct snd_usb_audio *chip = list->mixer->chip; in snd_rme_get_status1()
2243 switch (kcontrol->private_value) { in snd_rme_rate_get()
2260 return -EINVAL; in snd_rme_rate_get()
2262 ucontrol->value.integer.value[0] = rate; in snd_rme_rate_get()
2276 switch (kcontrol->private_value) { in snd_rme_sync_state_get()
2290 return -EINVAL; in snd_rme_sync_state_get()
2292 ucontrol->value.enumerated.item[0] = idx; in snd_rme_sync_state_get()
2305 ucontrol->value.enumerated.item[0] = SND_RME_SPDIF_IF(status1); in snd_rme_spdif_if_get()
2318 ucontrol->value.enumerated.item[0] = SND_RME_SPDIF_FORMAT(status1); in snd_rme_spdif_format_get()
2331 ucontrol->value.enumerated.item[0] = SND_RME_CLK_SYNC(status1); in snd_rme_sync_source_get()
2339 struct snd_usb_audio *chip = list->mixer->chip; in snd_rme_current_freq_get()
2357 ucontrol->value.integer.value[0] = freq; in snd_rme_current_freq_get()
2367 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; in snd_rme_rate_info()
2368 uinfo->count = 1; in snd_rme_rate_info()
2369 switch (kcontrol->private_value) { in snd_rme_rate_info()
2371 uinfo->value.integer.min = 32000; in snd_rme_rate_info()
2372 uinfo->value.integer.max = 800000; in snd_rme_rate_info()
2377 uinfo->value.integer.min = 0; in snd_rme_rate_info()
2378 uinfo->value.integer.max = 200000; in snd_rme_rate_info()
2380 uinfo->value.integer.step = 0; in snd_rme_rate_info()
2521 * Volume control is linear, from -inf (dec. 0) to +6dB (dec. 65536) with
2550 #define SND_BBFPRO_MIXER_VAL_MIN 0 // -inf
2570 struct snd_usb_audio *chip = mixer->chip; in snd_bbfpro_ctl_update()
2591 err = snd_usb_ctl_msg(chip->dev, in snd_bbfpro_ctl_update()
2592 usb_sndctrlpipe(chip->dev, 0), usb_req, in snd_bbfpro_ctl_update()
2606 pv = kcontrol->private_value; in snd_bbfpro_ctl_get()
2609 val = kcontrol->private_value >> SND_BBFPRO_CTL_VAL_SHIFT; in snd_bbfpro_ctl_get()
2616 ucontrol->value.enumerated.item[0] = val; in snd_bbfpro_ctl_get()
2618 ucontrol->value.integer.value[0] = val; in snd_bbfpro_ctl_get()
2629 pv = kcontrol->private_value; in snd_bbfpro_ctl_info()
2644 "-10dBV", in snd_bbfpro_ctl_info()
2650 uinfo->count = 1; in snd_bbfpro_ctl_info()
2651 uinfo->value.integer.min = 0; in snd_bbfpro_ctl_info()
2652 uinfo->value.integer.max = 1; in snd_bbfpro_ctl_info()
2653 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; in snd_bbfpro_ctl_info()
2665 struct usb_mixer_interface *mixer = list->mixer; in snd_bbfpro_ctl_put()
2667 pv = kcontrol->private_value; in snd_bbfpro_ctl_put()
2677 val = ucontrol->value.enumerated.item[0]; in snd_bbfpro_ctl_put()
2679 val = ucontrol->value.integer.value[0]; in snd_bbfpro_ctl_put()
2683 return -EINVAL; in snd_bbfpro_ctl_put()
2688 kcontrol->private_value = reg in snd_bbfpro_ctl_put()
2701 pv = list->kctl->private_value; in snd_bbfpro_ctl_resume()
2706 return snd_bbfpro_ctl_update(list->mixer, reg, idx, value); in snd_bbfpro_ctl_resume()
2710 u8 channel, u8 gain) in snd_bbfpro_gain_update() argument
2713 struct snd_usb_audio *chip = mixer->chip; in snd_bbfpro_gain_update()
2715 if (channel < 2) { in snd_bbfpro_gain_update()
2716 // XLR preamp: 3-bit fine, 5-bit coarse; special case >60 in snd_bbfpro_gain_update()
2727 err = snd_usb_ctl_msg(chip->dev, in snd_bbfpro_gain_update()
2728 usb_sndctrlpipe(chip->dev, 0), in snd_bbfpro_gain_update()
2731 gain, channel, NULL, 0); in snd_bbfpro_gain_update()
2740 int value = kcontrol->private_value & SND_BBFPRO_GAIN_VAL_MASK; in snd_bbfpro_gain_get()
2742 ucontrol->value.integer.value[0] = value; in snd_bbfpro_gain_get()
2749 int pv, channel; in snd_bbfpro_gain_info() local
2751 pv = kcontrol->private_value; in snd_bbfpro_gain_info()
2752 channel = (pv >> SND_BBFPRO_GAIN_CHANNEL_SHIFT) & in snd_bbfpro_gain_info()
2755 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; in snd_bbfpro_gain_info()
2756 uinfo->count = 1; in snd_bbfpro_gain_info()
2757 uinfo->value.integer.min = SND_BBFPRO_GAIN_VAL_MIN; in snd_bbfpro_gain_info()
2759 if (channel < 2) in snd_bbfpro_gain_info()
2760 uinfo->value.integer.max = SND_BBFPRO_GAIN_VAL_MIC_MAX; in snd_bbfpro_gain_info()
2762 uinfo->value.integer.max = SND_BBFPRO_GAIN_VAL_LINE_MAX; in snd_bbfpro_gain_info()
2770 int pv, channel, old_value, value, err; in snd_bbfpro_gain_put() local
2773 struct usb_mixer_interface *mixer = list->mixer; in snd_bbfpro_gain_put()
2775 pv = kcontrol->private_value; in snd_bbfpro_gain_put()
2776 channel = (pv >> SND_BBFPRO_GAIN_CHANNEL_SHIFT) & in snd_bbfpro_gain_put()
2779 value = ucontrol->value.integer.value[0]; in snd_bbfpro_gain_put()
2782 return -EINVAL; in snd_bbfpro_gain_put()
2784 if (channel < 2) { in snd_bbfpro_gain_put()
2786 return -EINVAL; in snd_bbfpro_gain_put()
2789 return -EINVAL; in snd_bbfpro_gain_put()
2795 err = snd_bbfpro_gain_update(mixer, channel, value); in snd_bbfpro_gain_put()
2799 kcontrol->private_value = in snd_bbfpro_gain_put()
2800 (channel << SND_BBFPRO_GAIN_CHANNEL_SHIFT) | value; in snd_bbfpro_gain_put()
2806 int pv, channel, value; in snd_bbfpro_gain_resume() local
2807 struct snd_kcontrol *kctl = list->kctl; in snd_bbfpro_gain_resume()
2809 pv = kctl->private_value; in snd_bbfpro_gain_resume()
2810 channel = (pv >> SND_BBFPRO_GAIN_CHANNEL_SHIFT) & in snd_bbfpro_gain_resume()
2814 return snd_bbfpro_gain_update(list->mixer, channel, value); in snd_bbfpro_gain_resume()
2820 struct snd_usb_audio *chip = mixer->chip; in snd_bbfpro_vol_update()
2836 err = snd_usb_ctl_msg(chip->dev, in snd_bbfpro_vol_update()
2837 usb_sndctrlpipe(chip->dev, 0), in snd_bbfpro_vol_update()
2850 ucontrol->value.integer.value[0] = in snd_bbfpro_vol_get()
2851 kcontrol->private_value >> SND_BBFPRO_MIXER_VAL_SHIFT; in snd_bbfpro_vol_get()
2858 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; in snd_bbfpro_vol_info()
2859 uinfo->count = 1; in snd_bbfpro_vol_info()
2860 uinfo->value.integer.min = SND_BBFPRO_MIXER_VAL_MIN; in snd_bbfpro_vol_info()
2861 uinfo->value.integer.max = SND_BBFPRO_MIXER_VAL_MAX; in snd_bbfpro_vol_info()
2872 struct usb_mixer_interface *mixer = list->mixer; in snd_bbfpro_vol_put()
2874 uvalue = ucontrol->value.integer.value[0]; in snd_bbfpro_vol_put()
2875 idx = kcontrol->private_value & SND_BBFPRO_MIXER_IDX_MASK; in snd_bbfpro_vol_put()
2876 old_value = kcontrol->private_value >> SND_BBFPRO_MIXER_VAL_SHIFT; in snd_bbfpro_vol_put()
2879 return -EINVAL; in snd_bbfpro_vol_put()
2886 kcontrol->private_value = idx in snd_bbfpro_vol_put()
2895 int pv = list->kctl->private_value; in snd_bbfpro_vol_resume()
2899 return snd_bbfpro_vol_update(list->mixer, idx, val); in snd_bbfpro_vol_resume()
2944 static int snd_bbfpro_gain_add(struct usb_mixer_interface *mixer, u8 channel, in snd_bbfpro_gain_add() argument
2950 knew.private_value = channel << SND_BBFPRO_GAIN_CHANNEL_SHIFT; in snd_bbfpro_gain_add()
2985 "%s-%s-%s Playback Volume", in snd_bbfpro_controls_create()
2994 "PCM-%s-%s Playback Volume", in snd_bbfpro_controls_create()
3005 snprintf(name, sizeof(name), "Main-Out %s", output[i]); in snd_bbfpro_controls_create()
3017 snprintf(name, sizeof(name), "Mic-%s Gain", input[i]); in snd_bbfpro_controls_create()
3019 snprintf(name, sizeof(name), "Line-%s Gain", input[i]); in snd_bbfpro_controls_create()
3054 "Mic-AN1 48V"); in snd_bbfpro_controls_create()
3060 "Mic-AN2 48V"); in snd_bbfpro_controls_create()
3066 "Line-IN3 Sens."); in snd_bbfpro_controls_create()
3072 "Line-IN4 Sens."); in snd_bbfpro_controls_create()
3078 "Mic-AN1 PAD"); in snd_bbfpro_controls_create()
3084 "Mic-AN2 PAD"); in snd_bbfpro_controls_create()
3108 /* Reg is overloaded, 0-7 for status halfwords or 16 or 18 for control registers */
3113 #define field_get(_mask, _reg) (((_reg) & (_mask)) >> (ffs(_mask) - 1))
3114 #define field_prep(_mask, _val) (((_val) << (ffs(_mask) - 1)) & (_mask))
3119 struct snd_usb_audio *chip = list->mixer->chip; in snd_rme_digiface_write_reg()
3120 struct usb_device *dev = chip->dev; in snd_rme_digiface_write_reg()
3128 dev_err(&dev->dev, in snd_rme_digiface_write_reg()
3137 struct snd_usb_audio *chip = list->mixer->chip; in snd_rme_digiface_read_status()
3138 struct usb_device *dev = chip->dev; in snd_rme_digiface_read_status()
3148 dev_err(&dev->dev, in snd_rme_digiface_read_status()
3162 bool invert = kcontrol->private_value & RME_DIGIFACE_INVERT; in snd_rme_digiface_get_status_val()
3163 u8 reg = (kcontrol->private_value >> 16) & 0xff; in snd_rme_digiface_get_status_val()
3164 u16 mask = kcontrol->private_value & 0xffff; in snd_rme_digiface_get_status_val()
3182 return -EINVAL; in snd_rme_digiface_get_status_val()
3204 return -EIO; in snd_rme_digiface_rate_get()
3206 ucontrol->value.integer.value[0] = snd_rme_rate_table[freq]; in snd_rme_digiface_rate_get()
3218 ucontrol->value.enumerated.item[0] = val; in snd_rme_digiface_enum_get()
3225 bool invert = kcontrol->private_value & RME_DIGIFACE_INVERT; in snd_rme_digiface_enum_put()
3226 u8 reg = (kcontrol->private_value >> 16) & 0xff; in snd_rme_digiface_enum_put()
3227 u16 mask = kcontrol->private_value & 0xffff; in snd_rme_digiface_enum_put()
3228 u16 val = field_prep(mask, ucontrol->value.enumerated.item[0]); in snd_rme_digiface_enum_put()
3242 if (ucontrol->value.enumerated.item[0] == 7) in snd_rme_digiface_current_sync_get()
3243 ucontrol->value.enumerated.item[0] = 0; in snd_rme_digiface_current_sync_get()
3259 valid = status[0] & BIT(kcontrol->private_value); in snd_rme_digiface_sync_state_get()
3260 sync = status[0] & BIT(5 + kcontrol->private_value); in snd_rme_digiface_sync_state_get()
3263 ucontrol->value.enumerated.item[0] = SND_RME_CLOCK_NOLOCK; in snd_rme_digiface_sync_state_get()
3265 ucontrol->value.enumerated.item[0] = SND_RME_CLOCK_LOCK; in snd_rme_digiface_sync_state_get()
3267 ucontrol->value.enumerated.item[0] = SND_RME_CLOCK_SYNC; in snd_rme_digiface_sync_state_get()
3298 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; in snd_rme_digiface_rate_info()
3299 uinfo->count = 1; in snd_rme_digiface_rate_info()
3300 uinfo->value.integer.min = 0; in snd_rme_digiface_rate_info()
3301 uinfo->value.integer.max = 200000; in snd_rme_digiface_rate_info()
3302 uinfo->value.integer.step = 0; in snd_rme_digiface_rate_info()
3465 * stand-alone operation when the PCM is closed.
3503 * These devices generally have options for soft-switching the playback and
3508 * The wValue is masked with the stereo channel number. e.g. Setting Ch2 to
3539 // kcontrol->private_value layout
3585 case 0x0000: return "-19dB"; in snd_djm_get_label_caplevel()
3586 case 0x0100: return "-15dB"; in snd_djm_get_label_caplevel()
3587 case 0x0200: return "-10dB"; in snd_djm_get_label_caplevel()
3588 case 0x0300: return "-5dB"; in snd_djm_get_label_caplevel()
3615 // The DJM-850 has different values for CD/LINE and LINE capture
3659 // DJM-250MK2
3684 // DJM-450
3709 // DJM-750
3728 // DJM-850
3747 // DJM-900NXS2
3768 // DJM-750MK2
3811 unsigned long private_value = kctl->private_value; in snd_djm_controls_info()
3819 if (ctl_idx >= device->ncontrols) in snd_djm_controls_info()
3820 return -EINVAL; in snd_djm_controls_info()
3822 ctl = &device->controls[ctl_idx]; in snd_djm_controls_info()
3823 noptions = ctl->noptions; in snd_djm_controls_info()
3824 if (info->value.enumerated.item >= noptions) in snd_djm_controls_info()
3825 info->value.enumerated.item = noptions - 1; in snd_djm_controls_info()
3828 ctl->options[info->value.enumerated.item], in snd_djm_controls_info()
3829 ctl->wIndex); in snd_djm_controls_info()
3831 return -EINVAL; in snd_djm_controls_info()
3833 strscpy(info->value.enumerated.name, name, sizeof(info->value.enumerated.name)); in snd_djm_controls_info()
3834 info->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; in snd_djm_controls_info()
3835 info->count = 1; in snd_djm_controls_info()
3836 info->value.enumerated.items = noptions; in snd_djm_controls_info()
3846 if ((group >= device->ncontrols) || value >= device->controls[group].noptions) in snd_djm_controls_update()
3847 return -EINVAL; in snd_djm_controls_update()
3849 err = snd_usb_lock_shutdown(mixer->chip); in snd_djm_controls_update()
3854 mixer->chip->dev, usb_sndctrlpipe(mixer->chip->dev, 0), in snd_djm_controls_update()
3857 device->controls[group].options[value], in snd_djm_controls_update()
3858 device->controls[group].wIndex, in snd_djm_controls_update()
3861 snd_usb_unlock_shutdown(mixer->chip); in snd_djm_controls_update()
3868 elem->value.enumerated.item[0] = kctl->private_value & SND_DJM_VALUE_MASK; in snd_djm_controls_get()
3875 struct usb_mixer_interface *mixer = list->mixer; in snd_djm_controls_put()
3876 unsigned long private_value = kctl->private_value; in snd_djm_controls_put()
3880 u16 value = elem->value.enumerated.item[0]; in snd_djm_controls_put()
3882 kctl->private_value = (((unsigned long)device << SND_DJM_DEVICE_SHIFT) | in snd_djm_controls_put()
3891 unsigned long private_value = list->kctl->private_value; in snd_djm_controls_resume()
3896 return snd_djm_controls_update(list->mixer, device, group, value); in snd_djm_controls_resume()
3916 for (i = 0; i < device->ncontrols; i++) { in snd_djm_controls_create()
3917 value = device->controls[i].default_value; in snd_djm_controls_create()
3918 knew.name = device->controls[i].name; in snd_djm_controls_create()
3942 switch (mixer->chip->usb_id) { in snd_usb_mixer_apply_create_quirk()
3943 /* Tascam US-16x08 */ in snd_usb_mixer_apply_create_quirk()
3955 snd_card_ro_proc_new(mixer->chip->card, "audigy2nx", in snd_usb_mixer_apply_create_quirk()
3964 case USB_ID(0x0763, 0x2030): /* M-Audio Fast Track C400 */ in snd_usb_mixer_apply_create_quirk()
3965 case USB_ID(0x0763, 0x2031): /* M-Audio Fast Track C400 */ in snd_usb_mixer_apply_create_quirk()
3969 case USB_ID(0x0763, 0x2080): /* M-Audio Fast Track Ultra */ in snd_usb_mixer_apply_create_quirk()
3970 case USB_ID(0x0763, 0x2081): /* M-Audio Fast Track Ultra 8R */ in snd_usb_mixer_apply_create_quirk()
4000 case USB_ID(0x200c, 0x1018): /* Electrix Ebox-44 */ in snd_usb_mixer_apply_create_quirk()
4049 case USB_ID(0x2a39, 0x3fd2): /* RME ADI-2 Pro */ in snd_usb_mixer_apply_create_quirk()
4050 case USB_ID(0x2a39, 0x3fd3): /* RME ADI-2 DAC */ in snd_usb_mixer_apply_create_quirk()
4064 case USB_ID(0x2b73, 0x0017): /* Pioneer DJ DJM-250MK2 */ in snd_usb_mixer_apply_create_quirk()
4067 case USB_ID(0x2b73, 0x0013): /* Pioneer DJ DJM-450 */ in snd_usb_mixer_apply_create_quirk()
4070 case USB_ID(0x08e4, 0x017f): /* Pioneer DJ DJM-750 */ in snd_usb_mixer_apply_create_quirk()
4073 case USB_ID(0x2b73, 0x001b): /* Pioneer DJ DJM-750MK2 */ in snd_usb_mixer_apply_create_quirk()
4076 case USB_ID(0x08e4, 0x0163): /* Pioneer DJ DJM-850 */ in snd_usb_mixer_apply_create_quirk()
4079 case USB_ID(0x2b73, 0x000a): /* Pioneer DJ DJM-900NXS2 */ in snd_usb_mixer_apply_create_quirk()
4089 switch (mixer->chip->usb_id) { in snd_usb_mixer_resume_quirk()
4099 if (!mixer->rc_cfg) in snd_usb_mixer_rc_memory_change()
4104 mixer->rc_urb->dev = mixer->chip->dev; in snd_usb_mixer_rc_memory_change()
4105 usb_submit_urb(mixer->rc_urb, GFP_ATOMIC); in snd_usb_mixer_rc_memory_change()
4112 /* live24ext: 4 = line-in jack */ in snd_usb_mixer_rc_memory_change()
4113 case 3: /* hp-out jack (may actuate Mute) */ in snd_usb_mixer_rc_memory_change()
4114 if (mixer->chip->usb_id == USB_ID(0x041e, 0x3040) || in snd_usb_mixer_rc_memory_change()
4115 mixer->chip->usb_id == USB_ID(0x041e, 0x3048)) in snd_usb_mixer_rc_memory_change()
4116 snd_usb_mixer_notify_id(mixer, mixer->rc_cfg->mute_mixer_id); in snd_usb_mixer_rc_memory_change()
4119 usb_audio_dbg(mixer->chip, "memory change in unknown unit %d\n", unitid); in snd_usb_mixer_rc_memory_change()
4131 0, 1, TLV_DB_MINMAX_ITEM(-5300, -4970), in snd_dragonfly_quirk_db_scale()
4132 2, 5, TLV_DB_MINMAX_ITEM(-4710, -4160), in snd_dragonfly_quirk_db_scale()
4133 6, 7, TLV_DB_MINMAX_ITEM(-3884, -3710), in snd_dragonfly_quirk_db_scale()
4134 8, 14, TLV_DB_MINMAX_ITEM(-3443, -2560), in snd_dragonfly_quirk_db_scale()
4135 15, 16, TLV_DB_MINMAX_ITEM(-2475, -2324), in snd_dragonfly_quirk_db_scale()
4136 17, 19, TLV_DB_MINMAX_ITEM(-2228, -2031), in snd_dragonfly_quirk_db_scale()
4137 20, 26, TLV_DB_MINMAX_ITEM(-1910, -1393), in snd_dragonfly_quirk_db_scale()
4138 27, 31, TLV_DB_MINMAX_ITEM(-1322, -1032), in snd_dragonfly_quirk_db_scale()
4139 32, 40, TLV_DB_MINMAX_ITEM(-968, -490), in snd_dragonfly_quirk_db_scale()
4140 41, 50, TLV_DB_MINMAX_ITEM(-441, 0), in snd_dragonfly_quirk_db_scale()
4143 if (cval->min == 0 && cval->max == 50) { in snd_dragonfly_quirk_db_scale()
4144 usb_audio_info(mixer->chip, "applying DragonFly dB scale quirk (0-50 variant)\n"); in snd_dragonfly_quirk_db_scale()
4145 kctl->tlv.p = scale; in snd_dragonfly_quirk_db_scale()
4146 kctl->vd[0].access |= SNDRV_CTL_ELEM_ACCESS_TLV_READ; in snd_dragonfly_quirk_db_scale()
4147 kctl->vd[0].access &= ~SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK; in snd_dragonfly_quirk_db_scale()
4149 } else if (cval->min == 0 && cval->max <= 1000) { in snd_dragonfly_quirk_db_scale()
4153 usb_audio_info(mixer->chip, "ignoring too narrow dB range on a DragonFly device"); in snd_dragonfly_quirk_db_scale()
4154 kctl->vd[0].access &= ~SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK; in snd_dragonfly_quirk_db_scale()
4162 switch (mixer->chip->usb_id) { in snd_usb_mixer_fu_apply_quirk()
4164 if (unitid == 7 && cval->control == UAC_FU_VOLUME) in snd_usb_mixer_fu_apply_quirk()
4168 case USB_ID(0x0d8c, 0x000c): /* C-Media */ in snd_usb_mixer_fu_apply_quirk()
4169 case USB_ID(0x0d8c, 0x0014): /* C-Media */ in snd_usb_mixer_fu_apply_quirk()
4170 case USB_ID(0x19f7, 0x0003): /* RODE NT-USB */ in snd_usb_mixer_fu_apply_quirk()
4171 if (strstr(kctl->id.name, "Playback")) in snd_usb_mixer_fu_apply_quirk()
4172 cval->min_mute = 1; in snd_usb_mixer_fu_apply_quirk()