All of lore.kernel.org
 help / color / mirror / Atom feed
* snd_usb_audio - siberia elite prism soundcard issues
@ 2015-03-08 18:30 Daniel
  2015-03-08 19:02 ` Clemens Ladisch
  0 siblings, 1 reply; 14+ messages in thread
From: Daniel @ 2015-03-08 18:30 UTC (permalink / raw)
  To: alsa-devel

Hello,

First of all, since this is my first message I hope am not mistaken
reporting this two issues about this piece of hardware  (I was pointed here
by alsa irc support channel) and bug tracker url does not seem to work, so
I decided to post it here.

Problem: Errors with mixer controls, breaking alsamixer, and not working
7.1 support.

Scenario: Siberia Elite Prism soundcard supports 7.1 channels but it seems
it can only play FRONT LEFT and FRONT RIGHT channels, no matter the setup.


Here is the alsa-info script output:
http://www.alsa-project.org/db/?f=301e6045129665d086d2571652c62648de0eac99


Additionally:

aplay -L output:
front:CARD=Elite,DEV=0
    SteelSeries Siberia Elite, USB Audio
    Front speakers
surround40:CARD=Elite,DEV=0
    SteelSeries Siberia Elite, USB Audio
    4.0 Surround output to Front and Rear speakers
surround41:CARD=Elite,DEV=0
    SteelSeries Siberia Elite, USB Audio
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Elite,DEV=0
    SteelSeries Siberia Elite, USB Audio
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Elite,DEV=0
    SteelSeries Siberia Elite, USB Audio
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Elite,DEV=0
    SteelSeries Siberia Elite, USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Elite,DEV=0
    SteelSeries Siberia Elite, USB Audio
    IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=Elite,DEV=0
    SteelSeries Siberia Elite, USB Audio
    Direct sample mixing device
dsnoop:CARD=Elite,DEV=0
    SteelSeries Siberia Elite, USB Audio
    Direct sample snooping device
hw:CARD=Elite,DEV=0
    SteelSeries Siberia Elite, USB Audio
    Direct hardware device without any conversions
plughw:CARD=Elite,DEV=0
    SteelSeries Siberia Elite, USB Audio
    Hardware device with all software conversions



and amixer output for this device:

# for i in {1..32}; do amixer -cElite cget numid=$i; done
numid=1,iface=PCM,name='Capture Channel Map'
  ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0
  : values=0,0
  |     | chmap-fixed=FL,FR

numid=2,iface=PCM,name='Playback Channel Map'
  ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0
  : values=0,0
  |     | chmap-fixed=FL,FR

numid=3,iface=MIXER,name='Sidetone Playback Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=4,iface=MIXER,name='Sidetone Playback Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=56,step=0
  : values=0
  | dBminmax-min=-74.00dB,max=-18.00dB
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

numid=10,iface=MIXER,name='Speaker Playback Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=11,iface=MIXER,name='Speaker Playback Volume'
  ; type=INTEGER,access=rw---R--,values=8,min=0,max=74,step=0
  : values=54,54,54,54,54,54,54,54
  | dBminmax-min=-74.00dB,max=0.00dB
numid=12,iface=MIXER,name='Mic Capture Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=13,iface=MIXER,name='Mic Capture Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=74,step=0
  : values=73,73
  | dBminmax-min=-74.00dB,max=0.00dB
amixer: Cannot find the given element from control hw:2

amixer: Cannot find the given element from control hw:2

amixer: Cannot find the given element from control hw:2

amixer: Cannot find the given element from control hw:2

amixer: Cannot find the given element from control hw:2

amixer: Cannot find the given element from control hw:2

amixer: Cannot find the given element from control hw:2

amixer: Cannot find the given element from control hw:2

amixer: Cannot find the given element from control hw:2

amixer: Cannot find the given element from control hw:2

amixer: Cannot find the given element from control hw:2

amixer: Cannot find the given element from control hw:2

amixer: Cannot find the given element from control hw:2

amixer: Cannot find the given element from control hw:2

amixer: Cannot find the given element from control hw:2

amixer: Cannot find the given element from control hw:2

amixer: Cannot find the given element from control hw:2

amixer: Cannot find the given element from control hw:2

amixer: Cannot find the given element from control hw:2



And hw-params from aplay:

aplay --dump-hw-params -d1 -Dhw:Elite /dev/zero
Playing raw data '/dev/zero' : Unsigned 8 bit, Rate 8000 Hz, Mono
HW Params of device "hw:Elite":
--------------------
ACCESS:  MMAP_INTERLEAVED RW_INTERLEAVED
FORMAT:  S16_LE S24_3LE
SUBFORMAT:  STD
SAMPLE_BITS: [16 24]
FRAME_BITS: [32 192]
CHANNELS: [2 8]
RATE: [8000 96000]
PERIOD_TIME: [1000 16384000]
PERIOD_SIZE: [8 131072]
PERIOD_BYTES: [64 524288]
PERIODS: [2 1024]
BUFFER_TIME: (166 32768000]
BUFFER_SIZE: [16 262144]
BUFFER_BYTES: [64 1048576]
TICK_TIME: ALL
--------------------
aplay: set_params:1233: Sample format non available
Available formats:
- S16_LE
- S24_3LE

Also in syslog I often can see messages related to this device:
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


Loading alsamixer and trying to select the soundcard exits the program with
this message:
cannot load mixer controls: Invalid argument


If anyone wants to check this issue, should you need any type of info
regarding this, please do not hesitate asking, I will post anything you
require.


PS: I don't think it is really necessary to say either but I don't expect
anyone to force-commit to this either, I mainly want to know if there is a
solution to this or if reporting this issue I can help to get it fixed.
Thanks for your time.


-- 
*Daniel Ferradal*

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: snd_usb_audio - siberia elite prism soundcard issues
  2015-03-08 18:30 snd_usb_audio - siberia elite prism soundcard issues Daniel
@ 2015-03-08 19:02 ` Clemens Ladisch
  2015-03-08 19:28   ` Daniel
  0 siblings, 1 reply; 14+ messages in thread
From: Clemens Ladisch @ 2015-03-08 19:02 UTC (permalink / raw)
  To: Daniel, alsa-devel

Daniel wrote:
> numid=1,iface=PCM,name='Capture Channel Map'
>   ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0
>   : values=0,0
>   |     | chmap-fixed=FL,FR
> numid=2,iface=PCM,name='Playback Channel Map'
>   ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0
>   : values=0,0
>   |     | chmap-fixed=FL,FR

This device reports that it supports two channels.
What makes you think that you can play eight channels?

> 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

These are bugs in the device firmware.  However, the driver could
handle them better.


Regards,
Clemens

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: snd_usb_audio - siberia elite prism soundcard issues
  2015-03-08 19:02 ` Clemens Ladisch
