public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* USB-audio strange problems
       [not found] ` <s5htzy0y2rx.wl%tiwai@suse.de>
@ 2008-03-19 21:12   ` Pavel Machek
  2008-03-20 11:03     ` Takashi Iwai
  0 siblings, 1 reply; 6+ messages in thread
From: Pavel Machek @ 2008-03-19 21:12 UTC (permalink / raw)
  To: Takashi Iwai, kernel list

Hi!

Ok, so it took me a year to get back to this bug. Oops.

> Yep, let's fix it.  Just to make sure (ane debugging easy atm), could
> you attach the following?
> 
> - content of /proc/asound/cards
> - content of /proc/asound/card*/stream*
> - the output of "lsusb -v"
> - the generated file via "alsactl -f store somefile"
> 
> If I remember correctly, alsamixer at least doesn't break if you build
> snd-usb-audio driver with IGNORE_CTL_ERR enabled, right?

I got the usb soundcard to work. I still have IGNORE_CTL_ERR enabled.

Problem was not mixer after all... somehow it expects me to play sound
as 8-bit, and then I can play 16-bit mono and actually hear
it. _Strange_.

So:

mplayer -ao alsa:device=hw=0 -af format=u8  KDE_Startup.wav
mplayer -ao alsa:device=hw=0 -af format=s16le -af resample=48000  -af channels=1 KDE_Logout_1.ogg

...plays both files. 

Forget about the first mplayer, and it will play nothing.

Files you asked for:

hobit:/usr/share/sounds# cat /proc/asound/cards 
 0 [U0x4fa0x4201   ]: USB-Audio - USB Device 0x4fa:0x4201
                      USB Device 0x4fa:0x4201 at usb-0000:00:1a.0-1,
full speed
hobit:/usr/share/sounds# grep . /proc/asound/card*/stream*
USB Device 0x4fa:0x4201 at usb-0000:00:1a.0-1, full speed : USB Audio
Playback:
  Status: Stop
  Interface 1
    Altset 1
    Format: 0x2
    Channels: 2
    Endpoint: 1 OUT (ASYNC)
    Rates: 44100, 48000
  Interface 1
    Altset 2
    Format: 0x2
    Channels: 1
    Endpoint: 1 OUT (ASYNC)
    Rates: 44100, 48000
  Interface 1
    Altset 3
    Format: 0x0
    Channels: 2
    Endpoint: 1 OUT (ASYNC)
    Rates: 44100, 48000
  Interface 1
    Altset 4
    Format: 0x0
    Channels: 1
    Endpoint: 1 OUT (ASYNC)
    Rates: 44100, 48000
  Interface 1
    Altset 5
    Format: 0x2
    Channels: 2
    Endpoint: 1 OUT (ADAPTIVE)
    Rates: 44100, 48000
hobit:/usr/share/sounds# 

hobit:/usr/share/sounds# lsusb
Bus 007 Device 004: ID 0db0:1967 Micro Star International Bluetooth
Dongle
Bus 007 Device 003: ID 046d:c50e Logitech, Inc. MX-1000 Cordless Mouse
Receiver
Bus 007 Device 002: ID 0451:2046 Texas Instruments, Inc. TUSB2046 Hub
Bus 007 Device 001: ID 1d6b:0001  
Bus 006 Device 001: ID 1d6b:0001  
Bus 005 Device 001: ID 1d6b:0001  
Bus 004 Device 001: ID 1d6b:0001  
Bus 003 Device 002: ID 04fa:4201 Dallas Semiconductor DS4201 Audio DAC
Bus 003 Device 001: ID 1d6b:0001  
Bus 002 Device 001: ID 1d6b:0002  
Bus 001 Device 001: ID 1d6b:0002  

lsusb -v is slightly long... here is relevant part:

Bus 003 Device 002: ID 04fa:4201 Dallas Semiconductor DS4201 Audio DAC
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x04fa Dallas Semiconductor
  idProduct          0x4201 DS4201 Audio DAC
  bcdDevice           83.a1
  iManufacturer           0 
  iProduct                0 
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          421
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xc0
      Self Powered
    MaxPower              100mA
    Interface Descriptor:
      bLength                11
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
    bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      1 Control Device
      bInterfaceProtocol      0 
      iInterface              0 
      AudioControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      1 (HEADER)
        bcdADC               1.00
        wTotalLength          114
        bInCollection           1
        baInterfaceNr( 0)       1
      AudioControl Interface Descriptor:
        bLength                12
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             1
        wTerminalType      0x0101 USB Streaming
        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             2
        wTerminalType      0x0601 Analog Connector
        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             3
        wTerminalType      0x0601 Analog Connector
        bAssocTerminal          0
        bNrChannels             2
        wChannelConfig     0x0003
          Left Front (L)
          Right Front (R)
        iChannelNames           0 
        iTerminal               0 
      AudioControl Interface Descriptor:
        bLength                10
        bDescriptorType        36
        bDescriptorSubtype      6 (FEATURE_UNIT)
        bUnitID                 5
        bSourceID               9
        bControlSize            1
        bmaControls( 0)      0x01
          Mute
        bmaControls( 1)      0x01
          Mute
        bmaControls( 2)      0x01
          Mute
        iFeature                0 
      AudioControl Interface Descriptor:
        bLength                10
        bDescriptorType        36
        bDescriptorSubtype      6 (FEATURE_UNIT)
        bUnitID                 6
        bSourceID               2
        bControlSize            1
        bmaControls( 0)      0x01
          Mute
        bmaControls( 1)      0x01
          Mute
        bmaControls( 2)      0x01
          Mute
        iFeature                0 
      AudioControl Interface Descriptor:
        bLength                10
        bDescriptorType        36
        bDescriptorSubtype      6 (FEATURE_UNIT)
        bUnitID                 7
        bSourceID               3
        bControlSize            1
        bmaControls( 0)      0x01
          Mute
        bmaControls( 1)      0x01
          Mute
        bmaControls( 2)      0x01
          Mute
        iFeature                0 
      AudioControl Interface Descriptor:
        bLength                15
        bDescriptorType        36
        bDescriptorSubtype      4 (MIXER_UNIT)
        bUnitID                 8
        bNrInPins               3
        baSourceID( 0)          5
        baSourceID( 1)          6
        baSourceID( 2)          7
        bNrChannels             2
        wChannelConfig     0x0003
          Left Front (L)
          Right Front (R)
        iChannelNames           0 
        bmControls         0x90
        iMixer                153 
        junk at descriptor end: 00
      AudioControl Interface Descriptor:
        bLength                15
        bDescriptorType        36
        bDescriptorSubtype      8 (EXTENSION_UNIT)
        bUnitID                 9
        wExtensionCode          0
        bNrPins                 1
        baSourceID( 0)          1
        bNrChannels             2
        wChannelConfig          3
          Left Front (L)
          Right Front (R)
        iChannelNames           0 
        bControlSize            1
        bmControls( 0)       0x01
          Enable Processing
        iExtension              0 
      AudioControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID             4
        wTerminalType      0x0304 Desktop Speaker
        bAssocTerminal          0
        bSourceID               8
        iTerminal               0 
    Interface Descriptor:
      bLength                11
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol      0 
      iInterface              0 
    Interface Descriptor:
      bLength                11
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           2
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      AudioStreaming Interface Descriptor:
        bLength                 7
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink           1
        bDelay                  1 frames
        wFormatTag              1 PCM
      AudioStreaming Interface Descriptor:
        bLength                14
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bNrChannels             2
        bSubframeSize           2
        bBitResolution         16
        bSamFreqType            2 Discrete
        tSamFreq[ 0]        44100
        tSamFreq[ 1]        48000
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x00c4  1x 196 bytes
        bInterval               1
        bRefresh                0
        bSynchAddress           2
        AudioControl Endpoint Descriptor:
          bLength                 7
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x01
            Sampling Frequency
          bLockDelayUnits         0 Undefined
          wLockDelay              0 Undefined
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0003  1x 3 bytes
        bInterval               1
        bRefresh                6
        bSynchAddress           0
    Interface Descriptor:
      bLength                11
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       2
      bNumEndpoints           2
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      AudioStreaming Interface Descriptor:
        bLength                 7
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink           1
        bDelay                  1 frames
        wFormatTag              1 PCM
      AudioStreaming Interface Descriptor:
        bLength                14
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bNrChannels             1
        bSubframeSize           2
        bBitResolution         16
        bSamFreqType            2 Discrete
        tSamFreq[ 0]        44100
        tSamFreq[ 1]        48000
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0062  1x 98 bytes
        bInterval               1
        bRefresh                0
        bSynchAddress           2
        AudioControl Endpoint Descriptor:
          bLength                 7
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x01
            Sampling Frequency
          bLockDelayUnits         0 Undefined
          wLockDelay              0 Undefined
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0003  1x 3 bytes
        bInterval               1
        bRefresh                6
        bSynchAddress           0
    Interface Descriptor:
      bLength                11
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       3
      bNumEndpoints           2
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      AudioStreaming Interface Descriptor:
        bLength                 7
    bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink           1
        bDelay                  1 frames
        wFormatTag              2 PCM8
      AudioStreaming Interface Descriptor:
        bLength                14
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bNrChannels             2
        bSubframeSize           1
        bBitResolution          8
        bSamFreqType            2 Discrete
        tSamFreq[ 0]        44100
        tSamFreq[ 1]        48000
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0062  1x 98 bytes
        bInterval               1
        bRefresh                0
        bSynchAddress           2
        AudioControl Endpoint Descriptor:
          bLength                 7
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x01
            Sampling Frequency
          bLockDelayUnits         0 Undefined
          wLockDelay              0 Undefined
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0003  1x 3 bytes
        bInterval               1
        bRefresh                6
        bSynchAddress           0
    Interface Descriptor:
      bLength                11
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       4
      bNumEndpoints           2
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      AudioStreaming Interface Descriptor:
        bLength                 7
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink           1
        bDelay                  1 frames
        wFormatTag              2 PCM8
      AudioStreaming Interface Descriptor:
        bLength                14
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bNrChannels             1
        bSubframeSize           1
        bBitResolution          8
        bSamFreqType            2 Discrete
        tSamFreq[ 0]        44100
        tSamFreq[ 1]        48000
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0031  1x 49 bytes
        bInterval               1
        bRefresh                0
        bSynchAddress           2
        AudioControl Endpoint Descriptor:
          bLength                 7
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x01
            Sampling Frequency
          bLockDelayUnits         0 Undefined
          wLockDelay              0 Undefined
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0003  1x 3 bytes
        bInterval               1
        bRefresh                6
        bSynchAddress           0
    Interface Descriptor:
      bLength                11
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       5
      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                  1 frames
        wFormatTag              1 PCM
      AudioStreaming Interface Descriptor:
        bLength                14
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bNrChannels             2
        bSubframeSize           2
        bBitResolution         16
        bSamFreqType            2 Discrete
        tSamFreq[ 0]        44100
        tSamFreq[ 1]        48000
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            9
          Transfer Type            Isochronous
          Synch Type               Adaptive
          Usage Type               Data
        wMaxPacketSize     0x00c4  1x 196 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              0 Milliseconds
Device Status:     0x0001
  Self Powered

Bus 003 Device 001: ID 1d6b:0001  


									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
pomozte zachranit klanovicky les:  http://www.ujezdskystrom.info/

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

* Re: USB-audio strange problems
  2008-03-19 21:12   ` USB-audio strange problems Pavel Machek
