Hello!
I am sending my conversation with Torstein Hegge concerning my Audio-gd
NFB -17.32 DAC with VIA VT1731 chip as he suggested.
I am attaching the lsusb -v output for my DAC.
I can also send the firmware installed on the chip if it is of any help
or importance.
Will try playing tracks with different rates, to see if the same problem
as with the CM6331 and send the results.
Additional info concerning the used kernels and alsa-lib in various systems:
Openwrt - 3.6.11 kernel, 1.0.25 alsa-lib
Fedora 17 - original release kernel and alsa-lib
Puppy Slacko linux 5.5 - original release kernel and alsa-lib
Slax 7.08 - 3.8.2 -original release kernel and alsa-lib
Comments and suggestions are most welcome,
Davor.
-------- Original Message --------
Subject: Re: [Alsa-user] Status of CM6631 USB
Date: Fri, 22 Mar 2013 22:56:50 +0100
From: Torstein Hegge <he...@resisty.net>
To: Davor Herga <davor.he...@guest.arnes.si>
On Fri, Mar 22, 2013 at 10:23:48PM +0100, Davor Herga wrote:
> On 03/22/2013 07:44 PM, Torstein Hegge wrote:
> > On Fri, Mar 22, 2013 at 03:33:04AM +0100, Davor Herga wrote:
> >> Hello!
> > Hi
> >
> >> Might seem this is off-topic, but I think it is not...
> > I'm fairly certain this is an unrelated issue, but I'll play along.
> >
> >> I used the patch, the original one, not the v2 or v3 with success.
> >>
> >> My situation was with Audio-gd DAC nfb-11.32, which uses VIA VT1731 chip.
> >> The situation was strange - no problems on starting tracks (I use only
> >> 44.1/16 format) from laptop using Fedora 17 or Puppy Slack 5.5 or Slax
> >> 7.08.
> >>
> >> I am using Asus WL-500gP v1 with custom Openwrt as audio player, and
> >> here the problem with wrong sampling rate appeared when starting the
> >> track. After stopping and starting again, rates were normal.
> > Just to be sure that I understand,
> >
> > Fedora 17 / Puppy Slack 5.5 / Slax 7.08: no issues
> > Openwrt without the patch: sample rate issues
> > Openwrt with [1] applied: no issues
> >
> > [1] http://thread.gmane.org/gmane.linux.alsa.devel/105941
> >
> > Correct?
>
> Yes.
> >
> > What kernel versions did you use, and most importantly, was the patched
> > kernel and the unpatched kernel for openwrt the same version?
> >
> > What does lsusb for your device say? Unless your device has ID 0d8c:0304
> > or 0d8c:0309, v1 of the CM6631 patch does absolutely nothing.
>
> I used the 3.6.11 kernel - the default one for the current Trunk.
> The patched and unpatched kernel was the same version.
> I changed the USB_ID call to suite my DAC and I inserted the patch
> manually.
> I am attaching the pcm.c in mail.
> My device is /*Audio-gd*/
Ok, so the patch is definitively what makes the difference.
> >> My understanding is, that the mentioned distros did "something" or that
> >> Openwrt is a different situation.
> >>
> >> The above patch solved the problem.
> >>
> >> Comments, ideas and suggestions are welcome.
> > Without the patch, does the openwrt-box show the issue each time you
> > start a track, or is it just the first time after you plug it in or
> > restart the WL-500?
> >
> Openwrt-box is showing the issue only on the first start of the track.
> If I unplug the device or do the "rmmod snd-usb-audio" and "insmmod
> snd-usb-audio",
> the issue appears again, but only till the first track started,
> stoped and started again.
>
> The situation with changing frequencies that were mentioned by Chris
> Hermansen and
> Thorsten Mühlfelder seemed similar to mine so I tried the patch.
>
> The "mistery" is why this is not happening in "distros"?
> I tried mpd, aplay (Fedora) Pmusic, aplay (Puppy distro) and
> SMPlayer, aplay (Slax) - no problems at start.
>
> I was thinking that there is a problem with mpd in openwrt-box, so I
> also tried aplay, but again had to do
> the start - stop - start combination.
One thing I have seen is that when ALSA initializes a new device, it
sets the sample rate to the highest rate supported by the device. If a
pulseaudio daemon runs, even if it isn't going to output sound on the
usb sound card, it will set the card sample rate to 44.1kHz right after
the snd-usb-audio module is loaded. This will cause the first track
played at 44.1kHz not to be a sample rate change. This might account for
the difference if all three distros run pulseaudio and openwrt doesn't.
Can you try to see what happens when you switch between content with
different sample rates on one of the linux distros? There are some
samples available at http://01688cb.netsolhost.com/samplerdownload/
If the pulseaudio theory is correct, you will see the sample rate change
problem there.
> I am also attaching the lsusb -v for the DAC.
I probably won't be able to look more at this before Monday. Can you
send another email with Cc to the alsa-user list containing the
description of the problem, kernel versions used, the lsusb output and
the output from dmesg when plugging in the device? Just so we have it in
the archive, and possibly so that someone can get back to you before I'm
able to.
Thanks
Torstein
Bus 001 Device 003: ID 040d:3410 VIA Technologies, Inc.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x040d VIA Technologies, Inc.
idProduct 0x3410
bcdDevice 0.20
iManufacturer 1 Audio-gd
iProduct 2 Audio-gd
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 271
bNumInterfaces 3
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xc0
Self Powered
MaxPower 50mA
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 0
bInterfaceCount 2
bFunctionClass 255 Vendor Specific Class
bFunctionSubClass 0
bFunctionProtocol 32
iFunction 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 1 Control Device
bInterfaceProtocol 32
iInterface 0
AudioControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 1 (HEADER)
bcdADC 2.00
bCategory 1
wTotalLength 46
bmControl 0x00
AudioControl Interface Descriptor:
bLength 8
bDescriptorType 36
bDescriptorSubtype 10 (CLOCK_SOURCE)
bClockID 128
bmAttributes 0x06 Internal variable Clock (synced to SOF)
bmControls 0x03
Clock Frequency Control (read/write)
bAssocTerminal 0
iClockSource 0
AudioControl Interface Descriptor:
bLength 17
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 1
wTerminalType 0x0101 USB Streaming
bAssocTerminal 0
bCSourceID 128
bNrChannels 2
bmChannelConfig 0x00000003
Front Left (FL)
Front Right (FR)
bmControls 0x0000
iChannelNames 0
iTerminal 0
AudioControl Interface Descriptor:
bLength 12
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 23
wTerminalType 0x0301 Speaker
bAssocTerminal 0
bSourceID 1
bCSourceID 128
bmControls 0x0000
iTerminal 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 1
bNumEndpoints 2
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 0
AudioStreaming Interface Descriptor:
bLength 16
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 1
bmControls 0x04
Valid Alternate Setting Control (read-only)
bFormatType 1
bmFormats 1
PCM
bNrChannels 2
bmChannelConfig 0x00000003
Front Left (FL)
Front Right (FR)
iChannelNames 0
AudioStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 1 (FORMAT_TYPE_I)
bSubslotSize 2
bBitResolution 16
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x04 EP 4 OUT
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x0304 1x 772 bytes
bInterval 4
AudioControl Endpoint Descriptor:
bLength 8
bDescriptorType 37
bDescriptorSubtype 1 (EP_GENERAL)
bmAttributes 0x00
bmControls 0x00
bLockDelayUnits 1 Milliseconds
wLockDelay 1
Endpoint Descriptor:
bLength 9
bDescriptorType 5
bEndpointAddress 0x84 EP 4 IN
bmAttributes 17
Transfer Type Isochronous
Synch Type None
Usage Type Feedback
wMaxPacketSize 0x0004 1x 4 bytes
bInterval 4
bRefresh 3
bSynchAddress 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 2
bNumEndpoints 2
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 0
AudioStreaming Interface Descriptor:
bLength 16
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 1
bmControls 0x04
Valid Alternate Setting Control (read-only)
bFormatType 1
bmFormats 1
PCM
bNrChannels 2
bmChannelConfig 0x00000003
Front Left (FL)
Front Right (FR)
iChannelNames 0
AudioStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 1 (FORMAT_TYPE_I)
bSubslotSize 3
bBitResolution 24
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x04 EP 4 OUT
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x0246 1x 582 bytes
bInterval 3
AudioControl Endpoint Descriptor:
bLength 8
bDescriptorType 37
bDescriptorSubtype 1 (EP_GENERAL)
bmAttributes 0x00
bmControls 0x00
bLockDelayUnits 1 Milliseconds
wLockDelay 1
Endpoint Descriptor:
bLength 9
bDescriptorType 5
bEndpointAddress 0x84 EP 4 IN
bmAttributes 17
Transfer Type Isochronous
Synch Type None
Usage Type Feedback
wMaxPacketSize 0x0004 1x 4 bytes
bInterval 4
bRefresh 3
bSynchAddress 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 3
bNumEndpoints 2
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 32
iInterface 0
AudioStreaming Interface Descriptor:
bLength 16
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 1
bmControls 0x04
Valid Alternate Setting Control (read-only)
bFormatType 1
bmFormats 1
PCM
bNrChannels 2
bmChannelConfig 0x00000003
Front Left (FL)
Front Right (FR)
iChannelNames 0
AudioStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 1 (FORMAT_TYPE_I)
bSubslotSize 4
bBitResolution 32
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x04 EP 4 OUT
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x0308 1x 776 bytes
bInterval 3
AudioControl Endpoint Descriptor:
bLength 8
bDescriptorType 37
bDescriptorSubtype 1 (EP_GENERAL)
bmAttributes 0x00
bmControls 0x00
bLockDelayUnits 1 Milliseconds
wLockDelay 1
Endpoint Descriptor:
bLength 9
bDescriptorType 5
bEndpointAddress 0x84 EP 4 IN
bmAttributes 17
Transfer Type Isochronous
Synch Type None
Usage Type Feedback
wMaxPacketSize 0x0004 1x 4 bytes
bInterval 4
bRefresh 3
bSynchAddress 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
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.00
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 61
Report Descriptor: (length is 61)
Item(Global): Usage Page, data= [ 0x0c ] 12
Consumer
Item(Local ): Usage, data= [ 0x01 ] 1
Consumer Control
Item(Main ): Collection, data= [ 0x01 ] 1
Application
Item(Global): Logical Minimum, data= [ 0x00 ] 0
Item(Global): Logical Maximum, data= [ 0x01 ] 1
Item(Local ): Usage, data= [ 0xe9 ] 233
Volume Increment
Item(Local ): Usage, data= [ 0xea ] 234
Volume Decrement
Item(Local ): Usage, data= [ 0xe2 ] 226
Mute
Item(Global): Report Size, data= [ 0x01 ] 1
Item(Global): Report Count, data= [ 0x03 ] 3
Item(Main ): Input, data= [ 0x02 ] 2
Data Variable Absolute No_Wrap Linear
Preferred_State No_Null_Position Non_Volatile
Bitfield
Item(Global): Logical Minimum, data= [ 0x00 ] 0
Item(Global): Logical Maximum, data= [ 0x01 ] 1
Item(Local ): Usage, data= [ 0x00 ] 0
Unassigned
Item(Global): Report Size, data= [ 0x01 ] 1
Item(Global): Report Count, data= [ 0x05 ] 5
Item(Main ): Input, data= [ 0x02 ] 2
Data Variable Absolute No_Wrap Linear
Preferred_State No_Null_Position Non_Volatile
Bitfield
Item(Local ): Usage, data= [ 0x00 ] 0
Unassigned
Item(Global): Logical Minimum, data= [ 0x00 ] 0
Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
Item(Global): Report Size, data= [ 0x08 ] 8
Item(Global): Report Count, data= [ 0x0f ] 15
Item(Main ): Input, data= [ 0x02 ] 2
Data Variable Absolute No_Wrap Linear
Preferred_State No_Null_Position Non_Volatile
Bitfield
Item(Local ): Usage, data= [ 0x00 ] 0
Unassigned
Item(Global): Logical Minimum, data= [ 0x00 ] 0
Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
Item(Global): Report Size, data= [ 0x08 ] 8
Item(Global): Report Count, data= [ 0x40 ] 64
Item(Main ): Output, data= [ 0x02 ] 2
Data Variable Absolute No_Wrap Linear
Preferred_State No_Null_Position Non_Volatile
Bitfield
Item(Main ): End Collection, data=none
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0010 1x 16 bytes
bInterval 16
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0001
Self Powered
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user