@ 2015-03-08 19:28   ` Daniel
  2015-03-09  4:11     ` Raymond Yau
  0 siblings, 1 reply; 14+ messages in thread
From: Daniel @ 2015-03-08 19:28 UTC (permalink / raw)
  To: Clemens Ladisch; +Cc: alsa-devel

2015-03-08 20:02 GMT+01:00 Clemens Ladisch <clemens@ladisch.de>:

> Daniel wrote:
> > numid=1,iface=PCM,name='Capture Channel Map'
> >   ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0
> >   : values=0,0
> >   |     | chmap-fixed=FL,FR
> > numid=2,iface=PCM,name='Playback Channel Map'
> >   ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0
> >   : values=0,0
> >   |     | chmap-fixed=FL,FR
>
> This device reports that it supports two channels.
> What makes you think that you can play eight channels?
>
> > 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
>
> These are bugs in the device firmware.  However, the driver could
> handle them better.
>
>
> Regards,
> Clemens
>


Hello,

Forgive my ignorance if I'm totally wrong, what made me think that is 7.1
capable is:

The headset is made to emulate 7.1 sound in headphones, that it does
through the sound card it provides.

Also the aplay output...

aplay --dump-hw-params returns  CHANNELS: [2 8]

and "aplay -L" output also reports:
surround71:CARD=Elite,DEV=0
    SteelSeries Siberia Elite, USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers


With the manufacturer driver under other OS's you do select 7.1 setup and
then you plug the specific headphones to the soundcard and can hear the
surround sound, but I don't mean to compare though, just that it also made
me believe this hardware supports 7.1


Thanks for your time.

-- 
*Daniel Ferradal*

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: snd_usb_audio - siberia elite prism soundcard issues
  2015-03-08 19:28   ` Daniel
@ 2015-03-09  4:11     ` Raymond Yau
  2015-03-09 17:44       ` Daniel
  0 siblings, 1 reply; 14+ messages in thread
From: Raymond Yau @ 2015-03-09  4:11 UTC (permalink / raw)
  To: Daniel; +Cc: ALSA Development Mailing List, Clemens Ladisch

>
> > Daniel wrote:
> > > numid=1,iface=PCM,name='Capture Channel Map'
> > >   ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0
> > >   : values=0,0
> > >   |     | chmap-fixed=FL,FR
> > > numid=2,iface=PCM,name='Playback Channel Map'
> > >   ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0
> > >   : values=0,0
> > >   |     | chmap-fixed=FL,FR
> >
> > This device reports that it supports two channels.
> > What makes you think that you can play eight channels?
> >
> > > 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
> >
> > These are bugs in the device firmware.  However, the driver could
> > handle them better.
> >
> >
>
>
> Forgive my ignorance if I'm totally wrong, what made me think that is 7.1
> capable is:
>
> The headset is made to emulate 7.1 sound in headphones, that it does
> through the sound card it provides.
>
> Also the aplay output...
>
> aplay --dump-hw-params returns  CHANNELS: [2 8]
>
> and "aplay -L" output also reports:
> surround71:CARD=Elite,DEV=0
>     SteelSeries Siberia Elite, USB Audio
>     7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
>
>
> With the manufacturer driver under other OS's you do select 7.1 setup and
> then you plug the specific headphones to the soundcard and can hear the
> surround sound, but I don't mean to compare though, just that it also made
> me believe this hardware supports 7.1
>
>
numid=11,iface=MIXER,name='Speaker Playback Volume' ;
type=INTEGER,access=rw---R--,values=8,min=0,max=74,step=0 :
values=54,54,54,54,54,54,54,54 | dBminmax-min=-74.00dB,max=0.00dB

You need workaround since pulseaudio don't like volume control with more
than two channels

https://bugs.freedesktop.org/show_bug.cgi?id=84983#c35

Can you post output of your usb audio device ?

lsusb -vvvv

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: snd_usb_audio - siberia elite prism soundcard issues
  2015-03-09  4:11     ` Raymond Yau