@ 2008-03-20 11:03     ` Takashi Iwai
  2008-03-20 11:16       ` Pavel Machek
  0 siblings, 1 reply; 6+ messages in thread
From: Takashi Iwai @ 2008-03-20 11:03 UTC (permalink / raw)
  To: Pavel Machek; +Cc: kernel list

At Wed, 19 Mar 2008 22:12:47 +0100,
Pavel Machek wrote:
> 
> Hi!
> 
> Ok, so it took me a year to get back to this bug. Oops.

Oh well, I don't remember what was the exactly problem...

> > Yep, let's fix it.  Just to make sure (ane debugging easy atm), could
> > you attach the following?
> > 
> > - content of /proc/asound/cards
> > - content of /proc/asound/card*/stream*
> > - the output of "lsusb -v"
> > - the generated file via "alsactl -f store somefile"
> > 
> > If I remember correctly, alsamixer at least doesn't break if you build
> > snd-usb-audio driver with IGNORE_CTL_ERR enabled, right?
> 
> I got the usb soundcard to work. I still have IGNORE_CTL_ERR enabled.
> 
> Problem was not mixer after all... somehow it expects me to play sound
> as 8-bit, and then I can play 16-bit mono and actually hear
> it. _Strange_.
> 
> So:
> 
> mplayer -ao alsa:device=hw=0 -af format=u8  KDE_Startup.wav
> mplayer -ao alsa:device=hw=0 -af format=s16le -af resample=48000  -af channels=1 KDE_Logout_1.ogg
> 
> ...plays both files. 
> 
> Forget about the first mplayer, and it will play nothing.

