Re: [alsa-devel] snd_usb_audio - siberia elite prism soundcard issues
> > > > > amixer: Control hw:2 element read error: Invalid argument > > > usb 1-1.3: 10:0: cannot get min/max values for control 3 (id
10)
> > > usb 1-1.3: 2:1: cannot get freq at ep 0x1
numid=5,iface=MIXER,name='PCM Volume' ;
type=INTEGER,access=rw------,values=2,min=0,max=1,step=0 amixer: Control hw:2 element read error: Invalid argument
numid=6,iface=MIXER,name='PCM Volume',index=1 ;
type=INTEGER,access=rw------,values=1,min=0,max=1,step=0 amixer: Control hw:2 element read error: Invalid argument
numid=7,iface=MIXER,name='PCM Volume',index=2 ;
type=INTEGER,access=rw------,values=1,min=0,max=1,step=0 amixer: Control hw:2 element read error: Invalid argument
numid=8,iface=MIXER,name='PCM Volume',index=3 ;
type=INTEGER,access=rw------,values=1,min=0,max=1,step=0 amixer: Control hw:2 element read error: Invalid argument
numid=9,iface=MIXER,name='PCM Volume',index=4 ;
type=INTEGER,access=rw------,values=1,min=0,max=1,step=0 amixer: Control hw:2 element read error: Invalid argument
AudioControl Interface Descriptor: bLength 13 bDescriptorType 36 bDescriptorSubtype 4 (MIXER_UNIT) Warning: Descriptor too short bUnitID 10 bNrInPins 2 baSourceID( 0) 9 baSourceID( 1) 1 bNrChannels 8 wChannelConfig 0x063f Left Front (L) Right Front (R) Center Front (C) Low Freqency Enhancement (LFE) Left Surround (LS) Right Surround (RS) Side Left (SL) Side Right (SR) iChannelNames 0 bmControls 0x00 bmControls 0x00 iMixer 33 (error)
Refer to usb audio specification 1.0
Table 4-5: Mixer Unit Descriptor
bLength = 10 + p + N = 14
Number of Input Pins of this Unit: p
bNrInPins 2
The ID of the Unit or Terminal to which the first and second Input Pins of this Mixer Unit is connected.
baSourceID( 0) 9
baSourceID( 1) 1
Number of logical output channels in the Mixer’s output audio channel cluster.
bNrChannels 8
Describes the spatial location of the logical channels.
wChannelConfig 0x063f Left Front (L) Right Front (R) Center Front (C) Low Freqency Enhancement (LFE) Left Surround (LS) Right Surround (RS) Side Left (SL) Side Right (SR)
Bit map indicating which mixing Controls are programmable.
bmControls 0x00 bmControls 0x00
The Mixer Unit Descriptor reports which Controls are programmable in the bmControls bitmap field. This bitmap must be interpreted as a two-dimensional bit array that has a row for each logical input channel and a column for each logical output channel. If a bit at position [u, v] is set, this means that the Mixer Unit contains a programmable mixing Control that connects input channel u to output channel v. If bit [u, v] is clear, this indicates that the connection between input channel u and output channel v is non-programmable. Its fixed value can be retrieved through the appropriate request. The valid range for u is from one to n. The valid range for v is from one to m.
The bmControls field stores the bit array row after row where the MSb of the first byte corresponds to the connection between input channel 1 and output channel 1. If (n x m) is not an integer multiple of 8, the bit array is padded with zeros until an integer number of bytes is occupied.
The number of bytes used to store the bit array, N, can be calculated as follows: IF ((n x m) MOD 8) <> 0 THEN N = ((n x m) DIV 8) + 1 ELSE N = ((n x m) DIV 8)
Index of a string descriptor, describing the name of the first logical channel.
iChannelNames 0
Index of a string descriptor, describing the Mixer Unit.
iMixer 33
if (check_matrix_bitmap(c, ich, och, num_outs)) { ich_has_controls = 1; break; } }
This mean value returned by check_matrix_bitmap() is incorrect as
bmControls 0x00 bmControls 0x00
if (ich_has_controls) build_mixer_unit_ctl(state, desc, pin, ich, unitid, &iterm); } } return 0; }
2015-03-12 2:10 GMT+01:00 Raymond Yau superquad.vortex2@gmail.com:
> > > > > > > amixer: Control hw:2 element read error: Invalid argument > > > > usb 1-1.3: 10:0: cannot get min/max values for control 3
(id 10)
> > > > usb 1-1.3: 2:1: cannot get freq at ep 0x1
numid=5,iface=MIXER,name='PCM Volume' ;
type=INTEGER,access=rw------,values=2,min=0,max=1,step=0 amixer: Control hw:2 element read error: Invalid argument
numid=6,iface=MIXER,name='PCM Volume',index=1 ;
type=INTEGER,access=rw------,values=1,min=0,max=1,step=0 amixer: Control hw:2 element read error: Invalid argument
numid=7,iface=MIXER,name='PCM Volume',index=2 ;
type=INTEGER,access=rw------,values=1,min=0,max=1,step=0 amixer: Control hw:2 element read error: Invalid argument
numid=8,iface=MIXER,name='PCM Volume',index=3 ;
type=INTEGER,access=rw------,values=1,min=0,max=1,step=0 amixer: Control hw:2 element read error: Invalid argument
numid=9,iface=MIXER,name='PCM Volume',index=4 ;
type=INTEGER,access=rw------,values=1,min=0,max=1,step=0 amixer: Control hw:2 element read error: Invalid argument
AudioControl Interface Descriptor: bLength 13 bDescriptorType 36 bDescriptorSubtype 4 (MIXER_UNIT) Warning: Descriptor too short bUnitID 10 bNrInPins 2 baSourceID( 0) 9 baSourceID( 1) 1 bNrChannels 8 wChannelConfig 0x063f Left Front (L) Right Front (R) Center Front (C) Low Freqency Enhancement (LFE) Left Surround (LS) Right Surround (RS) Side Left (SL) Side Right (SR) iChannelNames 0 bmControls 0x00 bmControls 0x00 iMixer 33 (error)
Refer to usb audio specification 1.0
Table 4-5: Mixer Unit Descriptor
bLength = 10 + p + N = 14
Number of Input Pins of this Unit: p
bNrInPins 2
The ID of the Unit or Terminal to which the first and second Input Pins of this Mixer Unit is connected.
baSourceID( 0) 9
baSourceID( 1) 1
Number of logical output channels in the Mixer’s output audio channel cluster.
bNrChannels 8
Describes the spatial location of the logical channels.
wChannelConfig 0x063f Left Front (L) Right Front (R) Center Front (C) Low Freqency Enhancement (LFE) Left Surround (LS) Right Surround (RS) Side Left (SL) Side Right (SR)
Bit map indicating which mixing Controls are programmable.
bmControls 0x00 bmControls 0x00
The Mixer Unit Descriptor reports which Controls are programmable in the bmControls bitmap field. This bitmap must be interpreted as a two-dimensional bit array that has a row for each logical input channel and a column for each logical output channel. If a bit at position [u, v] is set, this means that the Mixer Unit contains a programmable mixing Control that connects input channel u to output channel v. If bit [u, v] is clear, this indicates that the connection between input channel u and output channel v is non-programmable. Its fixed value can be retrieved through the appropriate request. The valid range for u is from one to n. The valid range for v is from one to m.
The bmControls field stores the bit array row after row where the MSb of the first byte corresponds to the connection between input channel 1 and output channel 1. If (n x m) is not an integer multiple of 8, the bit array is padded with zeros until an integer number of bytes is occupied.
The number of bytes used to store the bit array, N, can be calculated as follows: IF ((n x m) MOD 8) <> 0 THEN N = ((n x m) DIV 8) + 1 ELSE N = ((n x m) DIV 8)
Index of a string descriptor, describing the name of the first logical channel.
iChannelNames 0
Index of a string descriptor, describing the Mixer Unit.
iMixer 33
if (check_matrix_bitmap(c, ich, och, num_outs)) { ich_has_controls = 1; break; } }
This mean value returned by check_matrix_bitmap() is incorrect as
bmControls 0x00 bmControls 0x00
if (ich_has_controls) build_mixer_unit_ctl(state, desc, pin, ich, unitid, &iterm); } } return 0; }
In case this can be of any useful info, in the form of unknown controls reported by the lsusb output, manufacturer software in other OS has controls for:
* dolby surround activation (off and on). * microphone input volume (which works fine now) in snd_usb_audio * microphone input "compression" (supposedly to keep input within certain non distorting levels) * input noise reduction (off and on too) * micro retro feedback volume * equalizer.
Thanks for your time.
> AudioControl Interface Descriptor: > bLength 13 > bDescriptorType 36 > bDescriptorSubtype 4 (MIXER_UNIT) > Warning: Descriptor too short > bUnitID 10 > bNrInPins 2 > baSourceID( 0) 9 > baSourceID( 1) 1 > bNrChannels 8 > wChannelConfig 0x063f > Left Front (L) > Right Front (R) > Center Front (C) > Low Freqency Enhancement (LFE) > Left Surround (LS) > Right Surround (RS) > Side Left (SL) > Side Right (SR) > iChannelNames 0 > bmControls 0x00 > bmControls 0x00 > iMixer 33 (error)
Refer to usb audio specification 1.0
Table 4-5: Mixer Unit Descriptor
bLength = 10 + p + N = 14
Bus 001 Device 003: ID 1038:1225 Ideazon, Inc. Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00
Your usb audio device are 2.0 bLength = 13 + p + N
Number of Input Pins of this Unit: p
bNrInPins 2
The ID of the Unit or Terminal to which the first and second Input Pins
of this Mixer Unit is connected.
baSourceID( 0) 9
> baSourceID( 1) 1
Number of logical output channels in the Mixer’s output audio channel
cluster.
> bNrChannels 8
Describes the spatial location of the logical channels.
> wChannelConfig 0x063f
Seem use 4 bytes instead of 2 bytes for usb audio 2.0 devices This mean the values output by lsusb is different from specification
> Left Front (L) > Right Front (R) > Center Front (C) > Low Freqency Enhancement (LFE) > Left Surround (LS) > Right Surround (RS) > Side Left (SL) > Side Right (SR)
Bit map indicating which mixing Controls are programmable.
> bmControls 0x00 > bmControls 0x00
Index of a string descriptor, describing the name of the first logical
channel.
iChannelNames 0
Index of a string descriptor, describing the Mixer Unit.
> iMixer 33
In case this can be of any useful info, in the form of unknown controls
reported by the lsusb output, manufacturer software in other OS has controls for:
- dolby surround activation (off and on).
- microphone input volume (which works fine now) in snd_usb_audio
- microphone input "compression" (supposedly to keep input within certain
non distorting levels)
- input noise reduction (off and on too)
- micro retro feedback volume
- equalizer.
Take a look at 4.7.2.6 Mixer Unit Descriptor of USB Audio 2.0 specs
Do the sound card work with alsa when you force the driver to skip build_mixer_unit_ctl() for unitid 10 ?
Can alsamixer change the 8 channels speaker playback volume control ?
You can add usb_audio_info to dump those values of the AudioControl Interface Descriptor with unitid 10
https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/sound/usb/...
for (; ich < num_ins; ich++) { int och, ich_has_controls = 0;
for (och = 0; och < num_outs; och++) { __u8 *c = uac_mixer_unit_bmControls(desc, state->mixer->protocol);
+ usb_audio_info(state->chip, " bmControls [%d,%d] : %x\n", ich, och, *c);
if (check_matrix_bitmap(c, ich, och, num_outs)) { ich_has_controls = 1; break; } }
+ if (state->chip->usb_id == USB_ID(0x1038,0x1225)) + if(unitid == 10) + ich_has_control = 0;
if (ich_has_controls) build_mixer_unit_ctl(state, desc, pin, ich, unitid, &iterm); } } return 0; }
>> > > >> > > > amixer: Control hw:2 element read error: Invalid argument >> > > > usb 1-1.3: 10:0: cannot get min/max values for control 3
(id 10)
>> > > > usb 1-1.3: 2:1: cannot get freq at ep 0x1
numid=5,iface=MIXER,name='PCM Volume' ;
type=INTEGER,access=rw------,values=2,min=0,max=1,step=0 amixer: Control hw:2 element read error: Invalid argument
numid=6,iface=MIXER,name='PCM Volume',index=1 ;
type=INTEGER,access=rw------,values=1,min=0,max=1,step=0 amixer: Control hw:2 element read error: Invalid argument
numid=7,iface=MIXER,name='PCM Volume',index=2 ;
type=INTEGER,access=rw------,values=1,min=0,max=1,step=0 amixer: Control hw:2 element read error: Invalid argument
numid=8,iface=MIXER,name='PCM Volume',index=3 ;
type=INTEGER,access=rw------,values=1,min=0,max=1,step=0 amixer: Control hw:2 element read error: Invalid argument
numid=9,iface=MIXER,name='PCM Volume',index=4 ;
type=INTEGER,access=rw------,values=1,min=0,max=1,step=0 amixer: Control hw:2 element read error: Invalid argument
In case this can be of any useful info, in the form of unknown controls
reported by the lsusb output, manufacturer software in other OS has controls for:
- dolby surround activation (off and on).
- microphone input volume (which works fine now) in snd_usb_audio
- microphone input "compression" (supposedly to keep input within certain
non distorting levels)
- input noise reduction (off and on too)
- micro retro feedback volume
- equalizer.
You need to find out the terminals of two inputs if you want to know the function of this mixer unit
bUnitID 10 bNrInPins 2 baSourceID( 0) 9 baSourceID( 1) 1
There are debug output in the system log when you compiled the driver with debug option
usb_audio_dbg(state->chip, "[%d] MU [%s] ch = %d, val = %d/%d\n", cval->head.id, kctl->id.name, cval->channels, cval->min, cval->max);
Is the suffix "Volume" correct since it may be just a mute switch ?
3.13.4 Mixer Unit The Mixer Unit (MU) transforms a number of logical input channels into a number of logical output channels. The input channels are grouped into one or more audio channel clusters. Each cluster enters the Mixer Unit through an Input Pin. The logical output channels are grouped into one audio channel cluster and leave the Mixer Unit through a single Output Pin. Every input channel can virtually be mixed into all of the output channels. If n is the total number of input ixer channels and m is the number of output channels, then there is a two-dimensional array (n · m) of M Controls in the Mixer Unit.
Not all of these Controls have to be physically implemented. Some Controls can have a fixed setting and be non-programmable.
The Mixer Unit Descriptor reports which Controls are programmable in the bmControls bitmap field. Using this model, a permanent connection can be implemente d by reporting the Control as non-programmable in the bmControls bitmap and by returning a nnection can be implemented by Control setting of 0 dB when requested. Likewise, a missing (muting) co reporting the Control as non-programmable in the bmControls bitmap and by returning a Control setting of –∞ dB. A Mixer Unit MUST respond to the appropriate Get Request to allow the Host to retrieve the actual settings on each of the (n · m) Mixer Controls.
4.7.2.6 Mixer Unit Descriptor
The bmMixerControls field stores the bit array row after row where the MSb of the first byte corresponds to the connection between input channel 1 and output channel 1. If (n · m) is not an integer multiple of 8, the bit array is padded with zeros until an integer number of bytes is occupied.
The number of bytes used to store the bit array, N, can be calculated as follows: IF ((n * m) MOD 8) <> 0 THEN N = ((n * m) DIV 8) + 1 ELSE N = ((n * m) DIV 8)
The bmControls field contains a set of bit pairs, indicating which Controls are present and what their capabilities are. If a Control is present, it must be Host readable. If a certain Control is not present then the bit pair must be set to 0b00. If a Control is present but read-only, the bit pair must be set to 0b01. If a Control is also Host programmable, the bit pair must be set to 0b11. The value 0b10 is not allowed.
For uac2
At location 11 + p + N
D1..0: Cluster Control D3..2: Underflow Control D5..4: Overflow Control D7..6: Reserved. Must be set to 0.
static void build_mixer_unit_ctl(struct mixer_build *state, struct uac_mixer_unit_descriptor *desc, int in_pin, int in_ch, int unitid, struct usb_audio_term *iterm) { struct usb_mixer_elem_info *cval; unsigned int num_outs = uac_mixer_unit_bNrChannels(desc); unsigned int i, len; struct snd_kcontrol *kctl; const struct usbmix_name_map *map;
map = find_map(state, unitid, 0); if (check_ignored_ctl(map)) return;
cval = kzalloc(sizeof(*cval), GFP_KERNEL); if (!cval) return;
snd_usb_mixer_elem_init_std(&cval->head, state->mixer, unitid); cval->control = in_ch + 1; /* based on 1 */ cval->val_type = USB_MIXER_S16; for (i = 0; i < num_outs; i++) { __u8 *c = uac_mixer_unit_bmControls(desc, state->mixer->protocol);
if (check_matrix_bitmap(c, in_ch, i, num_outs)) { cval->cmask |= (1 << i); cval->channels++; } }
/* get min/max values */ get_min_max(cval, 0);
kctl = snd_ctl_new1(&usb_feature_unit_ctl, cval); if (!kctl) { usb_audio_err(state->chip, "cannot malloc kcontrol\n"); kfree(cval); return; } kctl->private_free = snd_usb_mixer_elem_free;
len = check_mapped_name(map, kctl->id.name, sizeof(kctl->id.name)); if (!len) len = get_term_name(state, iterm, kctl->id.name, sizeof(kctl->id.name), 0); if (!len) len = sprintf(kctl->id.name, "Mixer Source %d", in_ch + 1); append_ctl_name(kctl, " Volume");
usb_audio_dbg(state->chip, "[%d] MU [%s] ch = %d, val = %d/%d\n", cval->head.id, kctl->id.name, cval->channels, cval->min, cval->max); snd_usb_mixer_add_control(&cval->head, kctl); }
2015-03-14 7:10 GMT+01:00 Raymond Yau superquad.vortex2@gmail.com:
> >> > > > >> > > > amixer: Control hw:2 element read error: Invalid argument > >> > > > usb 1-1.3: 10:0: cannot get min/max values for control 3
(id 10)
> >> > > > usb 1-1.3: 2:1: cannot get freq at ep 0x1 > > numid=5,iface=MIXER,name='PCM Volume' ;
type=INTEGER,access=rw------,values=2,min=0,max=1,step=0 amixer: Control hw:2 element read error: Invalid argument
> > numid=6,iface=MIXER,name='PCM Volume',index=1 ;
type=INTEGER,access=rw------,values=1,min=0,max=1,step=0 amixer: Control hw:2 element read error: Invalid argument
> > numid=7,iface=MIXER,name='PCM Volume',index=2 ;
type=INTEGER,access=rw------,values=1,min=0,max=1,step=0 amixer: Control hw:2 element read error: Invalid argument
> > numid=8,iface=MIXER,name='PCM Volume',index=3 ;
type=INTEGER,access=rw------,values=1,min=0,max=1,step=0 amixer: Control hw:2 element read error: Invalid argument
> > numid=9,iface=MIXER,name='PCM Volume',index=4 ;
type=INTEGER,access=rw------,values=1,min=0,max=1,step=0 amixer: Control hw:2 element read error: Invalid argument
>
In case this can be of any useful info, in the form of unknown controls
reported by the lsusb output, manufacturer software in other OS has controls for:
- dolby surround activation (off and on).
- microphone input volume (which works fine now) in snd_usb_audio
- microphone input "compression" (supposedly to keep input within
certain non distorting levels)
- input noise reduction (off and on too)
- micro retro feedback volume
- equalizer.
You need to find out the terminals of two inputs if you want to know the function of this mixer unit
bUnitID 10 bNrInPins 2 baSourceID( 0) 9 baSourceID( 1) 1
There are debug output in the system log when you compiled the driver with debug option
usb_audio_dbg(state->chip, "[%d] MU [%s] ch = %d, val = %d/%d\n", cval->head.id, kctl->id.name, cval->channels, cval->min, cval->max);
Is the suffix "Volume" correct since it may be just a mute switch ?
3.13.4 Mixer Unit The Mixer Unit (MU) transforms a number of logical input channels into a number of logical output channels. The input channels are grouped into one or more audio channel clusters. Each cluster enters the Mixer Unit through an Input Pin. The logical output channels are grouped into one audio channel cluster and leave the Mixer Unit through a single Output Pin. Every input channel can virtually be mixed into all of the output channels. If n is the total number of input ixer channels and m is the number of output channels, then there is a two-dimensional array (n · m) of M Controls in the Mixer Unit.
Not all of these Controls have to be physically implemented. Some Controls can have a fixed setting and be non-programmable.
The Mixer Unit Descriptor reports which Controls are programmable in the bmControls bitmap field. Using this model, a permanent connection can be implemente d by reporting the Control as non-programmable in the bmControls bitmap and by returning a nnection can be implemented by Control setting of 0 dB when requested. Likewise, a missing (muting) co reporting the Control as non-programmable in the bmControls bitmap and by returning a Control setting of –∞ dB. A Mixer Unit MUST respond to the appropriate Get Request to allow the Host to retrieve the actual settings on each of the (n · m) Mixer Controls.
4.7.2.6 Mixer Unit Descriptor
The bmMixerControls field stores the bit array row after row where the MSb of the first byte corresponds to the connection between input channel 1 and output channel 1. If (n · m) is not an integer multiple of 8, the bit array is padded with zeros until an integer number of bytes is occupied.
The number of bytes used to store the bit array, N, can be calculated as follows: IF ((n * m) MOD 8) <> 0 THEN N = ((n * m) DIV 8) + 1 ELSE N = ((n * m) DIV 8)
The bmControls field contains a set of bit pairs, indicating which Controls are present and what their capabilities are. If a Control is present, it must be Host readable. If a certain Control is not present then the bit pair must be set to 0b00. If a Control is present but read-only, the bit pair must be set to 0b01. If a Control is also Host programmable, the bit pair must be set to 0b11. The value 0b10 is not allowed.
For uac2
At location 11 + p + N
D1..0: Cluster Control D3..2: Underflow Control D5..4: Overflow Control D7..6: Reserved. Must be set to 0.
static void build_mixer_unit_ctl(struct mixer_build *state, struct uac_mixer_unit_descriptor *desc, int in_pin, int in_ch, int unitid, struct usb_audio_term *iterm) { struct usb_mixer_elem_info *cval; unsigned int num_outs = uac_mixer_unit_bNrChannels(desc); unsigned int i, len; struct snd_kcontrol *kctl; const struct usbmix_name_map *map;
map = find_map(state, unitid, 0); if (check_ignored_ctl(map)) return;
cval = kzalloc(sizeof(*cval), GFP_KERNEL); if (!cval) return;
snd_usb_mixer_elem_init_std(&cval->head, state->mixer, unitid); cval->control = in_ch + 1; /* based on 1 */ cval->val_type = USB_MIXER_S16; for (i = 0; i < num_outs; i++) { __u8 *c = uac_mixer_unit_bmControls(desc, state->mixer->protocol);
if (check_matrix_bitmap(c, in_ch, i, num_outs)) { cval->cmask |= (1 << i); cval->channels++; } }
/* get min/max values */ get_min_max(cval, 0);
kctl = snd_ctl_new1(&usb_feature_unit_ctl, cval); if (!kctl) { usb_audio_err(state->chip, "cannot malloc kcontrol\n"); kfree(cval); return; } kctl->private_free = snd_usb_mixer_elem_free;
len = check_mapped_name(map, kctl->id.name, sizeof(kctl->id.name)); if (!len) len = get_term_name(state, iterm, kctl->id.name, sizeof(kctl->id.name), 0); if (!len) len = sprintf(kctl->id.name, "Mixer Source %d", in_ch + 1); append_ctl_name(kctl, " Volume");
usb_audio_dbg(state->chip, "[%d] MU [%s] ch = %d, val = %d/%d\n", cval->head.id, kctl->id.name, cval->channels, cval->min, cval->max); snd_usb_mixer_add_control(&cval->head, kctl); }
Hello,
The device has 3 inputs as you will see in the picture I attach.
Two analog inputs and 1 digital:
* Analog micro * Analog headphones * USB input <-- This is how the headphones are plugged to have dolby surround enabled and some of illuminations settings (the headphones can have multiple illumination colors, I mention this as means to be able to identify possible unknown switches the device may have).
--
I also tried with your mixer.c modifications and definetly my knowledge right now is not enough to get it to compile correctly, even under 4.0rc3 kernel, dumps many errors: In file included from include/linux/usb.h:18:0, from sound/usb/mixer.c:50: sound/usb/mixer.c: In function ‘build_mixer_unit_ctl’: sound/usb/mixer.c:1536:61: error: ‘ich’ undeclared (first use in this function) usb_audio_info(state->chip, " bmControls [%d,%d] : %x\n", ich, och, *c); ^ include/linux/device.h:1107:58: note: in definition of macro ‘dev_info’ #define dev_info(dev, fmt, arg...) _dev_info(dev, fmt, ##arg) ^ sound/usb/mixer.c:1536:3: note: in expansion of macro ‘usb_audio_info’ usb_audio_info(state->chip, " bmControls [%d,%d] : %x\n", ich, och, *c); ^ sound/usb/mixer.c:1536:61: note: each undeclared identifier is reported only once for each function it appears in usb_audio_info(state->chip, " bmControls [%d,%d] : %x\n", ich, och, *c); ^ include/linux/device.h:1107:58: note: in definition of macro ‘dev_info’ #define dev_info(dev, fmt, arg...) _dev_info(dev, fmt, ##arg) ^ sound/usb/mixer.c:1536:3: note: in expansion of macro ‘usb_audio_info’ usb_audio_info(state->chip, " bmControls [%d,%d] : %x\n", ich, och, *c); ^ sound/usb/mixer.c:1536:66: error: ‘och’ undeclared (first use in this function) usb_audio_info(state->chip, " bmControls [%d,%d] : %x\n", ich, och, *c); ^ include/linux/device.h:1107:58: note: in definition of macro ‘dev_info’ #define dev_info(dev, fmt, arg...) _dev_info(dev, fmt, ##arg) ^ sound/usb/mixer.c:1536:3: note: in expansion of macro ‘usb_audio_info’ usb_audio_info(state->chip, " bmControls [%d,%d] : %x\n", ich, och, *c); ^ sound/usb/mixer.c: In function ‘parse_audio_mixer_unit’: sound/usb/mixer.c:1616:6: error: ‘ich_has_control’ undeclared (first use in this function) ich_has_control = 0; ^ sound/usb/mixer.c:1619:8: error: ‘ich_has_controls’ undeclared (first use in this function) if (ich_has_controls) ^ sound/usb/mixer.c: At top level: sound/usb/mixer.c:1623:2: error: expected identifier or ‘(’ before ‘}’ token } ^ sound/usb/mixer.c:1624:2: error: expected identifier or ‘(’ before ‘return’ return 0; ^ sound/usb/mixer.c:1625:1: error: expected identifier or ‘(’ before ‘}’ token } ^ sound/usb/mixer.c: In function ‘parse_audio_mixer_unit’: sound/usb/mixer.c:1622:3: warning: control reaches end of non-void function [-Wreturn-type] } ^
Should you need anything else I'll try my best.
The device has 3 inputs as you will see in the picture I attach.
Two analog inputs and 1 digital:
- Analog micro
- Analog headphones
- USB input <-- This is how the headphones are plugged to have dolby
surround enabled and some of illuminations settings (the headphones can have multiple illumination colors, I mention this as means to be able to identify possible unknown switches the device may have).
Seem two inputs of Mixer Unit are USB streaming (Terminal 1) and Microphone(Terminal 8),
output is Speaker (Terminal 3) through Feature Unit (UnitID 2) with "Speaker Playback Volume"
This look like control in MU is "Microphone Playback Switch"
bDescriptorType 36 bDescriptorSubtype 2 (INPUT_TERMINAL) bTerminalID 1 wTerminalType 0x0101 USB Streaming
bDescriptorType 36 bDescriptorSubtype 6 (FEATURE_UNIT) bUnitID 2 bSourceID 10
bDescriptorType 36 bDescriptorSubtype 3 (OUTPUT_TERMINAL) bTerminalID 3 wTerminalType 0x0301 Speaker bAssocTerminal 0 bSourceID 2
bDescriptorType 36 bDescriptorSubtype 3 (OUTPUT_TERMINAL) bTerminalID 4 wTerminalType 0x0101 USB Streaming
bDescriptorType 36 bDescriptorSubtype 5 (SELECTOR_UNIT) bUnitID 5 bNrInPins 1 baSource( 0) 6
bDescriptorType 36 bDescriptorSubtype 6 (FEATURE_UNIT) bUnitID 6 bSourceID 7
bDescriptorType 36 bDescriptorSubtype 2 (INPUT_TERMINAL) bTerminalID 7 wTerminalType 0x0201 Microphone
bDescriptorType 36 bDescriptorSubtype 2 (INPUT_TERMINAL) bTerminalID 8 wTerminalType 0x0201 Microphone
bDescriptorType 36 bDescriptorSubtype 6 (FEATURE_UNIT) bUnitID 9 bSourceID 8
bDescriptorType 36 bDescriptorSubtype 4 (MIXER_UNIT) Warning: Descriptor too short bUnitID 10 bNrInPins 2 baSourceID( 0) 9 baSourceID( 1) 1
participants (2)
-
Daniel
-
Raymond Yau