@ 2015-03-09 17:44       ` Daniel
       [not found]         ` <CAN8cciaMGdGtqTJrHV8q1_5vgpM2qXRK7XRAdiiqR7SKhVCb8Q@mail.gmail.com>
  2015-03-19  5:05         ` Raymond Yau
  0 siblings, 2 replies; 14+ messages in thread
From: Daniel @ 2015-03-09 17:44 UTC (permalink / raw)
  To: Raymond Yau; +Cc: ALSA Development Mailing List, Clemens Ladisch

2015-03-09 5:11 GMT+01:00 Raymond Yau <superquad.vortex2@gmail.com>:

> >
> > > Daniel wrote:
> > > > numid=1,iface=PCM,name='Capture Channel Map'
> > > >   ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0
> > > >   : values=0,0
> > > >   |     | chmap-fixed=FL,FR
> > > > numid=2,iface=PCM,name='Playback Channel Map'
> > > >   ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0
> > > >   : values=0,0
> > > >   |     | chmap-fixed=FL,FR
> > >
> > > This device reports that it supports two channels.
> > > What makes you think that you can play eight channels?
> > >
> > > > 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
> > >
> > > These are bugs in the device firmware.  However, the driver could
> > > handle them better.
> > >
> > >
> >
> >
> > Forgive my ignorance if I'm totally wrong, what made me think that is 7.1
> > capable is:
> >
> > The headset is made to emulate 7.1 sound in headphones, that it does
> > through the sound card it provides.
> >
> > Also the aplay output...
> >
> > aplay --dump-hw-params returns  CHANNELS: [2 8]
> >
> > and "aplay -L" output also reports:
> > surround71:CARD=Elite,DEV=0
> >     SteelSeries Siberia Elite, USB Audio
> >     7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
> >
> >
> > With the manufacturer driver under other OS's you do select 7.1 setup and
> > then you plug the specific headphones to the soundcard and can hear the
> > surround sound, but I don't mean to compare though, just that it also
> made
> > me believe this hardware supports 7.1
> >
> >
> numid=11,iface=MIXER,name='Speaker Playback Volume' ;
> type=INTEGER,access=rw---R--,values=8,min=0,max=74,step=0 :
> values=54,54,54,54,54,54,54,54 | dBminmax-min=-74.00dB,max=0.00dB
>
> You need workaround since pulseaudio don't like volume control with more
> than two channels
>
> https://bugs.freedesktop.org/show_bug.cgi?id=84983#c35
>
> Can you post output of your usb audio device ?
>
> lsusb -vvvv
>


Certainly!

Here it is:

Bus 001 Device 003: ID 1038:1225 Ideazon, Inc.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x1038 Ideazon, Inc.
  idProduct          0x1225
  bcdDevice            0.03
  iManufacturer           1 SteelSeries
  iProduct                2 SteelSeries Siberia Elite
  iSerial                 3 000000000000
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          471
    bNumInterfaces          4
    bConfigurationValue     1
    iConfiguration          4 USB Audio Device
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              200mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      1 Control Device
      bInterfaceProtocol      0
      iInterface              0
      AudioControl Interface Descriptor:
        bLength                10
        bDescriptorType        36
        bDescriptorSubtype      1 (HEADER)
        bcdADC               1.00
        wTotalLength          120
        bInCollection           2
        baInterfaceNr( 0)       1
        baInterfaceNr( 1)       2
      AudioControl Interface Descriptor:
        bLength                12
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             1
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          0
        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
        iTerminal               0
      AudioControl Interface Descriptor:
        bLength                16
        bDescriptorType        36
        bDescriptorSubtype      6 (FEATURE_UNIT)
        bUnitID                 2
        bSourceID              10
        bControlSize            1
        bmaControls( 0)      0x01
          Mute Control
        bmaControls( 1)      0x02
          Volume Control
        bmaControls( 2)      0x02
          Volume Control
        bmaControls( 3)      0x02
          Volume Control
        bmaControls( 4)      0x02
          Volume Control
        bmaControls( 5)      0x02
          Volume Control
        bmaControls( 6)      0x02
          Volume Control
        bmaControls( 7)      0x02
          Volume Control
        bmaControls( 8)      0x02
          Volume Control
        iFeature                0
      AudioControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID             3
        wTerminalType      0x0301 Speaker
        bAssocTerminal          0
        bSourceID               2
        iTerminal               0
      AudioControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID             4
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          0
        bSourceID               5
        iTerminal               0
      AudioControl Interface Descriptor:
        bLength                 7
        bDescriptorType        36
        bDescriptorSubtype      5 (SELECTOR_UNIT)
        bUnitID                 5
        bNrInPins               1
        baSource( 0)            6
        iSelector               0
      AudioControl Interface Descriptor:
        bLength                10
        bDescriptorType        36
        bDescriptorSubtype      6 (FEATURE_UNIT)
        bUnitID                 6
        bSourceID               7
        bControlSize            1
        bmaControls( 0)      0x01
          Mute Control
        bmaControls( 1)      0x02
          Volume Control
        bmaControls( 2)      0x02
          Volume Control
        iFeature                0
      AudioControl Interface Descriptor:
        bLength                12
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             7
        wTerminalType      0x0201 Microphone
        bAssocTerminal          0
        bNrChannels             2
        wChannelConfig     0x0003
          Left Front (L)
          Right Front (R)
        iChannelNames           0
        iTerminal               0
      AudioControl Interface Descriptor:
        bLength                12
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             8
        wTerminalType      0x0201 Microphone
        bAssocTerminal          0
        bNrChannels             2
        wChannelConfig     0x0003
          Left Front (L)
          Right Front (R)
        iChannelNames           0
        iTerminal               5 Sidetone
      AudioControl Interface Descriptor:
        bLength                10
        bDescriptorType        36
        bDescriptorSubtype      6 (FEATURE_UNIT)
        bUnitID                 9
        bSourceID               8
        bControlSize            1
        bmaControls( 0)      0x03
          Mute Control
          Volume Control
        bmaControls( 1)      0x00
        bmaControls( 2)      0x00
        iFeature                0
      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)
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol      0
      iInterface              0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol      0
      iInterface              0
      AudioStreaming Interface Descriptor:
        bLength                 7
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink           4
        bDelay                  3 frames
        wFormatTag              1 PCM
      AudioStreaming Interface Descriptor:
        bLength                11
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bNrChannels             2
        bSubframeSize           2
        bBitResolution         16
        bSamFreqType            1 Discrete
        tSamFreq[ 0]        16000
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            9
          Transfer Type            Isochronous
          Synch Type               Adaptive
          Usage Type               Data
        wMaxPacketSize     0x0044  1x 68 bytes
        bInterval               1
        bRefresh                0
        bSynchAddress           0
        AudioControl Endpoint Descriptor:
          bLength                 7
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x00
          bLockDelayUnits         1 Milliseconds
          wLockDelay              4 Milliseconds
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       2
      bNumEndpoints           1
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol      0
      iInterface              0
      AudioStreaming Interface Descriptor:
        bLength                 7
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink           4
        bDelay                  3 frames
        wFormatTag              1 PCM
      AudioStreaming Interface Descriptor:
        bLength                11
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bNrChannels             2
        bSubframeSize           3
        bBitResolution         24
        bSamFreqType            1 Discrete
        tSamFreq[ 0]        16000
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            9
          Transfer Type            Isochronous
          Synch Type               Adaptive
          Usage Type               Data
        wMaxPacketSize     0x0066  1x 102 bytes
        bInterval               1
        bRefresh                0
        bSynchAddress           0
        AudioControl Endpoint Descriptor:
          bLength                 7
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x00
          bLockDelayUnits         1 Milliseconds
          wLockDelay              4 Milliseconds
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol      0
      iInterface              0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol      0
      iInterface              0
      AudioStreaming Interface Descriptor:
        bLength                 7
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink           1
        bDelay                  3 frames
        wFormatTag              1 PCM
      AudioStreaming Interface Descriptor:
        bLength                38
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bNrChannels             2
        bSubframeSize           2
        bBitResolution         16
        bSamFreqType           10 Discrete
        tSamFreq[ 0]         8000
        tSamFreq[ 1]        11025
        tSamFreq[ 2]        16000
        tSamFreq[ 3]        22050
        tSamFreq[ 4]        24000
        tSamFreq[ 5]        32000
        tSamFreq[ 6]        44100
        tSamFreq[ 7]        48000
        tSamFreq[ 8]        88200
        tSamFreq[ 9]        96000
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            9
          Transfer Type            Isochronous
          Synch Type               Adaptive
          Usage Type               Data
        wMaxPacketSize     0x0180  1x 384 bytes
        bInterval               1
        bRefresh                0
        bSynchAddress           0
        AudioControl Endpoint Descriptor:
          bLength                 7
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x01
            Sampling Frequency
          bLockDelayUnits         1 Milliseconds
          wLockDelay              4 Milliseconds
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       2
      bNumEndpoints           1
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol      0
      iInterface              0
      AudioStreaming Interface Descriptor:
        bLength                 7
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink           1
        bDelay                  3 frames
        wFormatTag              1 PCM
      AudioStreaming Interface Descriptor:
        bLength                38
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bNrChannels             2
        bSubframeSize           3
        bBitResolution         24
        bSamFreqType           10 Discrete
        tSamFreq[ 0]         8000
        tSamFreq[ 1]        11025
        tSamFreq[ 2]        16000
        tSamFreq[ 3]        22050
        tSamFreq[ 4]        24000
        tSamFreq[ 5]        32000
        tSamFreq[ 6]        44100
        tSamFreq[ 7]        48000
        tSamFreq[ 8]        88200
        tSamFreq[ 9]        96000
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            9
          Transfer Type            Isochronous
          Synch Type               Adaptive
          Usage Type               Data
        wMaxPacketSize     0x0240  1x 576 bytes
        bInterval               1
        bRefresh                0
        bSynchAddress           0
        AudioControl Endpoint Descriptor:
          bLength                 7
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x01
            Sampling Frequency
          bLockDelayUnits         1 Milliseconds
          wLockDelay              4 Milliseconds
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       3
      bNumEndpoints           1
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol      0
      iInterface              0
      AudioStreaming Interface Descriptor:
        bLength                 7
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink           1
        bDelay                  3 frames
        wFormatTag              1 PCM
      AudioStreaming Interface Descriptor:
        bLength                32
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bNrChannels             8
        bSubframeSize           2
        bBitResolution         16
        bSamFreqType            8 Discrete
        tSamFreq[ 0]         8000
        tSamFreq[ 1]        11025
        tSamFreq[ 2]        16000
        tSamFreq[ 3]        22050
        tSamFreq[ 4]        24000
        tSamFreq[ 5]        32000
        tSamFreq[ 6]        44100
        tSamFreq[ 7]        48000
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            9
          Transfer Type            Isochronous
          Synch Type               Adaptive
          Usage Type               Data
        wMaxPacketSize     0x0300  1x 768 bytes
        bInterval               1
        bRefresh                0
        bSynchAddress           0
        AudioControl Endpoint Descriptor:
          bLength                 7
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x01
            Sampling Frequency
          bLockDelayUnits         1 Milliseconds
          wLockDelay              4 Milliseconds
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        3
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              0
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      26
         Report Descriptors:
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
Device Status:     0x0000
  (Bus Powered)



Thank you


-- 
*Daniel Ferradal*

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: snd_usb_audio - siberia elite prism soundcard issues
       [not found]               ` <CAHti5NF8G7iArtC_cN_WA2EFRpwGe8rMmVRHvKtrKNHpuEK46A@mail.gmail.com>