Dalls DS4201 has a known bug that it doesn't handle U8 format but only
S8 format.  The driver changes the supported format flags from U8 to
S8 when this USB ID is detected.  So you cannot play U8 format
natively.  (Still strange that it is accepted by mplayer.)


Takashi

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

* Re: USB-audio strange problems
  2008-03-20 11:03     ` Takashi Iwai
@ 2008-03-20 11:16       ` Pavel Machek
  2008-03-20 11:21         ` Takashi Iwai
  0 siblings, 1 reply; 6+ messages in thread
From: Pavel Machek @ 2008-03-20 11:16 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: kernel list

> At Wed, 19 Mar 2008 22:12:47 +0100,
> Pavel Machek wrote:
> > 
> > Hi!
> > 
> > Ok, so it took me a year to get back to this bug. Oops.
> 
> Oh well, I don't remember what was the exactly problem...

Yes, sorry about that.

> > > Yep, let's fix it.  Just to make sure (ane debugging easy atm), could
> > > you attach the following?
> > > 
> > > - content of /proc/asound/cards
> > > - content of /proc/asound/card*/stream*
> > > - the output of "lsusb -v"
> > > - the generated file via "alsactl -f store somefile"
> > > 
> > > If I remember correctly, alsamixer at least doesn't break if you build
> > > snd-usb-audio driver with IGNORE_CTL_ERR enabled, right?
> > 
> > I got the usb soundcard to work. I still have IGNORE_CTL_ERR enabled.
> > 
> > Problem was not mixer after all... somehow it expects me to play sound
> > as 8-bit, and then I can play 16-bit mono and actually hear
> > it. _Strange_.
> > 
> > So:
> > 
> > mplayer -ao alsa:device=hw=0 -af format=u8  KDE_Startup.wav
> > mplayer -ao alsa:device=hw=0 -af format=s16le -af resample=48000  -af channels=1 KDE_Logout_1.ogg
> > 
> > ...plays both files. 
> > 
> > Forget about the first mplayer, and it will play nothing.
> 
> Dalls DS4201 has a known bug that it doesn't handle U8 format but only
> S8 format.  The driver changes the supported format flags from U8 to
> S8 when this USB ID is detected.  So you cannot play U8 format
> natively.  (Still strange that it is accepted by mplayer.)

But problem is: I have to. Otherwise the second mplayer will produce
just silence.

Also, even with that treatment, I'm unable to play stereo :-(.

How to debug this?
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

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

* Re: USB-audio strange problems
  2008-03-20 11:16       ` Pavel Machek
