Lines Matching +full:0 +full:x050e
84 cval->min = 0; in snd_create_std_mono_ctl_offset()
86 cval->res = 0; in snd_create_std_mono_ctl_offset()
87 cval->dBmin = 0; in snd_create_std_mono_ctl_offset()
88 cval->dBmax = 0; in snd_create_std_mono_ctl_offset()
104 kctl->vd[0].access |= in snd_create_std_mono_ctl_offset()
121 val_type, 0 /* Offset */, in snd_create_std_mono_ctl()
137 if (err < 0) in snd_create_std_mono_table()
142 return 0; in snd_create_std_mono_table()
189 { USB_ID(0x041e, 0x3000), 0, 1, 2, 1, 18, 0x0013 }, /* Extigy */
190 { USB_ID(0x041e, 0x3020), 2, 1, 6, 6, 18, 0x0013 }, /* Audigy 2 NX */
191 { USB_ID(0x041e, 0x3040), 2, 2, 6, 6, 2, 0x6e91 }, /* Live! 24-bit */
192 { USB_ID(0x041e, 0x3042), 0, 1, 1, 1, 1, 0x000d }, /* Usb X-Fi S51 */
193 { USB_ID(0x041e, 0x30df), 0, 1, 1, 1, 1, 0x000d }, /* Usb X-Fi S51 Pro */
194 { USB_ID(0x041e, 0x3237), 0, 1, 1, 1, 1, 0x000d }, /* Usb X-Fi S51 Pro */
195 { USB_ID(0x041e, 0x3263), 0, 1, 1, 1, 1, 0x000d }, /* Usb X-Fi S51 Pro */
196 { USB_ID(0x041e, 0x3048), 2, 2, 6, 6, 2, 0x6e91 }, /* Toshiba SB0500 */
205 if (urb->status < 0 || urb->actual_length < rc->min_packet_length) in snd_usb_soundblaster_remote_complete()
229 (rc_code = xchg(&mixer->rc_code, 0)) != 0); in snd_usb_sbrc_hwdep_read()
230 if (err == 0) { in snd_usb_sbrc_hwdep_read()
236 return err < 0 ? err : count; in snd_usb_sbrc_hwdep_read()
245 return mixer->rc_code ? EPOLLIN | EPOLLRDNORM : 0; in snd_usb_sbrc_hwdep_poll()
253 for (i = 0; i < ARRAY_SIZE(rc_configs); ++i) in snd_usb_soundblaster_remote_init()
257 return 0; in snd_usb_soundblaster_remote_init()
263 err = snd_hwdep_new(mixer->chip->card, "SB remote control", 0, &hwdep); in snd_usb_soundblaster_remote_init()
264 if (err < 0) in snd_usb_soundblaster_remote_init()
274 mixer->rc_urb = usb_alloc_urb(0, GFP_KERNEL); in snd_usb_soundblaster_remote_init()
286 mixer->rc_setup_packet->wValue = cpu_to_le16(0); in snd_usb_soundblaster_remote_init()
287 mixer->rc_setup_packet->wIndex = cpu_to_le16(0); in snd_usb_soundblaster_remote_init()
290 usb_rcvctrlpipe(mixer->chip->dev, 0), in snd_usb_soundblaster_remote_init()
293 return 0; in snd_usb_soundblaster_remote_init()
300 ucontrol->value.integer.value[0] = kcontrol->private_value >> 8; in snd_audigy2nx_led_get()
301 return 0; in snd_audigy2nx_led_get()
311 if (pm.err < 0) in snd_audigy2nx_led_update()
314 if (chip->usb_id == USB_ID(0x041e, 0x3042)) in snd_audigy2nx_led_update()
316 usb_sndctrlpipe(chip->dev, 0), 0x24, in snd_audigy2nx_led_update()
318 !value, 0, NULL, 0); in snd_audigy2nx_led_update()
320 if (chip->usb_id == USB_ID(0x041e, 0x30df)) in snd_audigy2nx_led_update()
322 usb_sndctrlpipe(chip->dev, 0), 0x24, in snd_audigy2nx_led_update()
324 !value, 0, NULL, 0); in snd_audigy2nx_led_update()
327 usb_sndctrlpipe(chip->dev, 0), 0x24, in snd_audigy2nx_led_update()
329 value, index + 2, NULL, 0); in snd_audigy2nx_led_update()
338 int index = kcontrol->private_value & 0xff; in snd_audigy2nx_led_put()
339 unsigned int value = ucontrol->value.integer.value[0]; in snd_audigy2nx_led_put()
346 return 0; in snd_audigy2nx_led_put()
349 return err < 0 ? err : 1; in snd_audigy2nx_led_put()
357 priv_value & 0xff); in snd_audigy2nx_led_resume()
378 for (i = 0; i < ARRAY_SIZE(snd_audigy2nx_led_names); ++i) { in snd_audigy2nx_controls_create()
382 if (mixer->chip->usb_id == USB_ID(0x041e, 0x3042) && i == 0) in snd_audigy2nx_controls_create()
385 if (mixer->chip->usb_id == USB_ID(0x041e, 0x30df) && i == 0) in snd_audigy2nx_controls_create()
388 (mixer->chip->usb_id == USB_ID(0x041e, 0x3040) || in snd_audigy2nx_controls_create()
389 mixer->chip->usb_id == USB_ID(0x041e, 0x3042) || in snd_audigy2nx_controls_create()
390 mixer->chip->usb_id == USB_ID(0x041e, 0x30df) || in snd_audigy2nx_controls_create()
391 mixer->chip->usb_id == USB_ID(0x041e, 0x3048))) in snd_audigy2nx_controls_create()
397 err = add_single_ctl_with_resume(mixer, 0, in snd_audigy2nx_controls_create()
400 if (err < 0) in snd_audigy2nx_controls_create()
403 return 0; in snd_audigy2nx_controls_create()
421 {0, "RC "}, /* last command, 6 bytes see rc_config above */ in snd_audigy2nx_proc_read()
430 if (mixer->chip->usb_id == USB_ID(0x041e, 0x3020)) in snd_audigy2nx_proc_read()
432 else if (mixer->chip->usb_id == USB_ID(0x041e, 0x3040) || in snd_audigy2nx_proc_read()
433 mixer->chip->usb_id == USB_ID(0x041e, 0x3048)) in snd_audigy2nx_proc_read()
438 for (i = 0; jacks[i].name; ++i) { in snd_audigy2nx_proc_read()
441 if (pm.err < 0) in snd_audigy2nx_proc_read()
444 usb_rcvctrlpipe(mixer->chip->dev, 0), in snd_audigy2nx_proc_read()
446 USB_RECIP_INTERFACE, 0, in snd_audigy2nx_proc_read()
448 if (err == 3 && (buf[0] == 3 || buf[0] == 6)) in snd_audigy2nx_proc_read()
467 ucontrol->value.enumerated.item[0] = kcontrol->private_value; in snd_emu0204_ch_switch_get()
468 return 0; in snd_emu0204_ch_switch_get()
478 if (pm.err < 0) in snd_emu0204_ch_switch_update()
481 buf[0] = 0x01; in snd_emu0204_ch_switch_update()
482 buf[1] = value ? 0x02 : 0x01; in snd_emu0204_ch_switch_update()
484 usb_sndctrlpipe(chip->dev, 0), UAC_SET_CUR, in snd_emu0204_ch_switch_update()
486 0x0400, 0x0e00, buf, 2); in snd_emu0204_ch_switch_update()
494 unsigned int value = ucontrol->value.enumerated.item[0]; in snd_emu0204_ch_switch_put()
501 return 0; in snd_emu0204_ch_switch_put()
505 return err < 0 ? err : 1; in snd_emu0204_ch_switch_put()
520 .private_value = 0,
525 return add_single_ctl_with_resume(mixer, 0, in snd_emu0204_controls_create()
640 return 0; in snd_dualsense_ih_connect()
672 if (status >= 0) { in snd_dualsense_ih_start()
684 ucontrol->value.integer.value[0] = mei->connected; in snd_dualsense_jack_get()
686 return 0; in snd_dualsense_jack_get()
700 return 0; in snd_dualsense_resume_jack()
732 mei->info.min = 0; in snd_dualsense_jack_create()
748 idev_id = &mei->id_table[0]; in snd_dualsense_jack_create()
774 return 0; in snd_dualsense_jack_create()
782 if (err < 0) in snd_dualsense_controls_create()
794 ucontrol->value.integer.value[0] = !!(kcontrol->private_value & 0x02); in snd_xonar_u1_switch_get()
795 return 0; in snd_xonar_u1_switch_get()
804 if (pm.err < 0) in snd_xonar_u1_switch_update()
807 usb_sndctrlpipe(chip->dev, 0), 0x08, in snd_xonar_u1_switch_update()
809 50, 0, &status, 1); in snd_xonar_u1_switch_update()
820 if (ucontrol->value.integer.value[0]) in snd_xonar_u1_switch_put()
821 new_status = old_status | 0x02; in snd_xonar_u1_switch_put()
823 new_status = old_status & ~0x02; in snd_xonar_u1_switch_put()
825 return 0; in snd_xonar_u1_switch_put()
829 return err < 0 ? err : 1; in snd_xonar_u1_switch_put()
844 .private_value = 0x05,
849 return add_single_ctl_with_resume(mixer, 0, in snd_xonar_u1_controls_create()
864 usb_rcvctrlpipe(chip->dev, 0), 0x81, in snd_mbox1_is_spdif_synced()
867 USB_RECIP_ENDPOINT, 0x100, 0x81, buff, 3); in snd_mbox1_is_spdif_synced()
868 if (err < 0) in snd_mbox1_is_spdif_synced()
872 is_spdif_synced = !(buff[0] | buff[1] | buff[2]); in snd_mbox1_is_spdif_synced()
879 * S/PDIF sync -> expects rate = 0 in snd_mbox1_set_clk_source()
883 buff[0] = (rate_or_zero >> 0) & 0xff; in snd_mbox1_set_clk_source()
884 buff[1] = (rate_or_zero >> 8) & 0xff; in snd_mbox1_set_clk_source()
885 buff[2] = (rate_or_zero >> 16) & 0xff; in snd_mbox1_set_clk_source()
889 usb_sndctrlpipe(chip->dev, 0), 0x1, in snd_mbox1_set_clk_source()
891 USB_RECIP_ENDPOINT, 0x100, 0x81, buff, 3); in snd_mbox1_set_clk_source()
896 /* Hardware gives 2 possibilities: ANALOG Source -> 0x01 in snd_mbox1_is_spdif_input()
897 * S/PDIF Source -> 0x02 in snd_mbox1_is_spdif_input()
904 usb_rcvctrlpipe(chip->dev, 0), 0x81, in snd_mbox1_is_spdif_input()
907 USB_RECIP_INTERFACE, 0x00, 0x500, source, 1); in snd_mbox1_is_spdif_input()
908 if (err < 0) in snd_mbox1_is_spdif_input()
911 return (source[0] == 2); in snd_mbox1_is_spdif_input()
917 * Hardware expects 2 possibilities: ANALOG Source -> 0x01 in snd_mbox1_set_input_source()
918 * S/PDIF Source -> 0x02 in snd_mbox1_set_input_source()
922 buff[0] = (is_spdif & 1) + 1; in snd_mbox1_set_input_source()
926 usb_sndctrlpipe(chip->dev, 0), 0x1, in snd_mbox1_set_input_source()
928 USB_RECIP_INTERFACE, 0x00, 0x500, buff, 1); in snd_mbox1_set_input_source()
941 if (pm.err < 0) in snd_mbox1_clk_switch_get()
945 if (err < 0) in snd_mbox1_clk_switch_get()
949 ucontrol->value.enumerated.item[0] = kctl->private_value; in snd_mbox1_clk_switch_get()
950 return 0; in snd_mbox1_clk_switch_get()
959 if (pm.err < 0) in snd_mbox1_clk_switch_update()
963 if (err < 0) in snd_mbox1_clk_switch_update()
967 if (err < 0) in snd_mbox1_clk_switch_update()
971 err = snd_mbox1_set_clk_source(chip, is_spdif_sync ? 0 : 48000); in snd_mbox1_clk_switch_update()
972 if (err < 0) in snd_mbox1_clk_switch_update()
987 new_val = ucontrol->value.enumerated.item[0]; in snd_mbox1_clk_switch_put()
989 return 0; in snd_mbox1_clk_switch_put()
993 return err < 0 ? err : 1; in snd_mbox1_clk_switch_put()
1017 ucontrol->value.enumerated.item[0] = kctl->private_value; in snd_mbox1_src_switch_get()
1018 return 0; in snd_mbox1_src_switch_get()
1027 if (pm.err < 0) in snd_mbox1_src_switch_update()
1031 if (err < 0) in snd_mbox1_src_switch_update()
1035 if (err < 0) in snd_mbox1_src_switch_update()
1039 if (err < 0) in snd_mbox1_src_switch_update()
1054 new_val = ucontrol->value.enumerated.item[0]; in snd_mbox1_src_switch_put()
1056 return 0; in snd_mbox1_src_switch_put()
1060 return err < 0 ? err : 1; in snd_mbox1_src_switch_put()
1082 .index = 0,
1087 .private_value = 0
1098 .private_value = 0
1105 err = add_single_ctl_with_resume(mixer, 0, in snd_mbox1_controls_create()
1108 if (err < 0) in snd_mbox1_controls_create()
1128 err = snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), in snd_ni_control_init_val()
1129 (pval >> 16) & 0xff, in snd_ni_control_init_val()
1131 0, pval & 0xffff, &value, 1); in snd_ni_control_init_val()
1132 if (err < 0) { in snd_ni_control_init_val()
1139 return 0; in snd_ni_control_init_val()
1145 ucontrol->value.integer.value[0] = kcontrol->private_value >> 24; in snd_nativeinstruments_control_get()
1146 return 0; in snd_nativeinstruments_control_get()
1155 if (pm.err < 0) in snd_ni_update_cur_val()
1157 return usb_control_msg(chip->dev, usb_sndctrlpipe(chip->dev, 0), in snd_ni_update_cur_val()
1158 (pval >> 16) & 0xff, in snd_ni_update_cur_val()
1160 pval >> 24, pval & 0xffff, NULL, 0, 1000); in snd_ni_update_cur_val()
1167 u8 oldval = (kcontrol->private_value >> 24) & 0xff; in snd_nativeinstruments_control_put()
1168 u8 newval = ucontrol->value.integer.value[0]; in snd_nativeinstruments_control_put()
1172 return 0; in snd_nativeinstruments_control_put()
1174 kcontrol->private_value &= ~(0xff << 24); in snd_nativeinstruments_control_put()
1177 return err < 0 ? err : 1; in snd_nativeinstruments_control_put()
1183 .private_value = _MAKE_NI_CONTROL(0x01, 0x03),
1187 .private_value = _MAKE_NI_CONTROL(0x01, 0x05),
1191 .private_value = _MAKE_NI_CONTROL(0x02, 0x03),
1195 .private_value = _MAKE_NI_CONTROL(0x02, 0x05),
1202 .private_value = _MAKE_NI_CONTROL(0x01, 0x03),
1206 .private_value = _MAKE_NI_CONTROL(0x01, 0x05),
1210 .private_value = _MAKE_NI_CONTROL(0x01, 0x07),
1214 .private_value = _MAKE_NI_CONTROL(0x01, 0x09),
1218 .private_value = _MAKE_NI_CONTROL(0x02, 0x03),
1222 .private_value = _MAKE_NI_CONTROL(0x02, 0x05),
1226 .private_value = _MAKE_NI_CONTROL(0x02, 0x07),
1230 .private_value = _MAKE_NI_CONTROL(0x02, 0x09),
1238 int i, err = 0; in snd_nativeinstruments_create_mixer()
1247 for (i = 0; i < count; i++) { in snd_nativeinstruments_create_mixer()
1253 err = add_single_ctl_with_resume(mixer, 0, in snd_nativeinstruments_create_mixer()
1256 if (err < 0) in snd_nativeinstruments_create_mixer()
1285 value[0] = 0x00; in snd_ftu_eff_switch_init()
1286 value[1] = 0x00; in snd_ftu_eff_switch_init()
1288 err = snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), UAC_GET_CUR, in snd_ftu_eff_switch_init()
1290 pval & 0xff00, in snd_ftu_eff_switch_init()
1291 snd_usb_ctrl_intf(mixer->hostif) | ((pval & 0xff) << 8), in snd_ftu_eff_switch_init()
1293 if (err < 0) in snd_ftu_eff_switch_init()
1296 kctl->private_value |= (unsigned int)value[0] << 24; in snd_ftu_eff_switch_init()
1297 return 0; in snd_ftu_eff_switch_init()
1303 ucontrol->value.enumerated.item[0] = kctl->private_value >> 24; in snd_ftu_eff_switch_get()
1304 return 0; in snd_ftu_eff_switch_get()
1313 value[0] = pval >> 24; in snd_ftu_eff_switch_update()
1314 value[1] = 0; in snd_ftu_eff_switch_update()
1317 if (pm.err < 0) in snd_ftu_eff_switch_update()
1320 usb_sndctrlpipe(chip->dev, 0), in snd_ftu_eff_switch_update()
1323 pval & 0xff00, in snd_ftu_eff_switch_update()
1324 snd_usb_ctrl_intf(list->mixer->hostif) | ((pval & 0xff) << 8), in snd_ftu_eff_switch_update()
1336 new_val = ucontrol->value.enumerated.item[0]; in snd_ftu_eff_switch_put()
1338 return 0; in snd_ftu_eff_switch_put()
1340 kctl->private_value &= ~(0xff << 24); in snd_ftu_eff_switch_put()
1343 return err < 0 ? err : 1; in snd_ftu_eff_switch_put()
1352 .index = 0, in snd_ftu_create_effect_switch()
1364 if (err < 0) in snd_ftu_create_effect_switch()
1368 return 0; in snd_ftu_create_effect_switch()
1381 for (out = 0; out < 8; out++) { in snd_ftu_create_volume_ctls()
1383 for (in = 0; in < 8; in++) { in snd_ftu_create_volume_ctls()
1391 if (err < 0) in snd_ftu_create_volume_ctls()
1402 if (err < 0) in snd_ftu_create_volume_ctls()
1407 return 0; in snd_ftu_create_volume_ctls()
1417 const unsigned int cmask = 0; in snd_ftu_create_effect_volume_ctl()
1430 const unsigned int cmask = 0; in snd_ftu_create_effect_duration_ctl()
1443 const unsigned int cmask = 0; in snd_ftu_create_effect_feedback_ctl()
1459 for (ch = 0; ch < 4; ++ch) { in snd_ftu_create_effect_return_ctls()
1466 if (err < 0) in snd_ftu_create_effect_return_ctls()
1470 return 0; in snd_ftu_create_effect_return_ctls()
1483 for (ch = 0; ch < 8; ++ch) { in snd_ftu_create_effect_send_ctls()
1490 if (err < 0) in snd_ftu_create_effect_send_ctls()
1500 if (err < 0) in snd_ftu_create_effect_send_ctls()
1503 return 0; in snd_ftu_create_effect_send_ctls()
1511 if (err < 0) in snd_ftu_create_mixer()
1515 if (err < 0) in snd_ftu_create_mixer()
1519 if (err < 0) in snd_ftu_create_mixer()
1523 if (err < 0) in snd_ftu_create_mixer()
1527 if (err < 0) in snd_ftu_create_mixer()
1531 if (err < 0) in snd_ftu_create_mixer()
1535 if (err < 0) in snd_ftu_create_mixer()
1538 return 0; in snd_ftu_create_mixer()
1567 int num_outs = 0; in snd_c400_create_vol_ctls()
1568 int num_ins = 0; in snd_c400_create_vol_ctls()
1570 const unsigned int id = 0x40; in snd_c400_create_vol_ctls()
1575 case USB_ID(0x0763, 0x2030): in snd_c400_create_vol_ctls()
1579 case USB_ID(0x0763, 0x2031): in snd_c400_create_vol_ctls()
1585 for (chan = 0; chan < num_outs + num_ins; chan++) { in snd_c400_create_vol_ctls()
1586 for (out = 0; out < num_outs; out++) { in snd_c400_create_vol_ctls()
1597 cmask = (out == 0) ? 0 : BIT(out - 1); in snd_c400_create_vol_ctls()
1602 if (err < 0) in snd_c400_create_vol_ctls()
1607 return 0; in snd_c400_create_vol_ctls()
1614 const unsigned int id = 0x43; in snd_c400_create_effect_volume_ctl()
1617 const unsigned int cmask = 0; in snd_c400_create_effect_volume_ctl()
1627 const unsigned int id = 0x43; in snd_c400_create_effect_duration_ctl()
1630 const unsigned int cmask = 0; in snd_c400_create_effect_duration_ctl()
1640 const unsigned int id = 0x43; in snd_c400_create_effect_feedback_ctl()
1643 const unsigned int cmask = 0; in snd_c400_create_effect_feedback_ctl()
1654 int num_outs = 0; in snd_c400_create_effect_vol_ctls()
1655 int num_ins = 0; in snd_c400_create_effect_vol_ctls()
1657 const unsigned int id = 0x42; in snd_c400_create_effect_vol_ctls()
1662 case USB_ID(0x0763, 0x2030): in snd_c400_create_effect_vol_ctls()
1666 case USB_ID(0x0763, 0x2031): in snd_c400_create_effect_vol_ctls()
1672 for (chan = 0; chan < num_outs + num_ins; chan++) { in snd_c400_create_effect_vol_ctls()
1683 cmask = (chan == 0) ? 0 : BIT(chan - 1); in snd_c400_create_effect_vol_ctls()
1687 if (err < 0) in snd_c400_create_effect_vol_ctls()
1691 return 0; in snd_c400_create_effect_vol_ctls()
1699 int num_outs = 0; in snd_c400_create_effect_ret_vol_ctls()
1700 int offset = 0; in snd_c400_create_effect_ret_vol_ctls()
1702 const unsigned int id = 0x40; in snd_c400_create_effect_ret_vol_ctls()
1707 case USB_ID(0x0763, 0x2030): in snd_c400_create_effect_ret_vol_ctls()
1709 offset = 0x3c; in snd_c400_create_effect_ret_vol_ctls()
1710 /* { 0x3c, 0x43, 0x3e, 0x45, 0x40, 0x47 } */ in snd_c400_create_effect_ret_vol_ctls()
1712 case USB_ID(0x0763, 0x2031): in snd_c400_create_effect_ret_vol_ctls()
1714 offset = 0x70; in snd_c400_create_effect_ret_vol_ctls()
1715 /* { 0x70, 0x79, 0x72, 0x7b, 0x74, 0x7d, 0x76, 0x7f } */ in snd_c400_create_effect_ret_vol_ctls()
1719 for (chan = 0; chan < num_outs; chan++) { in snd_c400_create_effect_ret_vol_ctls()
1724 cmask = (chan == 0) ? 0 : in snd_c400_create_effect_ret_vol_ctls()
1729 if (err < 0) in snd_c400_create_effect_ret_vol_ctls()
1733 return 0; in snd_c400_create_effect_ret_vol_ctls()
1741 if (err < 0) in snd_c400_create_mixer()
1745 if (err < 0) in snd_c400_create_mixer()
1749 if (err < 0) in snd_c400_create_mixer()
1752 err = snd_ftu_create_effect_switch(mixer, 2, 0x43); in snd_c400_create_mixer()
1753 if (err < 0) in snd_c400_create_mixer()
1757 if (err < 0) in snd_c400_create_mixer()
1761 if (err < 0) in snd_c400_create_mixer()
1765 if (err < 0) in snd_c400_create_mixer()
1768 return 0; in snd_c400_create_mixer()
1780 .cmask = 0x0,
1787 .cmask = 0x1,
1794 .cmask = 0x2,
1802 .cmask = 0x0,
1809 .cmask = 0x1,
1816 .cmask = 0x2,
1824 .cmask = 0x0,
1831 .cmask = 0x1,
1838 .cmask = 0x2,
1849 * AES0: [0 0 0 0 2.3 2.2 2.1 2.0] - default 0x00
1850 * AES1: [3.3 3.2.3.1.3.0 2.7 2.6 2.5 2.4] - default: 0x01
1851 * AES2: [0 0 0 0 0 0 0 0]
1852 * AES3: [0 0 0 0 0 0 x 0] - 'x' bit is set basing on standard usb request
1856 * r2: 0x10
1857 * r3: 0x20 (b7 is zeroed just before playback (except IEC61937) and set
1858 * just after it to 0xa0, presumably it disables/mutes some analog
1860 * r9: 0x28
1864 * 0 - on (0x28 register value)
1865 * 1 - off (0x2a register value)
1873 return 0; in snd_microii_spdif_info()
1889 if (pm.err < 0) in snd_microii_spdif_default_get()
1892 ucontrol->value.iec958.status[0] = kcontrol->private_value & 0xff; in snd_microii_spdif_default_get()
1893 ucontrol->value.iec958.status[1] = (kcontrol->private_value >> 8) & 0xff; in snd_microii_spdif_default_get()
1894 ucontrol->value.iec958.status[2] = 0x00; in snd_microii_spdif_default_get()
1903 ep = get_endpoint(alts, 0)->bEndpointAddress; in snd_microii_spdif_default_get()
1906 usb_rcvctrlpipe(chip->dev, 0), in snd_microii_spdif_default_get()
1913 if (err < 0) in snd_microii_spdif_default_get()
1916 rate = data[0] | (data[1] << 8) | (data[2] << 16); in snd_microii_spdif_default_get()
1920 return 0; in snd_microii_spdif_default_get()
1931 if (pm.err < 0) in snd_microii_spdif_default_update()
1934 reg = ((pval >> 4) & 0xf0) | (pval & 0x0f); in snd_microii_spdif_default_update()
1936 usb_sndctrlpipe(chip->dev, 0), in snd_microii_spdif_default_update()
1942 0); in snd_microii_spdif_default_update()
1943 if (err < 0) in snd_microii_spdif_default_update()
1946 reg = (pval & IEC958_AES0_NONAUDIO) ? 0xa0 : 0x20; in snd_microii_spdif_default_update()
1947 reg |= (pval >> 12) & 0x0f; in snd_microii_spdif_default_update()
1949 usb_sndctrlpipe(chip->dev, 0), in snd_microii_spdif_default_update()
1955 0); in snd_microii_spdif_default_update()
1968 pval &= 0xfffff0f0; in snd_microii_spdif_default_put()
1969 pval |= (ucontrol->value.iec958.status[1] & 0x0f) << 8; in snd_microii_spdif_default_put()
1970 pval |= (ucontrol->value.iec958.status[0] & 0x0f); in snd_microii_spdif_default_put()
1972 pval &= 0xffff0fff; in snd_microii_spdif_default_put()
1973 pval |= (ucontrol->value.iec958.status[1] & 0xf0) << 8; in snd_microii_spdif_default_put()
1980 return 0; in snd_microii_spdif_default_put()
1984 return err < 0 ? err : 1; in snd_microii_spdif_default_put()
1990 ucontrol->value.iec958.status[0] = 0x0f; in snd_microii_spdif_mask_get()
1991 ucontrol->value.iec958.status[1] = 0xff; in snd_microii_spdif_mask_get()
1992 ucontrol->value.iec958.status[2] = 0x00; in snd_microii_spdif_mask_get()
1993 ucontrol->value.iec958.status[3] = 0x00; in snd_microii_spdif_mask_get()
1995 return 0; in snd_microii_spdif_mask_get()
2001 ucontrol->value.integer.value[0] = !(kcontrol->private_value & 0x02); in snd_microii_spdif_switch_get()
2003 return 0; in snd_microii_spdif_switch_get()
2012 if (pm.err < 0) in snd_microii_spdif_switch_update()
2016 usb_sndctrlpipe(chip->dev, 0), in snd_microii_spdif_switch_update()
2022 0); in snd_microii_spdif_switch_update()
2032 reg = ucontrol->value.integer.value[0] ? 0x28 : 0x2a; in snd_microii_spdif_switch_put()
2034 return 0; in snd_microii_spdif_switch_put()
2038 return err < 0 ? err : 1; in snd_microii_spdif_switch_put()
2048 .private_value = 0x00000100UL,/* reset value */
2063 .private_value = 0x00000028UL,/* reset value */
2076 for (i = 0; i < ARRAY_SIZE(snd_microii_mixer_spdif); ++i) { in snd_microii_controls_create()
2077 err = add_single_ctl_with_resume(mixer, 0, in snd_microii_controls_create()
2081 if (err < 0) in snd_microii_controls_create()
2085 return 0; in snd_microii_controls_create()
2093 ucontrol->value.integer.value[0] = kcontrol->private_value; in snd_soundblaster_e1_switch_get()
2094 return 0; in snd_soundblaster_e1_switch_get()
2103 buff[0] = 0x02; in snd_soundblaster_e1_switch_update()
2104 buff[1] = state ? 0x02 : 0x00; in snd_soundblaster_e1_switch_update()
2107 if (pm.err < 0) in snd_soundblaster_e1_switch_update()
2110 usb_sndctrlpipe(chip->dev, 0), HID_REQ_SET_REPORT, in snd_soundblaster_e1_switch_update()
2112 0x0202, 3, buff, 2); in snd_soundblaster_e1_switch_update()
2119 unsigned char value = !!ucontrol->value.integer.value[0]; in snd_soundblaster_e1_switch_put()
2123 return 0; in snd_soundblaster_e1_switch_put()
2126 return err < 0 ? err : 1; in snd_soundblaster_e1_switch_put()
2151 .private_value = 0,
2156 return add_single_ctl_with_resume(mixer, 0, in snd_soundblaster_e1_switch_create()
2173 #define REALTEK_HDA_VALUE 0x0038
2180 #define REALTEK_AUDIO_FUNCTION_GROUP 0x01
2181 #define REALTEK_LINE1 0x1a
2182 #define REALTEK_VENDOR_REGISTERS 0x20
2183 #define REALTEK_HP_OUT 0x21
2185 #define REALTEK_CBJ_CTRL2 0x50
2189 #define REALTEK_MIC_FLAG 0x100
2196 return snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), REALTEK_HDA_SET, in realtek_hda_set()
2198 REALTEK_HDA_VALUE, 0, &buf, sizeof(buf)); in realtek_hda_set()
2207 err = snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), REALTEK_HDA_GET_OUT, in realtek_hda_get()
2209 REALTEK_HDA_VALUE, 0, &buf, sizeof(buf)); in realtek_hda_get()
2210 if (err < 0) in realtek_hda_get()
2212 err = snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), REALTEK_HDA_GET_IN, in realtek_hda_get()
2214 REALTEK_HDA_VALUE, 0, &buf, sizeof(buf)); in realtek_hda_get()
2215 if (err < 0) in realtek_hda_get()
2219 return 0; in realtek_hda_get()
2228 u32 node_id = pv & 0xff; in realtek_ctl_connector_get()
2235 if (pm.err < 0) in realtek_ctl_connector_get()
2238 HDA_VERB_CMD(AC_VERB_GET_PIN_SENSE, node_id, 0), in realtek_ctl_connector_get()
2240 if (err < 0) in realtek_ctl_connector_get()
2247 if (err < 0) in realtek_ctl_connector_get()
2251 REALTEK_VENDOR_REGISTERS, 0), in realtek_ctl_connector_get()
2253 if (err < 0) in realtek_ctl_connector_get()
2259 presence = presence && (cbj_ctrl2 & 0x0070) == 0x0070; in realtek_ctl_connector_get()
2260 ucontrol->value.integer.value[0] = presence; in realtek_ctl_connector_get()
2261 return 0; in realtek_ctl_connector_get()
2276 return 0; in realtek_resume_jack()
2293 cval->min = 0; in realtek_add_jack()
2321 snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), REALTEK_MANUAL_MODE, in dell_dock_mixer_create()
2323 0, 0, NULL, 0); in dell_dock_mixer_create()
2326 if (err < 0) in dell_dock_mixer_create()
2329 if (err < 0) in dell_dock_mixer_create()
2333 if (err < 0) in dell_dock_mixer_create()
2335 return 0; in dell_dock_mixer_create()
2341 u16 buf = 0; in dell_dock_init_vol()
2343 snd_usb_ctl_msg(chip->dev, usb_sndctrlpipe(chip->dev, 0), UAC_SET_CUR, in dell_dock_init_vol()
2352 /* fix to 0dB playback volumes */ in dell_dock_mixer_init()
2357 return 0; in dell_dock_mixer_init()
2365 #define SND_RME_CLK_SYSTEM_MASK 0x1f
2368 #define SND_RME_CLK_AES_SPDIF_MASK 0xf
2370 #define SND_RME_CLK_SYNC_MASK 0x3
2372 #define SND_RME_CLK_FREQMUL_MASK 0x7
2383 #define SND_RME_CLK_AES_LOCK 0x1
2384 #define SND_RME_CLK_AES_SYNC 0x4
2385 #define SND_RME_CLK_SPDIF_LOCK 0x2
2386 #define SND_RME_CLK_SPDIF_SYNC 0x8
2389 #define SND_RME_BINARY_MASK 0x1
2425 err = snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), in snd_rme_read_value()
2428 0, 0, in snd_rme_read_value()
2430 if (err < 0) in snd_rme_read_value()
2444 if (pm.err < 0) in snd_rme_get_status1()
2453 u32 rate = 0; in snd_rme_rate_get()
2458 if (err < 0) in snd_rme_rate_get()
2479 ucontrol->value.integer.value[0] = rate; in snd_rme_rate_get()
2480 return 0; in snd_rme_rate_get()
2491 if (err < 0) in snd_rme_sync_state_get()
2509 ucontrol->value.enumerated.item[0] = idx; in snd_rme_sync_state_get()
2510 return 0; in snd_rme_sync_state_get()
2520 if (err < 0) in snd_rme_spdif_if_get()
2522 ucontrol->value.enumerated.item[0] = SND_RME_SPDIF_IF(status1); in snd_rme_spdif_if_get()
2523 return 0; in snd_rme_spdif_if_get()
2533 if (err < 0) in snd_rme_spdif_format_get()
2535 ucontrol->value.enumerated.item[0] = SND_RME_SPDIF_FORMAT(status1); in snd_rme_spdif_format_get()
2536 return 0; in snd_rme_spdif_format_get()
2546 if (err < 0) in snd_rme_sync_source_get()
2548 ucontrol->value.enumerated.item[0] = SND_RME_CLK_SYNC(status1); in snd_rme_sync_source_get()
2549 return 0; in snd_rme_sync_source_get()
2564 if (pm.err < 0) in snd_rme_current_freq_get()
2567 if (err < 0) in snd_rme_current_freq_get()
2570 if (err < 0) in snd_rme_current_freq_get()
2572 freq = (den == 0) ? 0 : div64_u64(num, den); in snd_rme_current_freq_get()
2574 ucontrol->value.integer.value[0] = freq; in snd_rme_current_freq_get()
2575 return 0; in snd_rme_current_freq_get()
2591 uinfo->value.integer.min = 0; in snd_rme_rate_info()
2594 uinfo->value.integer.step = 0; in snd_rme_rate_info()
2595 return 0; in snd_rme_rate_info()
2717 for (i = 0; i < ARRAY_SIZE(snd_rme_controls); ++i) { in snd_rme_controls_create()
2718 err = add_single_ctl_with_resume(mixer, 0, in snd_rme_controls_create()
2722 if (err < 0) in snd_rme_controls_create()
2726 return 0; in snd_rme_controls_create()
2735 * Volume control is linear, from -inf (dec. 0) to +6dB (dec. 65536) with
2736 * 0dB being at dec. 32768.
2739 SND_BBFPRO_CTL_REG1 = 0,
2744 #define SND_BBFPRO_CTL_IDX_MASK 0xff
2748 #define SND_BBFPRO_CTL_REG1_CLK_MASTER 0
2753 #define SND_BBFPRO_CTL_REG2_48V_AN1 0
2761 #define SND_BBFPRO_MIXER_IDX_MASK 0x3ff
2762 #define SND_BBFPRO_MIXER_VAL_MASK 0x3ffff
2764 #define SND_BBFPRO_MIXER_VAL_MIN 0 // -inf
2767 #define SND_BBFPRO_GAIN_CHANNEL_MASK 0x03
2769 #define SND_BBFPRO_GAIN_VAL_MASK 0x7f
2770 #define SND_BBFPRO_GAIN_VAL_MIN 0
2774 #define SND_BBFPRO_USBREQ_CTL_REG1 0x10
2775 #define SND_BBFPRO_USBREQ_CTL_REG2 0x17
2776 #define SND_BBFPRO_USBREQ_GAIN 0x1a
2777 #define SND_BBFPRO_USBREQ_MIXER 0x12
2786 if (pm.err < 0) in snd_bbfpro_ctl_update()
2793 usb_val = value ? 3 : 0; in snd_bbfpro_ctl_update()
2796 usb_val = value ? usb_idx : 0; in snd_bbfpro_ctl_update()
2801 usb_val = value ? usb_idx : 0; in snd_bbfpro_ctl_update()
2805 usb_sndctrlpipe(chip->dev, 0), usb_req, in snd_bbfpro_ctl_update()
2807 usb_val, usb_idx, NULL, 0); in snd_bbfpro_ctl_update()
2826 ucontrol->value.enumerated.item[0] = val; in snd_bbfpro_ctl_get()
2828 ucontrol->value.integer.value[0] = val; in snd_bbfpro_ctl_get()
2830 return 0; in snd_bbfpro_ctl_get()
2861 uinfo->value.integer.min = 0; in snd_bbfpro_ctl_info()
2864 return 0; in snd_bbfpro_ctl_info()
2887 val = ucontrol->value.enumerated.item[0]; in snd_bbfpro_ctl_put()
2889 val = ucontrol->value.integer.value[0]; in snd_bbfpro_ctl_put()
2896 return 0; in snd_bbfpro_ctl_put()
2903 return err < 0 ? err : 1; in snd_bbfpro_ctl_put()
2933 if (pm.err < 0) in snd_bbfpro_gain_update()
2937 usb_sndctrlpipe(chip->dev, 0), in snd_bbfpro_gain_update()
2940 gain, channel, NULL, 0); in snd_bbfpro_gain_update()
2948 ucontrol->value.integer.value[0] = value; in snd_bbfpro_gain_get()
2949 return 0; in snd_bbfpro_gain_get()
2970 return 0; in snd_bbfpro_gain_info()
2985 value = ucontrol->value.integer.value[0]; in snd_bbfpro_gain_put()
2999 return 0; in snd_bbfpro_gain_put()
3002 if (err < 0) in snd_bbfpro_gain_put()
3032 if (pm.err < 0) in snd_bbfpro_vol_update()
3038 usb_idx = idx | (v & 0x3) << 14; in snd_bbfpro_vol_update()
3039 usb_val = (v >> 2) & 0xffff; in snd_bbfpro_vol_update()
3042 usb_sndctrlpipe(chip->dev, 0), in snd_bbfpro_vol_update()
3046 usb_val, usb_idx, NULL, 0); in snd_bbfpro_vol_update()
3052 ucontrol->value.integer.value[0] = in snd_bbfpro_vol_get()
3054 return 0; in snd_bbfpro_vol_get()
3064 return 0; in snd_bbfpro_vol_info()
3076 uvalue = ucontrol->value.integer.value[0]; in snd_bbfpro_vol_put()
3084 return 0; in snd_bbfpro_vol_put()
3092 return err < 0 ? err : 1; in snd_bbfpro_vol_put()
3108 .index = 0,
3117 .index = 0,
3126 .index = 0,
3142 return add_single_ctl_with_resume(mixer, 0, snd_bbfpro_ctl_resume, in snd_bbfpro_ctl_add()
3154 return add_single_ctl_with_resume(mixer, 0, snd_bbfpro_gain_resume, in snd_bbfpro_gain_add()
3166 return add_single_ctl_with_resume(mixer, 0, snd_bbfpro_vol_resume, in snd_bbfpro_vol_add()
3183 for (o = 0 ; o < 12 ; ++o) { in snd_bbfpro_controls_create()
3184 for (i = 0 ; i < 12 ; ++i) { in snd_bbfpro_controls_create()
3191 if (err < 0) in snd_bbfpro_controls_create()
3200 if (err < 0) in snd_bbfpro_controls_create()
3206 for (i = 0 ; i < 12 ; ++i) { in snd_bbfpro_controls_create()
3212 if (err < 0) in snd_bbfpro_controls_create()
3217 for (i = 0 ; i < 4 ; ++i) { in snd_bbfpro_controls_create()
3224 if (err < 0) in snd_bbfpro_controls_create()
3232 if (err < 0) in snd_bbfpro_controls_create()
3238 if (err < 0) in snd_bbfpro_controls_create()
3244 if (err < 0) in snd_bbfpro_controls_create()
3250 if (err < 0) in snd_bbfpro_controls_create()
3257 if (err < 0) in snd_bbfpro_controls_create()
3263 if (err < 0) in snd_bbfpro_controls_create()
3269 if (err < 0) in snd_bbfpro_controls_create()
3275 if (err < 0) in snd_bbfpro_controls_create()
3281 if (err < 0) in snd_bbfpro_controls_create()
3287 if (err < 0) in snd_bbfpro_controls_create()
3290 return 0; in snd_bbfpro_controls_create()
3298 #define RME_DIGIFACE_STATUS_REG0L 0
3310 /* Reg is overloaded, 0-7 for status halfwords or 16 or 18 for control registers */
3325 err = snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), in snd_rme_digiface_write_reg()
3328 val, mask, NULL, 0); in snd_rme_digiface_write_reg()
3329 if (err < 0) in snd_rme_digiface_write_reg()
3344 err = snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), in snd_rme_digiface_read_status()
3347 0, 0, in snd_rme_digiface_read_status()
3349 if (err < 0) { in snd_rme_digiface_read_status()
3354 for (int i = 0; i < ARRAY_SIZE(buf); i++) in snd_rme_digiface_read_status()
3365 u8 reg = (kcontrol->private_value >> 16) & 0xff; in snd_rme_digiface_get_status_val()
3366 u16 mask = kcontrol->private_value & 0xffff; in snd_rme_digiface_get_status_val()
3370 if (err < 0) in snd_rme_digiface_get_status_val()
3390 val = status[reg >> 1] & 0xffff; in snd_rme_digiface_get_status_val()
3403 if (freq < 0) in snd_rme_digiface_rate_get()
3408 ucontrol->value.integer.value[0] = snd_rme_rate_table[freq]; in snd_rme_digiface_rate_get()
3409 return 0; in snd_rme_digiface_rate_get()
3417 if (val < 0) in snd_rme_digiface_enum_get()
3420 ucontrol->value.enumerated.item[0] = val; in snd_rme_digiface_enum_get()
3421 return 0; in snd_rme_digiface_enum_get()
3428 u8 reg = (kcontrol->private_value >> 16) & 0xff; in snd_rme_digiface_enum_put()
3429 u16 mask = kcontrol->private_value & 0xffff; in snd_rme_digiface_enum_put()
3430 u16 val = field_prep(mask, ucontrol->value.enumerated.item[0]); in snd_rme_digiface_enum_put()
3444 if (ucontrol->value.enumerated.item[0] == 7) in snd_rme_digiface_current_sync_get()
3445 ucontrol->value.enumerated.item[0] = 0; in snd_rme_digiface_current_sync_get()
3458 if (err < 0) in snd_rme_digiface_sync_state_get()
3461 valid = status[0] & BIT(kcontrol->private_value); in snd_rme_digiface_sync_state_get()
3462 sync = status[0] & BIT(5 + kcontrol->private_value); in snd_rme_digiface_sync_state_get()
3465 ucontrol->value.enumerated.item[0] = SND_RME_CLOCK_NOLOCK; in snd_rme_digiface_sync_state_get()
3467 ucontrol->value.enumerated.item[0] = SND_RME_CLOCK_LOCK; in snd_rme_digiface_sync_state_get()
3469 ucontrol->value.enumerated.item[0] = SND_RME_CLOCK_SYNC; in snd_rme_digiface_sync_state_get()
3470 return 0; in snd_rme_digiface_sync_state_get()
3500 uinfo->value.integer.min = 0; in snd_rme_digiface_rate_info()
3502 uinfo->value.integer.step = 0; in snd_rme_digiface_rate_info()
3503 return 0; in snd_rme_digiface_rate_info()
3513 .private_value = 0,
3521 .private_value = RME_DIGIFACE_REGISTER(RME_DIGIFACE_STATUS_REG0H, BIT(0)) |
3530 .private_value = RME_DIGIFACE_REGISTER(RME_DIGIFACE_STATUS_REG1L, GENMASK(3, 0)),
3605 .private_value = RME_DIGIFACE_REGISTER(RME_DIGIFACE_STATUS_REG1L, GENMASK(3, 0)),
3614 .private_value = RME_DIGIFACE_REGISTER(RME_DIGIFACE_CTL_REG2, BIT(0)),
3650 .private_value = RME_DIGIFACE_REGISTER(RME_DIGIFACE_CTL_REG1, GENMASK(2, 0)),
3688 for (i = 0; i < ARRAY_SIZE(snd_rme_digiface_controls); ++i) { in snd_rme_digiface_controls_create()
3689 err = add_single_ctl_with_resume(mixer, 0, in snd_rme_digiface_controls_create()
3693 if (err < 0) in snd_rme_digiface_controls_create()
3697 return 0; in snd_rme_digiface_controls_create()
3709 * capture phono would be 0x0203. Capture, playback and capture level have
3714 #define SND_DJM_CAP_LINE 0x00
3715 #define SND_DJM_CAP_CDLINE 0x01
3716 #define SND_DJM_CAP_DIGITAL 0x02
3717 #define SND_DJM_CAP_PHONO 0x03
3718 #define SND_DJM_CAP_PREFADER 0x05
3719 #define SND_DJM_CAP_PFADER 0x06
3720 #define SND_DJM_CAP_XFADERA 0x07
3721 #define SND_DJM_CAP_XFADERB 0x08
3722 #define SND_DJM_CAP_MIC 0x09
3723 #define SND_DJM_CAP_AUX 0x0d
3724 #define SND_DJM_CAP_RECOUT 0x0a
3725 #define SND_DJM_CAP_RECOUT_NOMIC 0x0e
3726 #define SND_DJM_CAP_NONE 0x0f
3727 #define SND_DJM_CAP_FXSEND 0x10
3728 #define SND_DJM_CAP_CH1PFADER 0x11
3729 #define SND_DJM_CAP_CH2PFADER 0x12
3730 #define SND_DJM_CAP_CH3PFADER 0x13
3731 #define SND_DJM_CAP_CH4PFADER 0x14
3732 #define SND_DJM_CAP_EXT1SEND 0x21
3733 #define SND_DJM_CAP_EXT2SEND 0x22
3734 #define SND_DJM_CAP_CH1PREFADER 0x31
3735 #define SND_DJM_CAP_CH2PREFADER 0x32
3736 #define SND_DJM_CAP_CH3PREFADER 0x33
3737 #define SND_DJM_CAP_CH4PREFADER 0x34
3740 #define SND_DJM_PB_CH1 0x00
3741 #define SND_DJM_PB_CH2 0x01
3742 #define SND_DJM_PB_AUX 0x04
3744 #define SND_DJM_WINDEX_CAP 0x8002
3745 #define SND_DJM_WINDEX_CAPLVL 0x8003
3746 #define SND_DJM_WINDEX_PB 0x8016
3749 #define SND_DJM_VALUE_MASK 0x0000ffff
3750 #define SND_DJM_GROUP_MASK 0x00ff0000
3751 #define SND_DJM_DEVICE_MASK 0xff000000
3757 #define SND_DJM_250MK2_IDX 0x0
3758 #define SND_DJM_750_IDX 0x1
3759 #define SND_DJM_850_IDX 0x2
3760 #define SND_DJM_900NXS2_IDX 0x3
3761 #define SND_DJM_750MK2_IDX 0x4
3762 #define SND_DJM_450_IDX 0x5
3763 #define SND_DJM_A9_IDX 0x6
3764 #define SND_DJM_V10_IDX 0x7
3794 case 0x0000: return "-19dB"; in snd_djm_get_label_caplevel_common()
3795 case 0x0100: return "-15dB"; in snd_djm_get_label_caplevel_common()
3796 case 0x0200: return "-10dB"; in snd_djm_get_label_caplevel_common()
3797 case 0x0300: return "-5dB"; in snd_djm_get_label_caplevel_common()
3806 case 0x0000: return "+15dB"; in snd_djm_get_label_caplevel_high()
3807 case 0x0100: return "+12dB"; in snd_djm_get_label_caplevel_high()
3808 case 0x0200: return "+9dB"; in snd_djm_get_label_caplevel_high()
3809 case 0x0300: return "+6dB"; in snd_djm_get_label_caplevel_high()
3810 case 0x0400: return "+3dB"; in snd_djm_get_label_caplevel_high()
3811 case 0x0500: return "0dB"; in snd_djm_get_label_caplevel_high()
3818 switch (wvalue & 0x00ff) { in snd_djm_get_label_cap_common()
3850 switch (wvalue & 0x00ff) { in snd_djm_get_label_cap_850()
3851 case 0x00: return "Control Tone CD/LINE"; in snd_djm_get_label_cap_850()
3852 case 0x01: return "Control Tone LINE"; in snd_djm_get_label_cap_850()
3876 switch (wvalue & 0x00ff) { in snd_djm_get_label_pb()
3896 0x0000, 0x0100, 0x0200, 0x0300 };
3900 0x0103, 0x0100, 0x0106, 0x0107, 0x0108, 0x0109, 0x010d, 0x010a };
3903 0x0203, 0x0200, 0x0206, 0x0207, 0x0208, 0x0209, 0x020d, 0x020a };
3906 0x030a, 0x0311, 0x0312, 0x0307, 0x0308, 0x0309, 0x030d };
3908 static const u16 snd_djm_opts_250mk2_pb1[] = { 0x0100, 0x0101, 0x0104 };
3909 static const u16 snd_djm_opts_250mk2_pb2[] = { 0x0200, 0x0201, 0x0204 };
3910 static const u16 snd_djm_opts_250mk2_pb3[] = { 0x0300, 0x0301, 0x0304 };
3913 SND_DJM_CTL("Master Input Level Capture Switch", cap_level, 0, SND_DJM_WINDEX_CAPLVL),
3916 SND_DJM_CTL("Input 3 Capture Switch", 250mk2_cap3, 0, SND_DJM_WINDEX_CAP),
3917 SND_DJM_CTL("Output 1 Playback Switch", 250mk2_pb1, 0, SND_DJM_WINDEX_PB),
3924 0x0103, 0x0100, 0x0106, 0x0107, 0x0108, 0x0109, 0x010d, 0x010a };
3927 0x0203, 0x0200, 0x0206, 0x0207, 0x0208, 0x0209, 0x020d, 0x020a };
3930 0x030a, 0x0311, 0x0312, 0x0307, 0x0308, 0x0309, 0x030d };
3932 static const u16 snd_djm_opts_450_pb1[] = { 0x0100, 0x0101, 0x0104 };
3933 static const u16 snd_djm_opts_450_pb2[] = { 0x0200, 0x0201, 0x0204 };
3934 static const u16 snd_djm_opts_450_pb3[] = { 0x0300, 0x0301, 0x0304 };
3937 SND_DJM_CTL("Master Input Level Capture Switch", cap_level, 0, SND_DJM_WINDEX_CAPLVL),
3940 SND_DJM_CTL("Input 3 Capture Switch", 450_cap3, 0, SND_DJM_WINDEX_CAP),
3941 SND_DJM_CTL("Output 1 Playback Switch", 450_pb1, 0, SND_DJM_WINDEX_PB),
3948 0x0101, 0x0103, 0x0106, 0x0107, 0x0108, 0x0109, 0x010a, 0x010f };
3950 0x0200, 0x0201, 0x0206, 0x0207, 0x0208, 0x0209, 0x020a, 0x020f };
3952 0x0300, 0x0301, 0x0306, 0x0307, 0x0308, 0x0309, 0x030a, 0x030f };
3954 0x0401, 0x0403, 0x0406, 0x0407, 0x0408, 0x0409, 0x040a, 0x040f };
3957 SND_DJM_CTL("Master Input Level Capture Switch", cap_level, 0, SND_DJM_WINDEX_CAPLVL),
3960 SND_DJM_CTL("Input 3 Capture Switch", 750_cap3, 0, SND_DJM_WINDEX_CAP),
3961 SND_DJM_CTL("Input 4 Capture Switch", 750_cap4, 0, SND_DJM_WINDEX_CAP)
3966 0x0100, 0x0103, 0x0106, 0x0107, 0x0108, 0x0109, 0x010a, 0x010f };
3968 0x0200, 0x0201, 0x0206, 0x0207, 0x0208, 0x0209, 0x020a, 0x020f };
3970 0x0300, 0x0301, 0x0306, 0x0307, 0x0308, 0x0309, 0x030a, 0x030f };
3972 0x0400, 0x0403, 0x0406, 0x0407, 0x0408, 0x0409, 0x040a, 0x040f };
3975 SND_DJM_CTL("Master Input Level Capture Switch", cap_level, 0, SND_DJM_WINDEX_CAPLVL),
3977 SND_DJM_CTL("Input 2 Capture Switch", 850_cap2, 0, SND_DJM_WINDEX_CAP),
3978 SND_DJM_CTL("Input 3 Capture Switch", 850_cap3, 0, SND_DJM_WINDEX_CAP),
3984 0x0100, 0x0102, 0x0103, 0x0106, 0x0107, 0x0108, 0x0109, 0x010a };
3986 0x0200, 0x0202, 0x0203, 0x0206, 0x0207, 0x0208, 0x0209, 0x020a };
3988 0x0300, 0x0302, 0x0303, 0x0306, 0x0307, 0x0308, 0x0309, 0x030a };
3990 0x0400, 0x0402, 0x0403, 0x0406, 0x0407, 0x0408, 0x0409, 0x040a };
3992 0x0507, 0x0508, 0x0509, 0x050a, 0x0511, 0x0512, 0x0513, 0x0514 };
3995 SND_DJM_CTL("Master Input Level Capture Switch", cap_level, 0, SND_DJM_WINDEX_CAPLVL),
4005 0x0100, 0x0102, 0x0103, 0x0106, 0x0107, 0x0108, 0x0109, 0x010a };
4007 0x0200, 0x0202, 0x0203, 0x0206, 0x0207, 0x0208, 0x0209, 0x020a };
4009 0x0300, 0x0302, 0x0303, 0x0306, 0x0307, 0x0308, 0x0309, 0x030a };
4011 0x0400, 0x0402, 0x0403, 0x0406, 0x0407, 0x0408, 0x0409, 0x040a };
4013 0x0507, 0x0508, 0x0509, 0x050a, 0x0511, 0x0512, 0x0513, 0x0514 };
4015 static const u16 snd_djm_opts_750mk2_pb1[] = { 0x0100, 0x0101, 0x0104 };
4016 static const u16 snd_djm_opts_750mk2_pb2[] = { 0x0200, 0x0201, 0x0204 };
4017 static const u16 snd_djm_opts_750mk2_pb3[] = { 0x0300, 0x0301, 0x0304 };
4020 SND_DJM_CTL("Master Input Level Capture Switch", cap_level, 0, SND_DJM_WINDEX_CAPLVL),
4026 SND_DJM_CTL("Output 1 Playback Switch", 750mk2_pb1, 0, SND_DJM_WINDEX_PB),
4033 0x0000, 0x0100, 0x0200, 0x0300, 0x0400, 0x0500 };
4035 0x0107, 0x0108, 0x0109, 0x010a, 0x010e,
4036 0x111, 0x112, 0x113, 0x114, 0x0131, 0x132, 0x133, 0x134 };
4038 0x0201, 0x0202, 0x0203, 0x0205, 0x0206, 0x0207, 0x0208, 0x0209, 0x020a, 0x020e };
4040 0x0301, 0x0302, 0x0303, 0x0305, 0x0306, 0x0307, 0x0308, 0x0309, 0x030a, 0x030e };
4042 0x0401, 0x0402, 0x0403, 0x0405, 0x0406, 0x0407, 0x0408, 0x0409, 0x040a, 0x040e };
4044 0x0501, 0x0502, 0x0503, 0x0505, 0x0506, 0x0507, 0x0508, 0x0509, 0x050a, 0x050e };
4047 SND_DJM_CTL("Master Input Level Capture Switch", a9_cap_level, 0, SND_DJM_WINDEX_CAPLVL),
4057 0x0000, 0x0100, 0x0200, 0x0300, 0x0400, 0x0500
4061 0x0103,
4062 0x0100, 0x0102, 0x0106, 0x0110, 0x0107,
4063 0x0108, 0x0109, 0x010a, 0x0121, 0x0122
4067 0x0200, 0x0202, 0x0206, 0x0210, 0x0207,
4068 0x0208, 0x0209, 0x020a, 0x0221, 0x0222
4072 0x0303,
4073 0x0300, 0x0302, 0x0306, 0x0310, 0x0307,
4074 0x0308, 0x0309, 0x030a, 0x0321, 0x0322
4078 0x0403,
4079 0x0400, 0x0402, 0x0406, 0x0410, 0x0407,
4080 0x0408, 0x0409, 0x040a, 0x0421, 0x0422
4084 0x0500, 0x0502, 0x0506, 0x0510, 0x0507,
4085 0x0508, 0x0509, 0x050a, 0x0521, 0x0522
4089 0x0603,
4090 0x0600, 0x0602, 0x0606, 0x0610, 0x0607,
4091 0x0608, 0x0609, 0x060a, 0x0621, 0x0622
4095 SND_DJM_CTL("Master Input Level Capture Switch", v10_cap_level, 0, SND_DJM_WINDEX_CAPLVL),
4098 SND_DJM_CTL("Input 3 Capture Switch", v10_cap3, 0, SND_DJM_WINDEX_CAP),
4099 SND_DJM_CTL("Input 4 Capture Switch", v10_cap4, 0, SND_DJM_WINDEX_CAP),
4100 SND_DJM_CTL("Input 5 Capture Switch", v10_cap5, 0, SND_DJM_WINDEX_CAP),
4101 SND_DJM_CTL("Input 6 Capture Switch", v10_cap6, 0, SND_DJM_WINDEX_CAP)
4145 return 0; in snd_djm_controls_info()
4161 usb_sndctrlpipe(mixer->chip->dev, 0), in snd_djm_controls_update()
4166 NULL, 0); in snd_djm_controls_update()
4172 elem->value.enumerated.item[0] = kctl->private_value & SND_DJM_VALUE_MASK; in snd_djm_controls_get()
4173 return 0; in snd_djm_controls_get()
4184 u16 value = elem->value.enumerated.item[0]; in snd_djm_controls_put()
4214 .index = 0, in snd_djm_controls_create()
4220 for (i = 0; i < device->ncontrols; i++) { in snd_djm_controls_create()
4230 err = add_single_ctl_with_resume(mixer, 0, snd_djm_controls_resume, in snd_djm_controls_create()
4235 return 0; in snd_djm_controls_create()
4240 int err = 0; in snd_usb_mixer_apply_create_quirk()
4243 if (err < 0) in snd_usb_mixer_apply_create_quirk()
4248 case USB_ID(0x0644, 0x8047): in snd_usb_mixer_apply_create_quirk()
4251 case USB_ID(0x041e, 0x3020): in snd_usb_mixer_apply_create_quirk()
4252 case USB_ID(0x041e, 0x3040): in snd_usb_mixer_apply_create_quirk()
4253 case USB_ID(0x041e, 0x3042): in snd_usb_mixer_apply_create_quirk()
4254 case USB_ID(0x041e, 0x30df): in snd_usb_mixer_apply_create_quirk()
4255 case USB_ID(0x041e, 0x3048): in snd_usb_mixer_apply_create_quirk()
4257 if (err < 0) in snd_usb_mixer_apply_create_quirk()
4264 case USB_ID(0x041e, 0x3f19): in snd_usb_mixer_apply_create_quirk()
4269 case USB_ID(0x054c, 0x0ce6): /* Sony DualSense controller (PS5) */ in snd_usb_mixer_apply_create_quirk()
4270 case USB_ID(0x054c, 0x0df2): /* Sony DualSense Edge controller (PS5) */ in snd_usb_mixer_apply_create_quirk()
4275 case USB_ID(0x0763, 0x2030): /* M-Audio Fast Track C400 */ in snd_usb_mixer_apply_create_quirk()
4276 case USB_ID(0x0763, 0x2031): /* M-Audio Fast Track C400 */ in snd_usb_mixer_apply_create_quirk()
4280 case USB_ID(0x0763, 0x2080): /* M-Audio Fast Track Ultra */ in snd_usb_mixer_apply_create_quirk()
4281 case USB_ID(0x0763, 0x2081): /* M-Audio Fast Track Ultra 8R */ in snd_usb_mixer_apply_create_quirk()
4285 case USB_ID(0x0b05, 0x1739): /* ASUS Xonar U1 */ in snd_usb_mixer_apply_create_quirk()
4286 case USB_ID(0x0b05, 0x1743): /* ASUS Xonar U1 (2) */ in snd_usb_mixer_apply_create_quirk()
4287 case USB_ID(0x0b05, 0x17a0): /* ASUS Xonar U3 */ in snd_usb_mixer_apply_create_quirk()
4291 case USB_ID(0x0d8c, 0x0103): /* Audio Advantage Micro II */ in snd_usb_mixer_apply_create_quirk()
4295 case USB_ID(0x0dba, 0x1000): /* Digidesign Mbox 1 */ in snd_usb_mixer_apply_create_quirk()
4299 case USB_ID(0x17cc, 0x1011): /* Traktor Audio 6 */ in snd_usb_mixer_apply_create_quirk()
4306 case USB_ID(0x17cc, 0x1021): /* Traktor Audio 10 */ in snd_usb_mixer_apply_create_quirk()
4313 case USB_ID(0x200c, 0x1018): /* Electrix Ebox-44 */ in snd_usb_mixer_apply_create_quirk()
4318 case USB_ID(0x1235, 0x8012): /* Focusrite Scarlett 6i6 */ in snd_usb_mixer_apply_create_quirk()
4319 case USB_ID(0x1235, 0x8002): /* Focusrite Scarlett 8i6 */ in snd_usb_mixer_apply_create_quirk()
4320 case USB_ID(0x1235, 0x8004): /* Focusrite Scarlett 18i6 */ in snd_usb_mixer_apply_create_quirk()
4321 case USB_ID(0x1235, 0x8014): /* Focusrite Scarlett 18i8 */ in snd_usb_mixer_apply_create_quirk()
4322 case USB_ID(0x1235, 0x800c): /* Focusrite Scarlett 18i20 */ in snd_usb_mixer_apply_create_quirk()
4326 case USB_ID(0x1235, 0x8203): /* Focusrite Scarlett 6i6 2nd Gen */ in snd_usb_mixer_apply_create_quirk()
4327 case USB_ID(0x1235, 0x8204): /* Focusrite Scarlett 18i8 2nd Gen */ in snd_usb_mixer_apply_create_quirk()
4328 case USB_ID(0x1235, 0x8201): /* Focusrite Scarlett 18i20 2nd Gen */ in snd_usb_mixer_apply_create_quirk()
4329 case USB_ID(0x1235, 0x8211): /* Focusrite Scarlett Solo 3rd Gen */ in snd_usb_mixer_apply_create_quirk()
4330 case USB_ID(0x1235, 0x8210): /* Focusrite Scarlett 2i2 3rd Gen */ in snd_usb_mixer_apply_create_quirk()
4331 case USB_ID(0x1235, 0x8212): /* Focusrite Scarlett 4i4 3rd Gen */ in snd_usb_mixer_apply_create_quirk()
4332 case USB_ID(0x1235, 0x8213): /* Focusrite Scarlett 8i6 3rd Gen */ in snd_usb_mixer_apply_create_quirk()
4333 case USB_ID(0x1235, 0x8214): /* Focusrite Scarlett 18i8 3rd Gen */ in snd_usb_mixer_apply_create_quirk()
4334 case USB_ID(0x1235, 0x8215): /* Focusrite Scarlett 18i20 3rd Gen */ in snd_usb_mixer_apply_create_quirk()
4335 case USB_ID(0x1235, 0x8216): /* Focusrite Vocaster One */ in snd_usb_mixer_apply_create_quirk()
4336 case USB_ID(0x1235, 0x8217): /* Focusrite Vocaster Two */ in snd_usb_mixer_apply_create_quirk()
4337 case USB_ID(0x1235, 0x8218): /* Focusrite Scarlett Solo 4th Gen */ in snd_usb_mixer_apply_create_quirk()
4338 case USB_ID(0x1235, 0x8219): /* Focusrite Scarlett 2i2 4th Gen */ in snd_usb_mixer_apply_create_quirk()
4339 case USB_ID(0x1235, 0x821a): /* Focusrite Scarlett 4i4 4th Gen */ in snd_usb_mixer_apply_create_quirk()
4340 case USB_ID(0x1235, 0x8206): /* Focusrite Clarett 2Pre USB */ in snd_usb_mixer_apply_create_quirk()
4341 case USB_ID(0x1235, 0x8207): /* Focusrite Clarett 4Pre USB */ in snd_usb_mixer_apply_create_quirk()
4342 case USB_ID(0x1235, 0x8208): /* Focusrite Clarett 8Pre USB */ in snd_usb_mixer_apply_create_quirk()
4343 case USB_ID(0x1235, 0x820a): /* Focusrite Clarett+ 2Pre */ in snd_usb_mixer_apply_create_quirk()
4344 case USB_ID(0x1235, 0x820b): /* Focusrite Clarett+ 4Pre */ in snd_usb_mixer_apply_create_quirk()
4345 case USB_ID(0x1235, 0x820c): /* Focusrite Clarett+ 8Pre */ in snd_usb_mixer_apply_create_quirk()
4349 case USB_ID(0x1235, 0x821b): /* Focusrite Scarlett 16i16 4th Gen */ in snd_usb_mixer_apply_create_quirk()
4350 case USB_ID(0x1235, 0x821c): /* Focusrite Scarlett 18i16 4th Gen */ in snd_usb_mixer_apply_create_quirk()
4351 case USB_ID(0x1235, 0x821d): /* Focusrite Scarlett 18i20 4th Gen */ in snd_usb_mixer_apply_create_quirk()
4355 case USB_ID(0x041e, 0x323b): /* Creative Sound Blaster E1 */ in snd_usb_mixer_apply_create_quirk()
4358 case USB_ID(0x0bda, 0x4014): /* Dell WD15 dock */ in snd_usb_mixer_apply_create_quirk()
4360 if (err < 0) in snd_usb_mixer_apply_create_quirk()
4364 case USB_ID(0x0bda, 0x402e): /* Dell WD19 dock */ in snd_usb_mixer_apply_create_quirk()
4368 case USB_ID(0x2a39, 0x3fd2): /* RME ADI-2 Pro */ in snd_usb_mixer_apply_create_quirk()
4369 case USB_ID(0x2a39, 0x3fd3): /* RME ADI-2 DAC */ in snd_usb_mixer_apply_create_quirk()
4370 case USB_ID(0x2a39, 0x3fd4): /* RME */ in snd_usb_mixer_apply_create_quirk()
4374 case USB_ID(0x194f, 0x010c): /* Presonus Studio 1810c */ in snd_usb_mixer_apply_create_quirk()
4377 case USB_ID(0x194f, 0x010d): /* Presonus Studio 1824c */ in snd_usb_mixer_apply_create_quirk()
4380 case USB_ID(0x2a39, 0x3fb0): /* RME Babyface Pro FS */ in snd_usb_mixer_apply_create_quirk()
4383 case USB_ID(0x2a39, 0x3f8c): /* RME Digiface USB */ in snd_usb_mixer_apply_create_quirk()
4384 case USB_ID(0x2a39, 0x3fa0): /* RME Digiface USB (alternate) */ in snd_usb_mixer_apply_create_quirk()
4387 case USB_ID(0x2b73, 0x0017): /* Pioneer DJ DJM-250MK2 */ in snd_usb_mixer_apply_create_quirk()
4390 case USB_ID(0x2b73, 0x0013): /* Pioneer DJ DJM-450 */ in snd_usb_mixer_apply_create_quirk()
4393 case USB_ID(0x08e4, 0x017f): /* Pioneer DJ DJM-750 */ in snd_usb_mixer_apply_create_quirk()
4396 case USB_ID(0x2b73, 0x001b): /* Pioneer DJ DJM-750MK2 */ in snd_usb_mixer_apply_create_quirk()
4399 case USB_ID(0x08e4, 0x0163): /* Pioneer DJ DJM-850 */ in snd_usb_mixer_apply_create_quirk()
4402 case USB_ID(0x2b73, 0x000a): /* Pioneer DJ DJM-900NXS2 */ in snd_usb_mixer_apply_create_quirk()
4405 case USB_ID(0x2b73, 0x003c): /* Pioneer DJ / AlphaTheta DJM-A9 */ in snd_usb_mixer_apply_create_quirk()
4408 case USB_ID(0x2b73, 0x0034): /* Pioneer DJ DJM-V10 */ in snd_usb_mixer_apply_create_quirk()
4419 case USB_ID(0x0bda, 0x4014): /* Dell WD15 dock */ in snd_usb_mixer_resume_quirk()
4432 case 0: /* remote control */ in snd_usb_mixer_rc_memory_change()
4443 if (mixer->chip->usb_id == USB_ID(0x041e, 0x3040) || in snd_usb_mixer_rc_memory_change()
4444 mixer->chip->usb_id == USB_ID(0x041e, 0x3048)) in snd_usb_mixer_rc_memory_change()
4461 0, 1, TLV_DB_MINMAX_ITEM(-5300, -4970), in snd_dragonfly_quirk_db_scale()
4470 41, 50, TLV_DB_MINMAX_ITEM(-441, 0), in snd_dragonfly_quirk_db_scale()
4473 if (cval->min == 0 && cval->max == 50) { in snd_dragonfly_quirk_db_scale()
4474 usb_audio_info(mixer->chip, "applying DragonFly dB scale quirk (0-50 variant)\n"); in snd_dragonfly_quirk_db_scale()
4476 kctl->vd[0].access |= SNDRV_CTL_ELEM_ACCESS_TLV_READ; in snd_dragonfly_quirk_db_scale()
4477 kctl->vd[0].access &= ~SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK; in snd_dragonfly_quirk_db_scale()
4479 } else if (cval->min == 0 && cval->max <= 1000) { in snd_dragonfly_quirk_db_scale()
4481 * At least a 0..53 variant (hw v1.0) exists. in snd_dragonfly_quirk_db_scale()
4484 kctl->vd[0].access &= ~SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK; in snd_dragonfly_quirk_db_scale()
4517 for (i = 0; i < ARRAY_SIZE(trigger); i++) in snd_fix_plt_name()
4524 for (i = 0; i < ARRAY_SIZE(suffix); i++) in snd_fix_plt_name()
4539 case USB_ID(0x21b4, 0x0081): /* AudioQuest DragonFly */ in snd_usb_mixer_fu_apply_quirk()
4561 if (USB_ID_VENDOR(mixer->chip->usb_id) == 0x047f && in snd_usb_mixer_fu_apply_quirk()