@ 2015-03-12  1:10                 ` Raymond Yau
  2015-03-13 11:52                   ` Daniel
  0 siblings, 1 reply; 14+ messages in thread
From: Raymond Yau @ 2015-03-12  1:10 UTC (permalink / raw)
  To: Daniel; +Cc: tiwai, ALSA Development Mailing List, Clemens Ladisch

>> >>
>> >> >> > >
>> >> >> > > > 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;
>> }
>
>
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: snd_usb_audio - siberia elite prism soundcard issues
  2015-03-12  1:10                 ` Raymond Yau
@ 2015-03-13 11:52                   ` Daniel
  2015-03-13 13:51                     ` Raymond Yau
  2015-03-14  6:10                     ` Raymond Yau
  0 siblings, 2 replies; 14+ messages in thread
From: Daniel @ 2015-03-13 11:52 UTC (permalink / raw)
  To: Raymond Yau; +Cc: tiwai, ALSA Development Mailing List, Clemens Ladisch

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.

-- 
*Daniel Ferradal*
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: snd_usb_audio - siberia elite prism soundcard issues
  2015-03-13 11:52                   ` Daniel
@ 2015-03-13 13:51                     ` Raymond Yau
  2015-03-14  6:10                     ` Raymond Yau
  1 sibling, 0 replies; 14+ messages in thread
From: Raymond Yau @ 2015-03-13 13:51 UTC (permalink / raw)
  To: Daniel; +Cc: tiwai, ALSA Development Mailing List, Clemens Ladisch

>> >> >>
>> >> >> >       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/mixer.c

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;
}
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: snd_usb_audio - siberia elite prism soundcard issues
  2015-03-13 11:52                   ` Daniel
  2015-03-13 13:51                     ` Raymond Yau
@ 2015-03-14  6:10                     ` Raymond Yau
  2015-03-14 14:33                       ` Daniel
  1 sibling, 1 reply; 14+ messages in thread
From: Raymond Yau @ 2015-03-14  6:10 UTC (permalink / raw)
  To: Daniel; +Cc: tiwai, ALSA Development Mailing List, Clemens Ladisch

>> >> >> >> > >
>> >> >> >> > > > 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);
}
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: snd_usb_audio - siberia elite prism soundcard issues
  2015-03-14  6:10                     ` Raymond Yau