@ 2008-03-20 11:21         ` Takashi Iwai
  2008-03-20 23:18           ` Pavel Machek
  0 siblings, 1 reply; 6+ messages in thread
From: Takashi Iwai @ 2008-03-20 11:21 UTC (permalink / raw)
  To: Pavel Machek; +Cc: kernel list

At Thu, 20 Mar 2008 12:16:37 +0100,
Pavel Machek wrote:
> 
> > At Wed, 19 Mar 2008 22:12:47 +0100,
> > Pavel Machek wrote:
> > > 
> > > Hi!
> > > 
> > > Ok, so it took me a year to get back to this bug. Oops.
> > 
> > Oh well, I don't remember what was the exactly problem...
> 
> Yes, sorry about that.
> 
> > > > Yep, let's fix it.  Just to make sure (ane debugging easy atm), could
> > > > you attach the following?
> > > > 
> > > > - content of /proc/asound/cards
> > > > - content of /proc/asound/card*/stream*
> > > > - the output of "lsusb -v"
> > > > - the generated file via "alsactl -f store somefile"
> > > > 
> > > > If I remember correctly, alsamixer at least doesn't break if you build
> > > > snd-usb-audio driver with IGNORE_CTL_ERR enabled, right?
> > > 
> > > I got the usb soundcard to work. I still have IGNORE_CTL_ERR enabled.
> > > 
> > > Problem was not mixer after all... somehow it expects me to play sound
> > > as 8-bit, and then I can play 16-bit mono and actually hear
> > > it. _Strange_.
> > > 
> > > So:
> > > 
> > > mplayer -ao alsa:device=hw=0 -af format=u8  KDE_Startup.wav
> > > mplayer -ao alsa:device=hw=0 -af format=s16le -af resample=48000  -af channels=1 KDE_Logout_1.ogg
> > > 
> > > ...plays both files. 
> > > 
> > > Forget about the first mplayer, and it will play nothing.
> > 
> > Dalls DS4201 has a known bug that it doesn't handle U8 format but only
> > S8 format.  The driver changes the supported format flags from U8 to
> > S8 when this USB ID is detected.  So you cannot play U8 format
> > natively.  (Still strange that it is accepted by mplayer.)
> 
> But problem is: I have to. Otherwise the second mplayer will produce
> just silence.

