* Frequency Problems with 0d8c:0201 and snd-usb-audio
@ 2006-11-15 18:00 Richi Plana
2006-11-16 9:10 ` Clemens Ladisch
2006-11-17 19:39 ` Lee Revell
0 siblings, 2 replies; 12+ messages in thread
From: Richi Plana @ 2006-11-15 18:00 UTC (permalink / raw)
To: alsa-devel
Hi,
I have an ASRock 939Dual-VSTA mobo that comes with a C-Media Electronics
based sound system. Its USB Vendor and Product ID is 0d8c:0201, I'm
using Fedora Core 6 with ALSA drivers and libs version 1.0.13 and am
experiencing some problems with it.
The one major problem I have is that any audio played at 48000 Hz sounds
distorted. Playing the same audio at 44100 Hz is fine. I'm using this
computer as a MythTV machine with a WinTV PVR-350 video capture card
that seems to want to sample at 48000 Hz.
The second problem is with the mixer. I just can't get audio to come out
of the side, rear and center speakers. I'll have to play around with
this more, but it's not as bad as the first problem.
Thanks for any help/advice. I've a technical background so I
troubleshoot given good leads.
--
Richi
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Frequency Problems with 0d8c:0201 and snd-usb-audio
2006-11-15 18:00 Frequency Problems with 0d8c:0201 and snd-usb-audio Richi Plana
@ 2006-11-16 9:10 ` Clemens Ladisch
2006-11-16 17:08 ` Richi Plana
2006-11-17 19:39 ` Lee Revell
1 sibling, 1 reply; 12+ messages in thread
From: Clemens Ladisch @ 2006-11-16 9:10 UTC (permalink / raw)
To: Richi Plana, alsa-devel
Richi Plana wrote:
> I have an ASRock 939Dual-VSTA mobo that comes with a C-Media Electronics
> based sound system. Its USB Vendor and Product ID is 0d8c:0201,
Please show the output of "lsusb -v" for this device.
> The one major problem I have is that any audio played at 48000 Hz sounds
> distorted. Playing the same audio at 44100 Hz is fine.
Does "aplay something.wav" work?
> I just can't get audio to come out of the side, rear and center speakers.
Please try speaker-test.
Regards,
Clemens
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Frequency Problems with 0d8c:0201 and snd-usb-audio
2006-11-16 9:10 ` Clemens Ladisch
@ 2006-11-16 17:08 ` Richi Plana
2006-11-16 17:26 ` Clemens Ladisch
0 siblings, 1 reply; 12+ messages in thread
From: Richi Plana @ 2006-11-16 17:08 UTC (permalink / raw)
To: Clemens Ladisch; +Cc: alsa-devel
Hi, Clemens et al.
On Thu, 2006-11-16 at 10:10 +0100, Clemens Ladisch wrote:
> Richi Plana wrote:
> > I have an ASRock 939Dual-VSTA mobo that comes with a C-Media Electronics
> > based sound system. Its USB Vendor and Product ID is 0d8c:0201,
>
> Please show the output of "lsusb -v" for this device.
The output is pretty long. I've copied it to the bottom of this email.
> > The one major problem I have is that any audio played at 48000 Hz sounds
> > distorted. Playing the same audio at 44100 Hz is fine.
>
> Does "aplay something.wav" work?
$ aplay something.wav
something.wav: No such file or directory
(Haha .. a little tech support humor there)
$ aplay /usr/share/system-config-soundcard/sound-sample.wav
Playing WAVE '/usr/share/system-config-soundcard/sound-sample.wav' :
Signed
16 bit Little Endian, Rate 44100 Hz, Stereo
This definitely works and the output is exactly what I expected. Then
again, I've tried other audio output programs and so long as the output
stream is 44100 Hz, the audio is good. It's when the output is set to
48000 Hz that it gets distorted. Unfortunately, MythTV and the ivtv
drivers seem to want to pick 48000 Hz.
> > I just can't get audio to come out of the side, rear and center speakers.
>
> Please try speaker-test.
Thanks for that tip. So the other channels and their mixer controls DO
work. It's just that the motherboard manual mislabeled to Rear and
Central/LFE ports, and I managed to find that out by using speaker-test.
Any help with the distorted sound output (using 48000 Hz) would be
appreciated beyond words. Here's the output of 'lsusb -v -d
0d8c:' (apologies in advance for the size):
============================================================================
Bus 003 Device 002: ID 0d8c:0201 C-Media Electronics, Inc.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x0d8c C-Media Electronics, Inc.
idProduct 0x0201
bcdDevice 0.10
iManufacturer 0
iProduct 2 PnP Audio Device
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 531
bNumInterfaces 3
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
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 215
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 12
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 4
wTerminalType 0x0201 Microphone
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 8
bSourceID 4
bControlSize 1
bmaControls( 0) 0x01
Mute
bmaControls( 1) 0x02
Volume
bmaControls( 2) 0x02
Volume
iFeature 0
AudioControl Interface Descriptor:
bLength 10
bDescriptorType 36
bDescriptorSubtype 6 (FEATURE_UNIT)
bUnitID 9
bSourceID 4
bControlSize 1
bmaControls( 0) 0x01
Mute
bmaControls( 1) 0x02
Volume
bmaControls( 2) 0x02
Volume
iFeature 0
AudioControl Interface Descriptor:
bLength 28
bDescriptorType 36
bDescriptorSubtype 4 (MIXER_UNIT)
bUnitID 12
bNrInPins 4
baSourceID( 0) 1
baSourceID( 1) 9
baSourceID( 2) 14
baSourceID( 3) 11
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
bmControls 0x00
bmControls 0x00
iMixer 0
junk at descriptor end: 00 00 00 00 00 00 00 00 00 00
AudioControl Interface Descriptor:
bLength 16
bDescriptorType 36
bDescriptorSubtype 6 (FEATURE_UNIT)
bUnitID 13
bSourceID 12
bControlSize 1
bmaControls( 0) 0x01
Mute
bmaControls( 1) 0x02
Volume
bmaControls( 2) 0x02
Volume
bmaControls( 3) 0x02
Volume
bmaControls( 4) 0x02
Volume
bmaControls( 5) 0x02
Volume
bmaControls( 6) 0x02
Volume
bmaControls( 7) 0x02
Volume
bmaControls( 8) 0x02
Volume
iFeature 0
AudioControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 3
wTerminalType 0x0301 Speaker
bAssocTerminal 0
bSourceID 13
iTerminal 0
AudioControl Interface Descriptor:
bLength 15
bDescriptorType 36
bDescriptorSubtype 4 (MIXER_UNIT)
bUnitID 17
bNrInPins 3
baSourceID( 0) 9
baSourceID( 1) 14
baSourceID( 2) 11
bNrChannels 2
wChannelConfig 0x0003
Left Front (L)
Right Front (R)
iChannelNames 0
bmControls 0x00
iMixer 0
junk at descriptor end: 00
AudioControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 10
wTerminalType 0x0101 USB Streaming
bAssocTerminal 0
bSourceID 7
iTerminal 0
AudioControl Interface Descriptor:
bLength 10
bDescriptorType 36
bDescriptorSubtype 5 (SELECTOR_UNIT)
bUnitID 7
bNrInPins 4
baSource( 0) 8
baSource( 1) 2
baSource( 2) 16
baSource( 3) 15
iSelector 0
AudioControl Interface Descriptor:
bLength 12
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 6
wTerminalType 0x0603 Line 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 15
bSourceID 6
bControlSize 1
bmaControls( 0) 0x01
Mute
bmaControls( 1) 0x02
Volume
bmaControls( 2) 0x02
Volume
iFeature 0
AudioControl Interface Descriptor:
bLength 10
bDescriptorType 36
bDescriptorSubtype 6 (FEATURE_UNIT)
bUnitID 11
bSourceID 6
bControlSize 1
bmaControls( 0) 0x01
Mute
bmaControls( 1) 0x02
Volume
bmaControls( 2) 0x02
Volume
iFeature 0
AudioControl Interface Descriptor:
bLength 12
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 5
wTerminalType 0x0601 Analog Connector
bAssocTerminal 0
bNrChannels 2
wChannelConfig 0x0003
Left Front (L)
Right Front (R)
iChannelNames 0
iTerminal 3 CD
AudioControl Interface Descriptor:
bLength 10
bDescriptorType 36
bDescriptorSubtype 6 (FEATURE_UNIT)
bUnitID 2
bSourceID 17
bControlSize 1
bmaControls( 0) 0x01
Mute
bmaControls( 1) 0x02
Volume
bmaControls( 2) 0x02
Volume
iFeature 0
AudioControl Interface Descriptor:
bLength 10
bDescriptorType 36
bDescriptorSubtype 6 (FEATURE_UNIT)
bUnitID 16
bSourceID 5
bControlSize 1
bmaControls( 0) 0x01
Mute
bmaControls( 1) 0x02
Volume
bmaControls( 2) 0x02
Volume
iFeature 0
AudioControl Interface Descriptor:
bLength 10
bDescriptorType 36
bDescriptorSubtype 6 (FEATURE_UNIT)
bUnitID 14
bSourceID 5
bControlSize 1
bmaControls( 0) 0x01
Mute
bmaControls( 1) 0x02
Volume
bmaControls( 2) 0x02
Volume
iFeature 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0003 1x 3 bytes
bInterval 1
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 1
bDelay 1 frames
wFormatTag 1 PCM
AudioStreaming Interface Descriptor:
bLength 14
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 1 (FORMAT_TYPE_I)
bNrChannels 8
bSubframeSize 2
bBitResolution 16
bSamFreqType 2 Discrete
tSamFreq[ 0] 44100
tSamFreq[ 1] 48000
Endpoint Descriptor:
bLength 9
bDescriptorType 5
bEndpointAddress 0x06 EP 6 OUT
bmAttributes 9
Transfer Type Isochronous
Synch Type Adaptive
Usage Type Data
wMaxPacketSize 0x0310 1x 784 bytes
bInterval 1
bRefresh 0
bSynchAddress 0
AudioControl Endpoint Descriptor:
bLength 7
bDescriptorType 37
bDescriptorSubtype 1 (EP_GENERAL)
bmAttributes 0x01
Sampling Frequency
bLockDelayUnits 0 Undefined
wLockDelay 0 Undefined
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 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 0x06 EP 6 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 0 Undefined
wLockDelay 0 Undefined
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
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 1 frames
wFormatTag 1 PCM
AudioStreaming Interface Descriptor:
bLength 14
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 1 (FORMAT_TYPE_I)
bNrChannels 4
bSubframeSize 2
bBitResolution 16
bSamFreqType 2 Discrete
tSamFreq[ 0] 44100
tSamFreq[ 1] 48000
Endpoint Descriptor:
bLength 9
bDescriptorType 5
bEndpointAddress 0x06 EP 6 OUT
bmAttributes 9
Transfer Type Isochronous
Synch Type Adaptive
Usage Type Data
wMaxPacketSize 0x0188 1x 392 bytes
bInterval 1
bRefresh 0
bSynchAddress 0
AudioControl Endpoint Descriptor:
bLength 7
bDescriptorType 37
bDescriptorSubtype 1 (EP_GENERAL)
bmAttributes 0x01
Sampling Frequency
bLockDelayUnits 0 Undefined
wLockDelay 0 Undefined
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 4
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 6
bSubframeSize 2
bBitResolution 16
bSamFreqType 2 Discrete
tSamFreq[ 0] 44100
tSamFreq[ 1] 48000
Endpoint Descriptor:
bLength 9
bDescriptorType 5
bEndpointAddress 0x06 EP 6 OUT
bmAttributes 9
Transfer Type Isochronous
Synch Type Adaptive
Usage Type Data
wMaxPacketSize 0x0248 1x 584 bytes
bInterval 1
bRefresh 0
bSynchAddress 0
AudioControl Endpoint Descriptor:
bLength 7
bDescriptorType 37
bDescriptorSubtype 1 (EP_GENERAL)
bmAttributes 0x01
Sampling Frequency
bLockDelayUnits 0 Undefined
wLockDelay 0 Undefined
Interface Descriptor:
bLength 9
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 11
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 1 (FORMAT_TYPE_I)
bNrChannels 2
bSubframeSize 2
bBitResolution 16
bSamFreqType 1 Discrete
tSamFreq[ 0] 48000
Endpoint Descriptor:
bLength 9
bDescriptorType 5
bEndpointAddress 0x06 EP 6 OUT
bmAttributes 9
Transfer Type Isochronous
Synch Type Adaptive
Usage Type Data
wMaxPacketSize 0x0188 1x 392 bytes
bInterval 1
bRefresh 0
bSynchAddress 0
AudioControl Endpoint Descriptor:
bLength 7
bDescriptorType 37
bDescriptorSubtype 1 (EP_GENERAL)
bmAttributes 0x01
Sampling Frequency
bLockDelayUnits 0 Undefined
wLockDelay 0 Undefined
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 10
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 0x85 EP 5 IN
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x00c8 1x 200 bytes
bInterval 1
bRefresh 0
bSynchAddress 0
AudioControl Endpoint Descriptor:
bLength 7
bDescriptorType 37
bDescriptorSubtype 1 (EP_GENERAL)
bmAttributes 0x01
Sampling Frequency
bLockDelayUnits 0 Undefined
wLockDelay 0 Undefined
============================================================================
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Frequency Problems with 0d8c:0201 and snd-usb-audio
2006-11-16 17:08 ` Richi Plana
@ 2006-11-16 17:26 ` Clemens Ladisch
2006-11-16 18:23 ` Richi Plana
0 siblings, 1 reply; 12+ messages in thread
From: Clemens Ladisch @ 2006-11-16 17:26 UTC (permalink / raw)
To: Richi Plana; +Cc: alsa-devel
Richi Plana wrote:
> > > The one major problem I have is that any audio played at 48000 Hz sounds
> > > distorted. Playing the same audio at 44100 Hz is fine.
Your device claims to support both 44.1 and 48 kHz.
What kind of distortion?
What are the contents of /proc/asound/card0/stream0 while some
48 kHz stream is playing?
> > > I just can't get audio to come out of the side, rear and center speakers.
> >
> > Please try speaker-test.
>
> Thanks for that tip. So the other channels and their mixer controls DO
> work. It's just that the motherboard manual mislabeled to Rear and
> Central/LFE ports, and I managed to find that out by using speaker-test.
I guess the problem is that ALSA's default channel order isn't the same
as that defined in the USB audio specification, and ALSA doesn't yet
remap the channels for USB devices.
Regards,
Clemens
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Frequency Problems with 0d8c:0201 and snd-usb-audio
2006-11-16 17:26 ` Clemens Ladisch
@ 2006-11-16 18:23 ` Richi Plana
2006-11-16 18:29 ` Richi Plana
2006-11-17 17:26 ` Clemens Ladisch
0 siblings, 2 replies; 12+ messages in thread
From: Richi Plana @ 2006-11-16 18:23 UTC (permalink / raw)
To: Clemens Ladisch; +Cc: alsa-devel
On Thu, 2006-11-16 at 18:26 +0100, Clemens Ladisch wrote:
> Your device claims to support both 44.1 and 48 kHz.
>
> What kind of distortion?
As objectively as I can describe it: the audio played at 48 kHz seems to
be coming out at the right speed, but the sound itself is played at a
higher pitch. It's as if each sample block is sent and received at the
correct interval, but actual data from the block is being played back at
a higher rate. It feels like either the DAC is playing at a higher rate
but each block comes at the correct intervals ... or the data isn't
getting to the processor fast enough so it tries to play the bursts as
quickly as it can.
Sorry, I'm not a sound engineer.
> What are the contents of /proc/asound/card0/stream0 while some
> 48 kHz stream is playing?
Here's the content when playing at 44100 Hz:
=========================================================================
PnP Audio Device at usb-0000:00:13.2-2, full speed : USB Audio
Playback:
Status: Running
Interface = 1
Altset = 2
URBs = 3 [ 8 8 8 ]
Packet Size = 196
Momentary freq = 44100 Hz (0x2c.199a)
Interface 1
Altset 1
Format: 0x2
Channels: 8
Endpoint: 6 OUT (ADAPTIVE)
Rates: 44100, 48000
Interface 1
Altset 2
Format: 0x2
Channels: 2
Endpoint: 6 OUT (ADAPTIVE)
Rates: 44100, 48000
Interface 1
Altset 3
Format: 0x2
Channels: 4
Endpoint: 6 OUT (ADAPTIVE)
Rates: 44100, 48000
Interface 1
Altset 4
Format: 0x2
Channels: 6
Endpoint: 6 OUT (ADAPTIVE)
Rates: 44100, 48000
Interface 1
Altset 5
Format: 0x2
Channels: 2
Endpoint: 6 OUT (ADAPTIVE)
Rates: 48000
Capture:
Status: Stop
Interface 2
Altset 1
Format: 0x2
Channels: 2
Endpoint: 5 IN (ASYNC)
Rates: 44100, 48000
=========================================================================
... and at 48000 Hz:
=========================================================================
PnP Audio Device at usb-0000:00:13.2-2, full speed : USB Audio
Playback:
Status: Running
Interface = 1
Altset = 5
URBs = 3 [ 8 8 6 ]
Packet Size = 392
Momentary freq = 48000 Hz (0x30.0000)
Interface 1
Altset 1
Format: 0x2
Channels: 8
Endpoint: 6 OUT (ADAPTIVE)
Rates: 44100, 48000
Interface 1
Altset 2
Format: 0x2
Channels: 2
Endpoint: 6 OUT (ADAPTIVE)
Rates: 44100, 48000
Interface 1
Altset 3
Format: 0x2
Channels: 4
Endpoint: 6 OUT (ADAPTIVE)
Rates: 44100, 48000
Interface 1
Altset 4
Format: 0x2
Channels: 6
Endpoint: 6 OUT (ADAPTIVE)
Rates: 44100, 48000
Interface 1
Altset 5
Format: 0x2
Channels: 2
Endpoint: 6 OUT (ADAPTIVE)
Rates: 48000
Capture:
Status: Stop
Interface 2
Altset 1
Format: 0x2
Channels: 2
Endpoint: 5 IN (ASYNC)
Rates: 44100, 48000
=========================================================================
The diff:
=========================================================================
< Altset = 2
< URBs = 3 [ 8 8 8 ]
< Packet Size = 196
< Momentary freq = 44100 Hz (0x2c.199a)
---
> Altset = 5
> URBs = 3 [ 8 8 6 ]
> Packet Size = 392
> Momentary freq = 48000 Hz (0x30.0000)
=========================================================================
I hope it tells you something because it's pretty meaningless to me.
> I guess the problem is that ALSA's default channel order isn't the same
> as that defined in the USB audio specification, and ALSA doesn't yet
> remap the channels for USB devices.
So it's likely that the physical ports are wired correctly and it's just
the mixer that's getting things mixed up? Ah well, a minor annoyance.
I'm sure that feature will get into ALSA one of these days. Maybe I'll
even pick up on it one of these days if I ever find the time.
Thanks!
--
Richi
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Frequency Problems with 0d8c:0201 and snd-usb-audio
2006-11-16 18:23 ` Richi Plana
@ 2006-11-16 18:29 ` Richi Plana
2006-11-17 17:26 ` Clemens Ladisch
1 sibling, 0 replies; 12+ messages in thread
From: Richi Plana @ 2006-11-16 18:29 UTC (permalink / raw)
To: Clemens Ladisch; +Cc: alsa-devel
On Thu, 2006-11-16 at 11:23 -0700, Richi Plana wrote:
> As objectively as I can describe it: the audio played at 48 kHz seems to
> be coming out at the right speed, but the sound itself is played at a
> higher pitch. It's as if each sample block is sent and received at the
> correct interval, but actual data from the block is being played back at
> a higher rate. It feels like either the DAC is playing at a higher rate
> but each block comes at the correct intervals ... or the data isn't
> getting to the processor fast enough so it tries to play the bursts as
> quickly as it can.
Oh, and if it helps any: the mixer response seems pretty sluggish. When
I use the sliders on gnome-volume-control, it takes a while for the
sliders to respond to each event I send it. I don't know if that's usual
for "USB" audio devices, though.
--
Richard
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Frequency Problems with 0d8c:0201 and snd-usb-audio
2006-11-16 18:23 ` Richi Plana
2006-11-16 18:29 ` Richi Plana
@ 2006-11-17 17:26 ` Clemens Ladisch
2006-11-17 18:57 ` Richi Plana
1 sibling, 1 reply; 12+ messages in thread
From: Clemens Ladisch @ 2006-11-17 17:26 UTC (permalink / raw)
To: Richi Plana; +Cc: alsa-devel
Richi Plana wrote:
> On Thu, 2006-11-16 at 18:26 +0100, Clemens Ladisch wrote:
> > What kind of distortion?
>
> As objectively as I can describe it: the audio played at 48 kHz seems to
> be coming out at the right speed, but the sound itself is played at a
> higher pitch.
>
> Playback:
> Status: Running
> Packet Size = 392
> Momentary freq = 48000 Hz (0x30.0000)
This device has two configuration that are supposed to support 48 kHz,
but the second one (that is used by the driver) has a packet size that
would be about right for 96 kHz.
Please try the patch below.
HTH
Clemens
--- alsa.orig/alsa-kernel/usb/usbaudio.c 2006-11-14 21:02:42.000000000 +0100
+++ alsa/alsa-kernel/usb/usbaudio.c 2006-11-16 23:04:29.000000000 +0100
@@ -2478,7 +2478,13 @@ static int parse_audio_format_rates(stru
fp->nr_rates = nr_rates;
fp->rate_min = fp->rate_max = combine_triple(&fmt[8]);
for (r = 0, idx = offset + 1; r < nr_rates; r++, idx += 3) {
- unsigned int rate = fp->rate_table[r] = combine_triple(&fmt[idx]);
+ unsigned int rate = combine_triple(&fmt[idx]);
+ /* C-Media CM6501 mislabels its 96 kHz altsetting */
+ if (rate == 48000 && nr_rates == 1 &&
+ chip->usb_id == USB_ID(0x0d8c, 0x0201) &&
+ fp->altsetting == 5 && fp->maxpacksize == 392)
+ rate = 96000;
+ fp->rate_table[r] = rate;
if (rate < fp->rate_min)
fp->rate_min = rate;
else if (rate > fp->rate_max)
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Frequency Problems with 0d8c:0201 and snd-usb-audio
2006-11-17 17:26 ` Clemens Ladisch
@ 2006-11-17 18:57 ` Richi Plana
2006-11-20 13:54 ` Clemens Ladisch
2006-11-20 13:55 ` Clemens Ladisch
0 siblings, 2 replies; 12+ messages in thread
From: Richi Plana @ 2006-11-17 18:57 UTC (permalink / raw)
To: Clemens Ladisch; +Cc: alsa-devel
On Fri, 2006-11-17 at 18:26 +0100, Clemens Ladisch wrote:
> This device has two configuration that are supposed to support 48 kHz,
> but the second one (that is used by the driver) has a packet size that
> would be about right for 96 kHz.
>
> Please try the patch below.
That did it! Thanks!
I'll email the motherboard manufacturer and maybe C-Media. Will update
the mailing list if I get a reply.
Will the patch make the next version (1.0.14)?
--
Richard
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Frequency Problems with 0d8c:0201 and snd-usb-audio
2006-11-15 18:00 Frequency Problems with 0d8c:0201 and snd-usb-audio Richi Plana
2006-11-16 9:10 ` Clemens Ladisch
@ 2006-11-17 19:39 ` Lee Revell
2006-11-20 13:54 ` Clemens Ladisch
1 sibling, 1 reply; 12+ messages in thread
From: Lee Revell @ 2006-11-17 19:39 UTC (permalink / raw)
To: Richi Plana; +Cc: alsa-devel
On Wed, 2006-11-15 at 11:00 -0700, Richi Plana wrote:
> Hi,
>
> I have an ASRock 939Dual-VSTA mobo that comes with a C-Media Electronics
> based sound system. Its USB Vendor and Product ID is 0d8c:0201, I'm
> using Fedora Core 6 with ALSA drivers and libs version 1.0.13 and am
> experiencing some problems with it.
Weird, I've never heard of mobos with onboard USB sound. Does it come
integrated or as a separate package?
Lee
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Frequency Problems with 0d8c:0201 and snd-usb-audio
2006-11-17 18:57 ` Richi Plana
@ 2006-11-20 13:54 ` Clemens Ladisch
2006-11-20 13:55 ` Clemens Ladisch
1 sibling, 0 replies; 12+ messages in thread
From: Clemens Ladisch @ 2006-11-20 13:54 UTC (permalink / raw)
To: Richi Plana; +Cc: alsa-devel
Richi Plana wrote:
> On Fri, 2006-11-17 at 18:26 +0100, Clemens Ladisch wrote:
> > Please try the patch below.
>
> That did it! Thanks!
Does 96 kHz now work, too?
> Will the patch make the next version (1.0.14)?
Yes.
Regards,
Clemens
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Frequency Problems with 0d8c:0201 and snd-usb-audio
2006-11-17 19:39 ` Lee Revell
@ 2006-11-20 13:54 ` Clemens Ladisch
0 siblings, 0 replies; 12+ messages in thread
From: Clemens Ladisch @ 2006-11-20 13:54 UTC (permalink / raw)
To: Lee Revell; +Cc: alsa-devel
Lee Revell wrote:
> On Wed, 2006-11-15 at 11:00 -0700, Richi Plana wrote:
> > I have an ASRock 939Dual-VSTA mobo that comes with a C-Media Electronics
> > based sound system. Its USB Vendor and Product ID is 0d8c:0201,
>
> Weird, I've never heard of mobos with onboard USB sound. Does it come
> integrated or as a separate package?
It's just a chip on the mobo.
It makes sense - USB devices are completely self-contained; unlike HDA
codecs, they don't need initialization tables or any other configuration
code in the BIOS. (And nobody will miss the eighth USB port, especially
on a cheap mobo like this.)
Regards,
Clemens
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Frequency Problems with 0d8c:0201 and snd-usb-audio
2006-11-17 18:57 ` Richi Plana
2006-11-20 13:54 ` Clemens Ladisch
@ 2006-11-20 13:55 ` Clemens Ladisch
1 sibling, 0 replies; 12+ messages in thread
From: Clemens Ladisch @ 2006-11-20 13:55 UTC (permalink / raw)
To: Richi Plana; +Cc: alsa-devel
Richi Plana wrote:
> On Fri, 2006-11-17 at 18:26 +0100, Clemens Ladisch wrote:
> > Please try the patch below.
>
> That did it! Thanks!
Does 96 kHz now work, too?
> Will the patch make the next version (1.0.14)?
Yes.
Regards,
Clemens
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2006-11-20 13:55 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-15 18:00 Frequency Problems with 0d8c:0201 and snd-usb-audio Richi Plana
2006-11-16 9:10 ` Clemens Ladisch
2006-11-16 17:08 ` Richi Plana
2006-11-16 17:26 ` Clemens Ladisch
2006-11-16 18:23 ` Richi Plana
2006-11-16 18:29 ` Richi Plana
2006-11-17 17:26 ` Clemens Ladisch
2006-11-17 18:57 ` Richi Plana
2006-11-20 13:54 ` Clemens Ladisch
2006-11-20 13:55 ` Clemens Ladisch
2006-11-17 19:39 ` Lee Revell
2006-11-20 13:54 ` Clemens Ladisch
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.