@ 2015-03-14 14:33                       ` Daniel
  2015-03-15  0:25                         ` Raymond Yau
  0 siblings, 1 reply; 14+ messages in thread
From: Daniel @ 2015-03-14 14:33 UTC (permalink / raw)
  To: Raymond Yau; +Cc: tiwai, ALSA Development Mailing List, Clemens Ladisch

[-- Attachment #1: Type: text/plain, Size: 10012 bytes --]

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.


-- 
*Daniel Ferradal*

[-- Attachment #2: siberia-elite-prism-soundcard.jpg --]
[-- Type: image/jpeg, Size: 127333 bytes --]

[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: snd_usb_audio - siberia elite prism soundcard issues
  2015-03-14 14:33                       ` Daniel
@ 2015-03-15  0:25                         ` Raymond Yau
  0 siblings, 0 replies; 14+ messages in thread
From: Raymond Yau @ 2015-03-15  0:25 UTC (permalink / raw)
  To: Daniel; +Cc: tiwai, ALSA Development Mailing List, Clemens Ladisch

>
>
> 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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: snd_usb_audio - siberia elite prism soundcard issues
  2015-03-09 17:44       ` Daniel
       [not found]         ` <CAN8cciaMGdGtqTJrHV8q1_5vgpM2qXRK7XRAdiiqR7SKhVCb8Q@mail.gmail.com>
@ 2015-03-19  5:05         ` Raymond Yau
       [not found]           ` <CAHti5NEOnozoTDCKgzNsUEE4Yxd-VURXx_mH2vy4rq1dB51ySA@mail.gmail.com>
  1 sibling, 1 reply; 14+ messages in thread
From: Raymond Yau @ 2015-03-19  5:05 UTC (permalink / raw)
  To: Daniel; +Cc: ALSA Development Mailing List, Clemens Ladisch

>> >
>> > > Daniel wrote:
>> > > > numid=1,iface=PCM,name='Capture Channel Map'
>> > > >   ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0
>> > > >   : values=0,0
>> > > >   |     | chmap-fixed=FL,FR
>> > > > numid=2,iface=PCM,name='Playback Channel Map'
>> > > >   ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0
>> > > >   : values=0,0
>> > > >   |     | chmap-fixed=FL,FR
>> > >
>> > > This device reports that it supports two channels.
>> > > What makes you think that you can play eight channels?
>> > >
>> > > > 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
>> > >
>> > > These are bugs in the device firmware.  However, the driver could
>> > > handle them better.
>> > >
>> > >
>> >
>> >
>> > Forgive my ignorance if I'm totally wrong, what made me think that is
7.1
>> > capable is:
>> >
>> > The headset is made to emulate 7.1 sound in headphones, that it does
>> > through the sound card it provides.
>> >
>> > Also the aplay output...
>> >
>> > aplay --dump-hw-params returns  CHANNELS: [2 8]
>> >
>> > and "aplay -L" output also reports:
>> > surround71:CARD=Elite,DEV=0
>> >     SteelSeries Siberia Elite, USB Audio
>> >     7.1 Surround output to Front, Center, Side, Rear and Woofer
speakers
>> >
>> >
>> > With the manufacturer driver under other OS's you do select 7.1 setup
and
>> > then you plug the specific headphones to the soundcard and can hear the
>> > surround sound, but I don't mean to compare though, just that it also
made
>> > me believe this hardware supports 7.1
>> >
>> >
>> numid=11,iface=MIXER,name='Speaker Playback Volume' ;
type=INTEGER,access=rw---R--,values=8,min=0,max=74,step=0 :
values=54,54,54,54,54,54,54,54 | dBminmax-min=-74.00dB,max=0.00dB
>>
>> You need workaround since pulseaudio don't like volume control with more
than two channels
>>
>> https://bugs.freedesktop.org/show_bug.cgi?id=84983#c35
>>
>> Can you post output of your usb audio device ?
>>
>> lsusb -vvvv
>
>
>
> Certainly!
>
> Here it is:
>
> Bus 001 Device 003: ID 1038:1225 Ideazon, Inc.
> Device Descriptor:
>   bLength                18
>   bDescriptorType         1
>   bcdUSB               2.00
>   bDeviceClass            0 (Defined at Interface level)
>   bDeviceSubClass         0
>   bDeviceProtocol         0
>   bMaxPacketSize0        64
>   idVendor           0x1038 Ideazon, Inc.
>   idProduct          0x1225
>   bcdDevice            0.03
>   iManufacturer           1 SteelSeries
>   iProduct                2 SteelSeries Siberia Elite
>   iSerial                 3 000000000000
>   bNumConfigurations      1

>
>       AudioControl Interface Descriptor:
>         bLength                13
>         bDescriptorType        36
>         bDescriptorSubtype      4 (MIXER_UNIT)
>       Warning: Descriptor too short

https://github.com/gregkh/usbutils/blob/master/lsusb.c

Seem no warning for descriptor too short for uac2 and can dump those uac2
specific variables

>         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)
>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: snd_usb_audio - siberia elite prism soundcard issues
       [not found]           ` <CAHti5NEOnozoTDCKgzNsUEE4Yxd-VURXx_mH2vy4rq1dB51ySA@mail.gmail.com>
@ 2015-03-24  1:35             ` Raymond Yau
  2015-03-27 18:55               ` Daniel
  0 siblings, 1 reply; 14+ messages in thread
From: Raymond Yau @ 2015-03-24  1:35 UTC (permalink / raw)
  To: Daniel, ALSA Development Mailing List

>> >> >
>> >> >
>> >> numid=11,iface=MIXER,name='Speaker Playback Volume' ;
type=INTEGER,access=rw---R--,values=8,min=0,max=74,step=0 :
values=54,54,54,54,54,54,54,54 | dBminmax-min=-74.00dB,max=0.00dB
>> >>
>> >> You need workaround since pulseaudio don't like volume control with
more than two channels
>> >>
>> >> https://bugs.freedesktop.org/show_bug.cgi?id=84983#c35
>> >>
>> >> Can you post output of your usb audio device ?
>> >>
>> >> lsusb -vvvv
>> >
>> >
>> >
>> > Certainly!
>> >
>> > Here it is:
>> >
>> > Bus 001 Device 003: ID 1038:1225 Ideazon, Inc.
>> > Device Descriptor:
>> >   bLength                18
>> >   bDescriptorType         1
>> >   bcdUSB               2.00
>> >   bDeviceClass            0 (Defined at Interface level)
>> >   bDeviceSubClass         0
>> >   bDeviceProtocol         0
>> >   bMaxPacketSize0        64
>> >   idVendor           0x1038 Ideazon, Inc.
>> >   idProduct          0x1225
>> >   bcdDevice            0.03
>> >   iManufacturer           1 SteelSeries
>> >   iProduct                2 SteelSeries Siberia Elite
>> >   iSerial                 3 000000000000
>> >   bNumConfigurations      1
>>
>> >
>> >       AudioControl Interface Descriptor:
>> >         bLength                13
>> >         bDescriptorType        36
>> >         bDescriptorSubtype      4 (MIXER_UNIT)
>> >       Warning: Descriptor too short
>>
>> https://github.com/gregkh/usbutils/blob/master/lsusb.c
>>
>> Seem no warning for descriptor too short for uac2 and can dump those
uac2 specific variables
>>
>> >         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)
>> >
>
>
> Maybe it's the language barrier, but I am not sure if you wanted me to do
something. I, out of curiosity, tried to compile that lsusb but I'm missing
headers such as config.h.
>
> Should you need any more feedback from me about this device, please do
not hesitate asking through mailing list or directly, just consider I'm not
dev! :)
>

Do you mean there is no sound using alsa hw device since pulseaudio does
not support the multichannel speaker playback volume comtrol ?

speaker-test -c8 -t wav -D hw:CARD=Elite

speaker-test -c2 -t wav -D hw:CARD=Elite

You need to know how to compile alsa driver for you running kernel if you
want to fix the problem

>> >> > > > amixer: Control hw:2 element read error: Invalid argument

If alsamixer or amixer cannot set the speaker playback volume

Try skip the problematic PCM Volume controls by adding

if (state->chip->usb_id == USB_ID(0x1038,0x1225))
if(unitid == 10)
ich_has_control = 0;

If the driver really need this mixer unit for the playback path, you need
to fix those controls

bUnitID 10
bNrInPins 2
baSourceID( 0) 9             microphone
baSourceID( 1) 1             usb streaming

This look like the first four problematic controls related to microphone
and the last control related to streaming

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: snd_usb_audio - siberia elite prism soundcard issues
  2015-03-24  1:35             ` Raymond Yau
@ 2015-03-27 18:55               ` Daniel
  0 siblings, 0 replies; 14+ messages in thread
From: Daniel @ 2015-03-27 18:55 UTC (permalink / raw)
  To: Raymond Yau; +Cc: ALSA Development Mailing List

2015-03-24 2:35 GMT+01:00 Raymond Yau <superquad.vortex2@gmail.com>:

>
> >> >> >
> >> >> >
> >> >> numid=11,iface=MIXER,name='Speaker Playback Volume' ;
> type=INTEGER,access=rw---R--,values=8,min=0,max=74,step=0 :
> values=54,54,54,54,54,54,54,54 | dBminmax-min=-74.00dB,max=0.00dB
> >> >>
> >> >> You need workaround since pulseaudio don't like volume control with
> more than two channels
> >> >>
> >> >> https://bugs.freedesktop.org/show_bug.cgi?id=84983#c35
> >> >>
> >> >> Can you post output of your usb audio device ?
> >> >>
> >> >> lsusb -vvvv
> >> >
> >> >
> >> >
> >> > Certainly!
> >> >
> >> > Here it is:
> >> >
> >> > Bus 001 Device 003: ID 1038:1225 Ideazon, Inc.
> >> > Device Descriptor:
> >> >   bLength                18
> >> >   bDescriptorType         1
> >> >   bcdUSB               2.00
> >> >   bDeviceClass            0 (Defined at Interface level)
> >> >   bDeviceSubClass         0
> >> >   bDeviceProtocol         0
> >> >   bMaxPacketSize0        64
> >> >   idVendor           0x1038 Ideazon, Inc.
> >> >   idProduct          0x1225
> >> >   bcdDevice            0.03
> >> >   iManufacturer           1 SteelSeries
> >> >   iProduct                2 SteelSeries Siberia Elite
> >> >   iSerial                 3 000000000000
> >> >   bNumConfigurations      1
> >>
> >> >
> >> >       AudioControl Interface Descriptor:
> >> >         bLength                13
> >> >         bDescriptorType        36
> >> >         bDescriptorSubtype      4 (MIXER_UNIT)
> >> >       Warning: Descriptor too short
> >>
> >> https://github.com/gregkh/usbutils/blob/master/lsusb.c
> >>
> >> Seem no warning for descriptor too short for uac2 and can dump those
> uac2 specific variables
> >>
> >> >         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)
> >> >
> >
> >
> > Maybe it's the language barrier, but I am not sure if you wanted me to
> do something. I, out of curiosity, tried to compile that lsusb but I'm
> missing headers such as config.h.
> >
> > Should you need any more feedback from me about this device, please do
> not hesitate asking through mailing list or directly, just consider I'm not
> dev! :)
> >
>
> Do you mean there is no sound using alsa hw device since pulseaudio does
> not support the multichannel speaker playback volume comtrol ?
>
> speaker-test -c8 -t wav -D hw:CARD=Elite
>
> speaker-test -c2 -t wav -D hw:CARD=Elite
>
> You need to know how to compile alsa driver for you running kernel if you
> want to fix the problem
>
> >> >> > > > amixer: Control hw:2 element read error: Invalid argument
>
> If alsamixer or amixer cannot set the speaker playback volume
>
> Try skip the problematic PCM Volume controls by adding
>
> if (state->chip->usb_id == USB_ID(0x1038,0x1225))
> if(unitid == 10)
> ich_has_control = 0;
>
> If the driver really need this mixer unit for the playback path, you need
> to fix those controls
>
> bUnitID 10
> bNrInPins 2
> baSourceID( 0) 9             microphone
> baSourceID( 1) 1             usb streaming
>
> This look like the first four problematic controls related to microphone
> and the last control related to streaming
>
> 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
>

Hello,

when I run the tests:

speaker-test -c8 -t wav -D hw:CARD=Elite

speaker-test -c2 -t wav -D hw:CARD=Elite

I only get sound from front left and front right channels.


About compiling the alsa driver in my running kernel or where to place the
code you mention, well, as much as I have tried, my lack of experience has
resulted in failing, although I'm still trying...


I have tried with latest kernel 3.18.10, and kernel 4.0-rc5.


Maybe I'm asking too much, can you provide a mixer.c or all the files I
need to substitude in any kernel version you decide?, I'll just download
the source for that kernel and merge with the file/s you attach and compile
the whole thing, of that I'm sure I can do.

If it's too much I'm asking , don't worry, I'm still trying.

-- 
*Daniel Ferradal*

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2015-03-27 18:55 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-08 18:30 snd_usb_audio - siberia elite prism soundcard issues Daniel
2015-03-08 19:02 ` Clemens Ladisch
2015-03-08 19:28   ` Daniel
2015-03-09  4:11     ` Raymond Yau
2015-03-09 17:44       ` Daniel
     [not found]         ` <CAN8cciaMGdGtqTJrHV8q1_5vgpM2qXRK7XRAdiiqR7SKhVCb8Q@mail.gmail.com>
     [not found]           ` <CAHti5NGTMPUwQ-sczhoAQ09A94mheq3rHORCocZzy3WxQjL0gQ@mail.gmail.com>
     [not found]             ` <CAN8ccibuXoLWHi7rZX8bSUHvE9wdGGXyFVRwovVLb7UOemZhUA@mail.gmail.com>
     [not found]               ` <CAHti5NF8G7iArtC_cN_WA2EFRpwGe8rMmVRHvKtrKNHpuEK46A@mail.gmail.com>
2015-03-12  1:10                 ` Raymond Yau
2015-03-13 11:52                   ` Daniel
2015-03-13 13:51                     ` Raymond Yau
2015-03-14  6:10                     ` Raymond Yau
2015-03-14 14:33                       ` Daniel
2015-03-15  0:25                         ` Raymond Yau
2015-03-19  5:05         ` Raymond Yau
     [not found]           ` <CAHti5NEOnozoTDCKgzNsUEE4Yxd-VURXx_mH2vy4rq1dB51ySA@mail.gmail.com>
2015-03-24  1:35             ` Raymond Yau
2015-03-27 18:55               ` Daniel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.