How about "-ao alsa:device=plughw=0 -af format=u8" ?

> Also, even with that treatment, I'm unable to play stereo :-(.

What shows stream* proc file while playing a 16bit stereo file?


Takashi

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

* Re: USB-audio strange problems
  2008-03-20 11:21         ` Takashi Iwai
@ 2008-03-20 23:18           ` Pavel Machek
  2008-03-29 16:31             ` Pavel Machek
  0 siblings, 1 reply; 6+ messages in thread
From: Pavel Machek @ 2008-03-20 23:18 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: kernel list

Hi!
> > > > Problem was not mixer after all... somehow it expects me to play sound
> > > > as 8-bit, and then I can play 16-bit mono and actually hear
> > > > it. _Strange_.
> > > > 
> > > > So:
> > > > 
> > > > mplayer -ao alsa:device=hw=0 -af format=u8  KDE_Startup.wav
> > > > mplayer -ao alsa:device=hw=0 -af format=s16le -af resample=48000  -af channels=1 KDE_Logout_1.ogg
> > > > 
> > > > ...plays both files. 
> > > > 
> > > > Forget about the first mplayer, and it will play nothing.
> > > 
> > > Dalls DS4201 has a known bug that it doesn't handle U8 format but only
> > > S8 format.  The driver changes the supported format flags from U8 to
> > > S8 when this USB ID is detected.  So you cannot play U8 format
> > > natively.  (Still strange that it is accepted by mplayer.)
> > 
> > But problem is: I have to. Otherwise the second mplayer will produce
> > just silence.
> 
> How about "-ao alsa:device=plughw=0 -af format=u8" ?

mplayer -ao alsa:device=plughw=0 -af format=u8 KDE_Startup.wav

...is silent

mplayer -ao alsa:device=hw=0 -af format=u8 KDE_Startup.wav

...I can hear it. (What's difference between hw and plughw?)

> > Also, even with that treatment, I'm unable to play stereo :-(.
> 
> What shows stream* proc file while playing a 16bit stereo file?

I test by:

mplayer -ao alsa:device=hw=0 -af format=s16le -af resample=48000   KDE_Logout_1.ogg

hobit:/proc/asound# grep . */stream*
U0x4fa0x4201/stream0:USB Device 0x4fa:0x4201 at usb-0000:00:1a.0-1,
full speed : USB Audio
U0x4fa0x4201/stream0:Playback:
U0x4fa0x4201/stream0:  Status: Running
U0x4fa0x4201/stream0:    Interface = 1
U0x4fa0x4201/stream0:    Altset = 5
U0x4fa0x4201/stream0:    URBs = 3 [ 8 8 6 ]
U0x4fa0x4201/stream0:    Packet Size = 196
U0x4fa0x4201/stream0:    Momentary freq = 48000 Hz (0x30.0000)
U0x4fa0x4201/stream0:  Interface 1
U0x4fa0x4201/stream0:    Altset 1
U0x4fa0x4201/stream0:    Format: 0x2
U0x4fa0x4201/stream0:    Channels: 2
U0x4fa0x4201/stream0:    Endpoint: 1 OUT (ASYNC)
U0x4fa0x4201/stream0:    Rates: 44100, 48000
U0x4fa0x4201/stream0:  Interface 1
U0x4fa0x4201/stream0:    Altset 2
U0x4fa0x4201/stream0:    Format: 0x2
U0x4fa0x4201/stream0:    Channels: 1
U0x4fa0x4201/stream0:    Endpoint: 1 OUT (ASYNC)
U0x4fa0x4201/stream0:    Rates: 44100, 48000
U0x4fa0x4201/stream0:  Interface 1
U0x4fa0x4201/stream0:    Altset 3
U0x4fa0x4201/stream0:    Format: 0x0
U0x4fa0x4201/stream0:    Channels: 2
U0x4fa0x4201/stream0:    Endpoint: 1 OUT (ASYNC)
U0x4fa0x4201/stream0:    Rates: 44100, 48000
U0x4fa0x4201/stream0:  Interface 1
U0x4fa0x4201/stream0:    Altset 4
U0x4fa0x4201/stream0:    Format: 0x0
U0x4fa0x4201/stream0:    Channels: 1
U0x4fa0x4201/stream0:    Endpoint: 1 OUT (ASYNC)
U0x4fa0x4201/stream0:    Rates: 44100, 48000
U0x4fa0x4201/stream0:  Interface 1
U0x4fa0x4201/stream0:    Altset 5
U0x4fa0x4201/stream0:    Format: 0x2
U0x4fa0x4201/stream0:    Channels: 2
U0x4fa0x4201/stream0:    Endpoint: 1 OUT (ADAPTIVE)
U0x4fa0x4201/stream0:    Rates: 44100, 48000
card0/stream0:USB Device 0x4fa:0x4201 at usb-0000:00:1a.0-1, full
speed : USB Audio
card0/stream0:Playback:
card0/stream0:  Status: Running
card0/stream0:    Interface = 1
card0/stream0:    Altset = 5
card0/stream0:    URBs = 3 [ 8 8 6 ]
card0/stream0:    Packet Size = 196
card0/stream0:    Momentary freq = 48000 Hz (0x30.0000)
card0/stream0:  Interface 1
card0/stream0:    Altset 1
card0/stream0:    Format: 0x2
card0/stream0:    Channels: 2
card0/stream0:    Endpoint: 1 OUT (ASYNC)
card0/stream0:    Rates: 44100, 48000
card0/stream0:  Interface 1
card0/stream0:    Altset 2
card0/stream0:    Format: 0x2
card0/stream0:    Channels: 1
card0/stream0:    Endpoint: 1 OUT (ASYNC)
card0/stream0:    Rates: 44100, 48000
card0/stream0:  Interface 1
card0/stream0:    Altset 3
card0/stream0:    Format: 0x0
card0/stream0:    Channels: 2
card0/stream0:    Endpoint: 1 OUT (ASYNC)
card0/stream0:    Rates: 44100, 48000
card0/stream0:  Interface 1
card0/stream0:    Altset 4
card0/stream0:    Format: 0x0
card0/stream0:    Channels: 1
card0/stream0:    Endpoint: 1 OUT (ASYNC)
card0/stream0:    Rates: 44100, 48000
card0/stream0:  Interface 1
card0/stream0:    Altset 5
card0/stream0:    Format: 0x2
card0/stream0:    Channels: 2
card0/stream0:    Endpoint: 1 OUT (ADAPTIVE)
card0/stream0:    Rates: 44100, 48000
hobit:/proc/asound# 

									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
pomozte zachranit klanovicky les:  http://www.ujezdskystrom.info/

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

* Re: USB-audio strange problems
  2008-03-20 23:18           ` Pavel Machek
@ 2008-03-29 16:31             ` Pavel Machek
  0 siblings, 0 replies; 6+ messages in thread
From: Pavel Machek @ 2008-03-29 16:31 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: kernel list

Hi!

Mostly solved now. Device seems to have 5 interfaces, but only 4 of
them work.
							Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

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

end of thread, other threads:[~2008-03-29 16:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20070203131014.GA4231@elf.ucw.cz>
     [not found] ` <s5htzy0y2rx.wl%tiwai@suse.de>
2008-03-19 21:12   ` USB-audio strange problems Pavel Machek
2008-03-20 11:03     ` Takashi Iwai
2008-03-20 11:16       ` Pavel Machek
2008-03-20 11:21         ` Takashi Iwai
2008-03-20 23:18           ` Pavel Machek
2008-03-29 16:31             ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox