@@ -3498,7 +3498,7 @@ static int snd_rme_digiface_controls_create(struct usb_mixer_interface *mixer)
3498
3498
}
3499
3499
3500
3500
/*
3501
- * Pioneer DJ DJM Mixers
3501
+ * Pioneer DJ / AlphaTheta DJM Mixers
3502
3502
*
3503
3503
* These devices generally have options for soft-switching the playback and
3504
3504
* capture sources in addition to the recording level. Although different
@@ -3515,17 +3515,23 @@ static int snd_rme_digiface_controls_create(struct usb_mixer_interface *mixer)
3515
3515
#define SND_DJM_CAP_CDLINE 0x01
3516
3516
#define SND_DJM_CAP_DIGITAL 0x02
3517
3517
#define SND_DJM_CAP_PHONO 0x03
3518
+ #define SND_DJM_CAP_PREFADER 0x05
3518
3519
#define SND_DJM_CAP_PFADER 0x06
3519
3520
#define SND_DJM_CAP_XFADERA 0x07
3520
3521
#define SND_DJM_CAP_XFADERB 0x08
3521
3522
#define SND_DJM_CAP_MIC 0x09
3522
3523
#define SND_DJM_CAP_AUX 0x0d
3523
3524
#define SND_DJM_CAP_RECOUT 0x0a
3525
+ #define SND_DJM_CAP_RECOUT_NOMIC 0x0e
3524
3526
#define SND_DJM_CAP_NONE 0x0f
3525
3527
#define SND_DJM_CAP_CH1PFADER 0x11
3526
3528
#define SND_DJM_CAP_CH2PFADER 0x12
3527
3529
#define SND_DJM_CAP_CH3PFADER 0x13
3528
3530
#define SND_DJM_CAP_CH4PFADER 0x14
3531
+ #define SND_DJM_CAP_CH1PREFADER 0x31
3532
+ #define SND_DJM_CAP_CH2PREFADER 0x32
3533
+ #define SND_DJM_CAP_CH3PREFADER 0x33
3534
+ #define SND_DJM_CAP_CH4PREFADER 0x34
3529
3535
3530
3536
// Playback types
3531
3537
#define SND_DJM_PB_CH1 0x00
@@ -3551,6 +3557,7 @@ static int snd_rme_digiface_controls_create(struct usb_mixer_interface *mixer)
3551
3557
#define SND_DJM_900NXS2_IDX 0x3
3552
3558
#define SND_DJM_750MK2_IDX 0x4
3553
3559
#define SND_DJM_450_IDX 0x5
3560
+ #define SND_DJM_A9_IDX 0x6
3554
3561
3555
3562
3556
3563
#define SND_DJM_CTL (_name , suffix , _default_value , _windex ) { \
@@ -3579,7 +3586,7 @@ struct snd_djm_ctl {
3579
3586
u16 wIndex ;
3580
3587
};
3581
3588
3582
- static const char * snd_djm_get_label_caplevel (u16 wvalue )
3589
+ static const char * snd_djm_get_label_caplevel_common (u16 wvalue )
3583
3590
{
3584
3591
switch (wvalue ) {
3585
3592
case 0x0000 : return "-19dB" ;
@@ -3590,6 +3597,20 @@ static const char *snd_djm_get_label_caplevel(u16 wvalue)
3590
3597
}
3591
3598
};
3592
3599
3600
+ // The DJM-A9 has different capture levels than other, older models
3601
+ static const char * snd_djm_get_label_caplevel_a9 (u16 wvalue )
3602
+ {
3603
+ switch (wvalue ) {
3604
+ case 0x0000 : return "+15dB" ;
3605
+ case 0x0100 : return "+12dB" ;
3606
+ case 0x0200 : return "+9dB" ;
3607
+ case 0x0300 : return "+6dB" ;
3608
+ case 0x0400 : return "+3dB" ;
3609
+ case 0x0500 : return "0dB" ;
3610
+ default : return NULL ;
3611
+ }
3612
+ };
3613
+
3593
3614
static const char * snd_djm_get_label_cap_common (u16 wvalue )
3594
3615
{
3595
3616
switch (wvalue & 0x00ff ) {
@@ -3602,8 +3623,13 @@ static const char *snd_djm_get_label_cap_common(u16 wvalue)
3602
3623
case SND_DJM_CAP_XFADERB : return "Cross Fader B" ;
3603
3624
case SND_DJM_CAP_MIC : return "Mic" ;
3604
3625
case SND_DJM_CAP_RECOUT : return "Rec Out" ;
3626
+ case SND_DJM_CAP_RECOUT_NOMIC : return "Rec Out without Mic" ;
3605
3627
case SND_DJM_CAP_AUX : return "Aux" ;
3606
3628
case SND_DJM_CAP_NONE : return "None" ;
3629
+ case SND_DJM_CAP_CH1PREFADER : return "Pre Fader Ch1" ;
3630
+ case SND_DJM_CAP_CH2PREFADER : return "Pre Fader Ch2" ;
3631
+ case SND_DJM_CAP_CH3PREFADER : return "Pre Fader Ch3" ;
3632
+ case SND_DJM_CAP_CH4PREFADER : return "Pre Fader Ch4" ;
3607
3633
case SND_DJM_CAP_CH1PFADER : return "Post Fader Ch1" ;
3608
3634
case SND_DJM_CAP_CH2PFADER : return "Post Fader Ch2" ;
3609
3635
case SND_DJM_CAP_CH3PFADER : return "Post Fader Ch3" ;
@@ -3623,6 +3649,14 @@ static const char *snd_djm_get_label_cap_850(u16 wvalue)
3623
3649
}
3624
3650
};
3625
3651
3652
+ static const char * snd_djm_get_label_caplevel (u8 device_idx , u16 wvalue )
3653
+ {
3654
+ switch (device_idx ) {
3655
+ case SND_DJM_A9_IDX : return snd_djm_get_label_caplevel_a9 (wvalue );
3656
+ default : return snd_djm_get_label_caplevel_common (wvalue );
3657
+ }
3658
+ };
3659
+
3626
3660
static const char * snd_djm_get_label_cap (u8 device_idx , u16 wvalue )
3627
3661
{
3628
3662
switch (device_idx ) {
@@ -3644,7 +3678,7 @@ static const char *snd_djm_get_label_pb(u16 wvalue)
3644
3678
static const char * snd_djm_get_label (u8 device_idx , u16 wvalue , u16 windex )
3645
3679
{
3646
3680
switch (windex ) {
3647
- case SND_DJM_WINDEX_CAPLVL : return snd_djm_get_label_caplevel (wvalue );
3681
+ case SND_DJM_WINDEX_CAPLVL : return snd_djm_get_label_caplevel (device_idx , wvalue );
3648
3682
case SND_DJM_WINDEX_CAP : return snd_djm_get_label_cap (device_idx , wvalue );
3649
3683
case SND_DJM_WINDEX_PB : return snd_djm_get_label_pb (wvalue );
3650
3684
default : return NULL ;
@@ -3653,7 +3687,7 @@ static const char *snd_djm_get_label(u8 device_idx, u16 wvalue, u16 windex)
3653
3687
3654
3688
// common DJM capture level option values
3655
3689
static const u16 snd_djm_opts_cap_level [] = {
3656
- 0x0000 , 0x0100 , 0x0200 , 0x0300 };
3690
+ 0x0000 , 0x0100 , 0x0200 , 0x0300 , 0x400 , 0x500 };
3657
3691
3658
3692
3659
3693
// DJM-250MK2
@@ -3795,13 +3829,36 @@ static const struct snd_djm_ctl snd_djm_ctls_750mk2[] = {
3795
3829
};
3796
3830
3797
3831
3832
+ // DJM-A9
3833
+ static const u16 snd_djm_opts_a9_cap1 [] = {
3834
+ 0x0107 , 0x0108 , 0x0109 , 0x010a , 0x010e ,
3835
+ 0x111 , 0x112 , 0x113 , 0x114 , 0x0131 , 0x132 , 0x133 , 0x134 };
3836
+ static const u16 snd_djm_opts_a9_cap2 [] = {
3837
+ 0x0201 , 0x0202 , 0x0203 , 0x0205 , 0x0206 , 0x0207 , 0x0208 , 0x0209 , 0x020a , 0x020e };
3838
+ static const u16 snd_djm_opts_a9_cap3 [] = {
3839
+ 0x0301 , 0x0302 , 0x0303 , 0x0305 , 0x0306 , 0x0307 , 0x0308 , 0x0309 , 0x030a , 0x030e };
3840
+ static const u16 snd_djm_opts_a9_cap4 [] = {
3841
+ 0x0401 , 0x0402 , 0x0403 , 0x0405 , 0x0406 , 0x0407 , 0x0408 , 0x0409 , 0x040a , 0x040e };
3842
+ static const u16 snd_djm_opts_a9_cap5 [] = {
3843
+ 0x0501 , 0x0502 , 0x0503 , 0x0505 , 0x0506 , 0x0507 , 0x0508 , 0x0509 , 0x050a , 0x050e };
3844
+
3845
+ static const struct snd_djm_ctl snd_djm_ctls_a9 [] = {
3846
+ SND_DJM_CTL ("Capture Level" , cap_level , 0 , SND_DJM_WINDEX_CAPLVL ),
3847
+ SND_DJM_CTL ("Master Input" , a9_cap1 , 3 , SND_DJM_WINDEX_CAP ),
3848
+ SND_DJM_CTL ("Ch1 Input" , a9_cap2 , 2 , SND_DJM_WINDEX_CAP ),
3849
+ SND_DJM_CTL ("Ch2 Input" , a9_cap3 , 2 , SND_DJM_WINDEX_CAP ),
3850
+ SND_DJM_CTL ("Ch3 Input" , a9_cap4 , 2 , SND_DJM_WINDEX_CAP ),
3851
+ SND_DJM_CTL ("Ch4 Input" , a9_cap5 , 2 , SND_DJM_WINDEX_CAP )
3852
+ };
3853
+
3798
3854
static const struct snd_djm_device snd_djm_devices [] = {
3799
3855
[SND_DJM_250MK2_IDX ] = SND_DJM_DEVICE (250 mk2 ),
3800
3856
[SND_DJM_750_IDX ] = SND_DJM_DEVICE (750 ),
3801
3857
[SND_DJM_850_IDX ] = SND_DJM_DEVICE (850 ),
3802
3858
[SND_DJM_900NXS2_IDX ] = SND_DJM_DEVICE (900 nxs2 ),
3803
3859
[SND_DJM_750MK2_IDX ] = SND_DJM_DEVICE (750 mk2 ),
3804
3860
[SND_DJM_450_IDX ] = SND_DJM_DEVICE (450 ),
3861
+ [SND_DJM_A9_IDX ] = SND_DJM_DEVICE (a9 ),
3805
3862
};
3806
3863
3807
3864
@@ -4076,6 +4133,9 @@ int snd_usb_mixer_apply_create_quirk(struct usb_mixer_interface *mixer)
4076
4133
case USB_ID (0x2b73 , 0x000a ): /* Pioneer DJ DJM-900NXS2 */
4077
4134
err = snd_djm_controls_create (mixer , SND_DJM_900NXS2_IDX );
4078
4135
break ;
4136
+ case USB_ID (0x2b73 , 0x003c ): /* Pioneer DJ / AlphaTheta DJM-A9 */
4137
+ err = snd_djm_controls_create (mixer , SND_DJM_A9_IDX );
4138
+ break ;
4079
4139
}
4080
4140
4081
4141
return err ;
0 commit comments