Lines Matching +full:0 +full:x8014
45 * USB URB commands overview (bRequest = 0x01 = UAC2_CS_CUR)
47 * 0x01 Analog Input line/instrument impedance switch, wValue=0x0901 +
49 * pad (-10dB) switch, wValue=0x0b01 + channel, data=Off/On (2bytes)
50 * ?? wValue=0x0803/04, ?? (2bytes)
51 * 0x0a Master Volume, wValue=0x0200+bus[0:all + only 1..4?] data(2bytes)
52 * Bus Mute/Unmute wValue=0x0100+bus[0:all + only 1..4?], data(2bytes)
53 * 0x28 Clock source, wValue=0x0100, data={1:int,2:spdif,3:adat} (1byte)
54 * 0x29 Set Sample-rate, wValue=0x0100, data=sample-rate(4bytes)
55 * 0x32 Mixer mux, wValue=0x0600 + mixer-channel, data=input-to-connect(2bytes)
56 * 0x33 Output mux, wValue=bus, data=input-to-connect(2bytes)
57 * 0x34 Capture mux, wValue=0...18, data=input-to-connect(2bytes)
58 * 0x3c Matrix Mixer gains, wValue=mixer-node data=gain(2bytes)
59 * ?? [sometimes](4bytes, e.g 0x000003be 0x000003bf ...03ff)
62 * 0x01 wValue=0x0901+channel (1byte!!), wValue=0x0b01+channed (1byte!!)
63 * 0x29 wValue=0x0100 sample-rate(4bytes)
64 * wValue=0x0200 ?? 1byte (only once)
65 * 0x2a wValue=0x0100 ?? 4bytes, sample-rate2 ??
67 * USB reads with bRequest = 0x03 = UAC2_CS_MEM
68 * 0x3c wValue=0x0002 1byte: sync status (locked=1)
69 * wValue=0x0000 18*2byte: peak meter (inputs)
70 * wValue=0x0001 8(?)*2byte: peak meter (mix)
71 * wValue=0x0003 6*2byte: peak meter (pcm/daw)
73 * USB write with bRequest = 0x03
74 * 0x3c Save settings to hardware: wValue=0x005a, data=0xa5
149 SCARLETT_OFFSET_PCM = 0,
188 .start = 0,
192 "0dB", "-10dB"
197 .start = 0,
206 .start = 0,
224 .start = 0,
239 uinfo->value.integer.min = 0; in scarlett_ctl_switch_info()
241 return 0; in scarlett_ctl_switch_info()
250 for (i = 0; i < elem->channels; i++) { in scarlett_ctl_switch_get()
252 if (err < 0) in scarlett_ctl_switch_get()
259 return 0; in scarlett_ctl_switch_get()
266 int i, changed = 0; in scarlett_ctl_switch_put()
269 for (i = 0; i < elem->channels; i++) { in scarlett_ctl_switch_put()
271 if (err < 0) in scarlett_ctl_switch_put()
278 if (err < 0) in scarlett_ctl_switch_put()
293 for (i = 0; i < elem->channels; i++) in scarlett_ctl_resume()
297 return 0; in scarlett_ctl_resume()
307 uinfo->value.integer.min = 0; in scarlett_ctl_info()
311 return 0; in scarlett_ctl_info()
320 for (i = 0; i < elem->channels; i++) { in scarlett_ctl_get()
322 if (err < 0) in scarlett_ctl_get()
330 return 0; in scarlett_ctl_get()
337 int i, changed = 0; in scarlett_ctl_put()
340 for (i = 0; i < elem->channels; i++) { in scarlett_ctl_put()
342 if (err < 0) in scarlett_ctl_put()
350 if (err < 0) in scarlett_ctl_put()
396 return 0; in scarlett_ctl_enum_dynamic_info()
416 err = snd_usb_get_cur_mix_value(elem, 0, 0, &val); in scarlett_ctl_enum_get()
417 if (err < 0) in scarlett_ctl_enum_get()
420 val = clamp(val - opt->start, 0, opt->len-1); in scarlett_ctl_enum_get()
422 ucontrol->value.enumerated.item[0] = val; in scarlett_ctl_enum_get()
424 return 0; in scarlett_ctl_enum_get()
434 err = snd_usb_get_cur_mix_value(elem, 0, 0, &oval); in scarlett_ctl_enum_put()
435 if (err < 0) in scarlett_ctl_enum_put()
438 val = ucontrol->value.integer.value[0]; in scarlett_ctl_enum_put()
441 snd_usb_set_cur_mix_value(elem, 0, 0, val); in scarlett_ctl_enum_put()
444 return 0; in scarlett_ctl_enum_put()
452 snd_usb_set_cur_mix_value(elem, 0, 0, *elem->cache_val); in scarlett_ctl_enum_resume()
453 return 0; in scarlett_ctl_enum_resume()
461 unsigned char buf[2 * MAX_CHANNELS] = {0, }; in scarlett_ctl_meter_get()
467 usb_rcvctrlpipe(chip->dev, 0), in scarlett_ctl_meter_get()
471 if (err < 0) in scarlett_ctl_meter_get()
474 ucontrol->value.enumerated.item[0] = clamp((int)buf[0], 0, 1); in scarlett_ctl_meter_get()
475 return 0; in scarlett_ctl_meter_get()
486 static const DECLARE_TLV_DB_SCALE(db_scale_scarlett_gain, -12800, 100, 0);
575 if (err < 0) in add_new_ctl()
581 return 0; in add_new_ctl()
596 scarlett_ctl_resume, 0x0a, 0x01, in add_output_ctls()
598 if (err < 0) in add_output_ctls()
601 /* Add volume control and initialize to 0 */ in add_output_ctls()
605 scarlett_ctl_resume, 0x0a, 0x02, in add_output_ctls()
607 if (err < 0) in add_output_ctls()
614 scarlett_ctl_enum_resume, 0x33, 0x00, in add_output_ctls()
617 if (err < 0) in add_output_ctls()
624 scarlett_ctl_enum_resume, 0x33, 0x00, in add_output_ctls()
627 if (err < 0) in add_output_ctls()
630 return 0; in add_output_ctls()
645 .offsets = {0, 12, 16, 18, 18},
652 .offsets = {0, 12, 16, 18, 18},
658 { .num = 0, .type = SCARLETT_OUTPUTS, .name = "Monitor" },
672 0, 1, 2, 3, 4, 5, 6, 7, /* PCM[1..12] -> 7..18 */
687 .offsets = {0, 12, 16, 18, 18},
694 .offsets = {0, 12, 16, 18, 18},
700 { .num = 0, .type = SCARLETT_OUTPUTS, .name = "Monitor" },
712 0, 1, 2, 3, 4, 5, 6, 7, /* PCM[1..12] -> 7..18 */
726 .offsets = {0, 6, 14, 16, 24},
733 .offsets = {0, 6, 14, 16, 24},
739 { .num = 0, .type = SCARLETT_OUTPUTS, .name = "Monitor" },
750 0, 1 /* PCM[1,2] -> 17,18 */
763 .offsets = {0, 8, 16, 18, 26},
770 .offsets = {0, 8, 16, 18, 26},
776 { .num = 0, .type = SCARLETT_OUTPUTS, .name = "Monitor" },
792 0, 1 /* PCM[1,2] -> 17,18 */
805 .offsets = {0, 20, 28, 30, 38},
812 .offsets = {0, 20, 28, 30, 38},
818 { .num = 0, .type = SCARLETT_OUTPUTS, .name = "Monitor" },
840 0, 1 /* PCM[1,2] -> 17,18 */
855 scarlett_ctl_resume, 0x0a, 0x01, 0, in scarlett_controls_create_generic()
858 if (err < 0) in scarlett_controls_create_generic()
862 scarlett_ctl_resume, 0x0a, 0x02, 0, in scarlett_controls_create_generic()
865 if (err < 0) in scarlett_controls_create_generic()
869 for (i = 0; i < info->num_controls; i++) { in scarlett_controls_create_generic()
875 if (err < 0) in scarlett_controls_create_generic()
881 scarlett_ctl_enum_resume, 0x01, in scarlett_controls_create_generic()
882 0x09, ctl->num, USB_MIXER_S16, 1, mx, in scarlett_controls_create_generic()
884 if (err < 0) in scarlett_controls_create_generic()
890 scarlett_ctl_enum_resume, 0x01, in scarlett_controls_create_generic()
891 0x0b, ctl->num, USB_MIXER_S16, 1, mx, in scarlett_controls_create_generic()
893 if (err < 0) in scarlett_controls_create_generic()
899 scarlett_ctl_enum_resume, 0x01, in scarlett_controls_create_generic()
900 0x08, ctl->num, USB_MIXER_S16, 1, mx, in scarlett_controls_create_generic()
902 if (err < 0) in scarlett_controls_create_generic()
908 return 0; in scarlett_controls_create_generic()
924 return 0; in snd_scarlett_controls_create()
927 case USB_ID(0x1235, 0x8012): in snd_scarlett_controls_create()
930 case USB_ID(0x1235, 0x8002): in snd_scarlett_controls_create()
933 case USB_ID(0x1235, 0x8004): in snd_scarlett_controls_create()
936 case USB_ID(0x1235, 0x8014): in snd_scarlett_controls_create()
939 case USB_ID(0x1235, 0x800c): in snd_scarlett_controls_create()
948 if (err < 0) in snd_scarlett_controls_create()
952 for (i = 0; i < info->matrix_in; i++) { in snd_scarlett_controls_create()
956 scarlett_ctl_enum_resume, 0x32, in snd_scarlett_controls_create()
957 0x06, i, USB_MIXER_S16, 1, mx, in snd_scarlett_controls_create()
959 if (err < 0) in snd_scarlett_controls_create()
962 for (o = 0; o < info->matrix_out; o++) { in snd_scarlett_controls_create()
966 scarlett_ctl_resume, 0x3c, 0x00, in snd_scarlett_controls_create()
967 (i << 3) + (o & 0x07), USB_MIXER_S16, in snd_scarlett_controls_create()
969 if (err < 0) in snd_scarlett_controls_create()
975 for (i = 0; i < info->input_len; i++) { in snd_scarlett_controls_create()
979 scarlett_ctl_enum_resume, 0x34, in snd_scarlett_controls_create()
980 0x00, i, USB_MIXER_S16, 1, mx, in snd_scarlett_controls_create()
982 if (err < 0) in snd_scarlett_controls_create()
988 scarlett_ctl_enum_resume, 0x28, 0x01, 0, in snd_scarlett_controls_create()
991 if (err < 0) in snd_scarlett_controls_create()
995 err = add_new_ctl(mixer, &usb_scarlett_ctl_sync, NULL, 0x3c, 0x00, 2, in snd_scarlett_controls_create()
998 if (err < 0) in snd_scarlett_controls_create()
1003 usb_sndctrlpipe(mixer->chip->dev, 0), UAC2_CS_CUR, in snd_scarlett_controls_create()
1005 USB_DIR_OUT, 0x0100, snd_usb_ctrl_intf(mixer->hostif) | in snd_scarlett_controls_create()
1006 (0x29 << 8), sample_rate_buffer, 4); in snd_scarlett_controls_create()
1007 if (err < 0) in snd_scarlett_controls_create()