Re: Status of CM6631 USB

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Torstein and list;

Sorry about the delay with this, life and the garden and what-not kind
of caught up with me over the last few days...

On Sat, Mar 9, 2013 at 12:35 PM, Torstein Hegge <hegge@xxxxxxxxxxx> wrote:

[last experiment's evidence deleted]

>
> According to lsusb -v from
> https://gist.github.com/storrgie/2897496
> the initialization goes through iface 1-5 which are
>
> 2: SPDIF Output
> 3: Microphone In
> 4: Line In
> 5: SPDIF Input
>
> and when it gets to SPDIF Input altsetting 2, uac_clock_source_is_valid() fails.
>
> Other CM6631-devices doesn't expose iface 2-5. These extra exposed interfaces
> only observable difference between the Schiit and other devices.

[more evidence from last experiment deleted]

> If the attempts at modifying the rate of the SPDIF output from the
> CM6631 interferes with the intended operation, that might explain why
> the Schiit Bifrost still has issues with the workaround applied, while
> the Corda Daccord and Asus Xonar Essence One works fine.
>
> The theory doesn't fit that well with your previous experience where the
> problem first occurred long after plugging in the device, but it should be
> easy to test by ignoring the extra interfaces exposed by the Schiit:
>
> diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h
> index 64d25a7..f2fcc78 100644
> --- a/sound/usb/quirks-table.h
> +++ b/sound/usb/quirks-table.h
> @@ -3238,4 +3238,42 @@ YAMAHA_DEVICE(0x7010, "UB99"),
>         }
>  },
>
> +/* Schiit USB Interface */
> +{
> +       USB_DEVICE(0x0d8c, 0x0304),
> +       .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
> +               .ifnum = QUIRK_ANY_INTERFACE,
> +               .type = QUIRK_COMPOSITE,
> +               .data = & (const struct snd_usb_audio_quirk[]) {
> +                       {
> +                               .ifnum = 0,
> +                               .type = QUIRK_AUDIO_STANDARD_INTERFACE
> +                       },
> +                       {
> +                               .ifnum = 1,
> +                               .type = QUIRK_AUDIO_STANDARD_INTERFACE
> +                       },
> +                       {
> +                               .ifnum = 2,
> +                               .type = QUIRK_IGNORE_INTERFACE
> +                       },
> +                       {
> +                               .ifnum = 3,
> +                               .type = QUIRK_IGNORE_INTERFACE
> +                       },
> +                       {
> +                               .ifnum = 4,
> +                               .type = QUIRK_IGNORE_INTERFACE
> +                       },
> +                       {
> +                               .ifnum = 5,
> +                               .type = QUIRK_IGNORE_INTERFACE
> +                       },
> +                       {
> +                               .ifnum = -1
> +                       }
> +               }
> +       }
> +},
> +
>  #undef USB_DEVICE_VENDOR_SPEC

So here is what I did.

First, I got the latest Ubuntu Raring kernel sources 3.8.0.11

Then I applied the two patches to clock.c (the fix, and the debugging
output).  Note that once again I had to hand-patch the debugging
patch.  I should probably figure out what's wrong but one problem at a
time

Then I applied the patch above to quirks-table.h

Then I built the kernel, installed it and rebooted.

Then I did a tail -f /var/log/kern.log and started my experiment.
I've annotated the log file as I went by typing stuff into the
terminal and occasionally cutting and pasting.

As you will see below mid-way through I decided to try disabling pulse
audio, and was not able to make the Schiit misbehave after that point.

Prior to that, on the 5th play, I obsreved a problem, again as you
will see below.

This seems pretty inconclusive to me.

clh@temuko:~$ tail -f /var/log/kern.log
Mar 12 06:53:34 temuko kernel: [   22.296617] IPv6:
ADDRCONF(NETDEV_UP): eth0: link is not ready
Mar 12 06:53:39 temuko kernel: [   27.261776] wlan0: authenticate with
20:76:00:0d:dd:00
Mar 12 06:53:39 temuko kernel: [   27.265983] wlan0:
capabilities/regulatory prevented using AP HT/VHT configuration,
downgraded
Mar 12 06:53:39 temuko kernel: [   27.266199] wlan0: send auth to
20:76:00:0d:dd:00 (try 1/3)
Mar 12 06:53:39 temuko kernel: [   27.267707] wlan0: authenticated
Mar 12 06:53:39 temuko kernel: [   27.268070] ath5k 0000:02:02.0
wlan0: disabling HT/VHT due to WEP/TKIP use
Mar 12 06:53:39 temuko kernel: [   27.272045] wlan0: associate with
20:76:00:0d:dd:00 (try 1/3)
Mar 12 06:53:39 temuko kernel: [   27.274162] wlan0: RX AssocResp from
20:76:00:0d:dd:00 (capab=0x411 status=0 aid=1)
Mar 12 06:53:39 temuko kernel: [   27.274497] wlan0: associated
Mar 12 06:53:39 temuko kernel: [   27.274561] IPv6:
ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready

(plugging in the Schiit usb)

Mar 12 07:13:34 temuko kernel: [ 1221.640038] usb 1-3: new high-speed
USB device number 2 using ehci-pci
Mar 12 07:13:34 temuko kernel: [ 1221.797930] usb 1-3: config 1
interface 8 altsetting 0 bulk endpoint 0x1 has invalid maxpacket 64
Mar 12 07:13:34 temuko kernel: [ 1221.797943] usb 1-3: config 1
interface 8 altsetting 0 bulk endpoint 0x82 has invalid maxpacket 64
Mar 12 07:13:34 temuko kernel: [ 1221.800460] usb 1-3: New USB device
found, idVendor=0d8c, idProduct=0304
Mar 12 07:13:34 temuko kernel: [ 1221.800473] usb 1-3: New USB device
strings: Mfr=1, Product=2, SerialNumber=0
Mar 12 07:13:34 temuko kernel: [ 1221.800483] usb 1-3: Product: Schiit
USB Interface
Mar 12 07:13:34 temuko kernel: [ 1221.800492] usb 1-3: Manufacturer: CMEDIA
Mar 12 07:13:35 temuko kernel: [ 1222.498545] 2:1: resetting device
after change 48000 -> 192000
Mar 12 07:13:35 temuko kernel: [ 1222.505601] 2:1:2: cannot set freq 192000 (v2)
Mar 12 07:13:35 temuko kernel: [ 1222.512659] usbcore: registered new
interface driver usbhid
Mar 12 07:13:35 temuko kernel: [ 1222.512669] usbhid: USB HID core driver
Mar 12 07:13:35 temuko kernel: [ 1222.531972] usbcore: registered new
interface driver snd-usb-audio
Mar 12 07:13:35 temuko kernel: [ 1222.621073] input: CMEDIA Schiit USB
Interface as /devices/pci0000:00/0000:00:13.2/usb1/1-3/1-3:1.6/input/input7
Mar 12 07:13:35 temuko kernel: [ 1222.625014] hid-generic
0003:0D8C:0304.0001: input,hidraw0: USB HID v1.00 Device [CMEDIA
Schiit USB Interface] on usb-0000:00:13.2-3/input6
Mar 12 07:13:35 temuko kernel: [ 1222.740530] 2:1: resetting device
after change 192000 -> 44100

(the Schiit is plugged in; getting the lsusb -v)

(playing the 44.1/16 with aplayMar 12 07:16:50 temuko kernel: [
1418.008475] ath5k: ath5k_hw_get_isr: ISR: 0x00000080 IMR: 0x00000000
)

(note there is only one subdevice on the Schiit now)

(sudo aplay -l gives)

clh@temuko:~/WavTest$ sudo aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: IXP [ATI IXP], device 0: ATI IXP AC97 [ATI IXP AC97]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Modem [ATI IXP Modem], device 0: ATI IXP MC97 [ATI IXP MC97]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: Interface [Schiit USB Interface], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
clh@temuko:~/WavTest$

(anyway back to kern.log)

(44.1/16 is playing now, sounds fine.  stopping, and starting 96/24)

Mar 12 07:20:26 temuko kernel: [ 1633.717574] 2:1: resetting device
after change 44100 -> 96000

(96/24 is playing now, sounds fine.  stopping, and starting 44.1/16)

Mar 12 07:21:08 temuko kernel: [ 1675.403147] 2:1: resetting device
after change 96000 -> 44100

(44.1/16 sounds fine.  back to 96/24)

Mar 12 07:21:36 temuko kernel: [ 1703.531565] 2:1: resetting device
after change 44100 -> 96000

(96/24 sounds fine.  going to play both in same aplay session...)

Mar 12 07:22:33 temuko kernel: [ 1760.565034] current rate 96000 is
different from the runtime rate 44100

(ah 44.1/16 sounds weird now!  alvin & chipmunks through fuzzbox weird)

(here is output from the aplay session)

clh@temuko:~/WavTest$ sudo aplay -vD plughw:CARD=Interface,DEV=0 06* 2L*
Playing WAVE '06_-_Amadou & Mariam_-_Artistiya.wav' : Signed 16 bit
Little Endian, Rate 44100 Hz, Stereo
Plug PCM: Hardware PCM card 2 'Schiit USB Interface' device 0 subdevice 0
Its setup is:
  stream       : PLAYBACK
  access       : RW_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 2
  rate         : 44100
  exact rate   : 44100 (44100/1)
  msbits       : 16
  buffer_size  : 22050
  period_size  : 5513
  period_time  : 125011
  tstamp_mode  : NONE
  period_step  : 1
  avail_min    : 5513
  period_event : 0
  start_threshold  : 22050
  stop_threshold   : 22050
  silence_threshold: 0
  silence_size : 0
  boundary     : 1445068800
  appl_ptr     : 0
  hw_ptr       : 0
^CAborted by signal Interrupt...
clh@temuko:~/WavTest$

(I don't see anything obviously wrong in the above.  Playing 44.1/16 again)

Mar 12 07:24:43 temuko kernel: [ 1890.887441] 2:1: resetting device
after change 96000 -> 44100

(sounds ok this time, here is the aplay outut this time)

clh@temuko:~/WavTest$ sudo aplay -vD plughw:CARD=Interface,DEV=0 06* 2L*
Playing WAVE '06_-_Amadou & Mariam_-_Artistiya.wav' : Signed 16 bit
Little Endian, Rate 44100 Hz, Stereo
Plug PCM: Hardware PCM card 2 'Schiit USB Interface' device 0 subdevice 0
Its setup is:
  stream       : PLAYBACK
  access       : RW_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 2
  rate         : 44100
  exact rate   : 44100 (44100/1)
  msbits       : 16
  buffer_size  : 22050
  period_size  : 5513
  period_time  : 125011
  tstamp_mode  : NONE
  period_step  : 1
  avail_min    : 5513
  period_event : 0
  start_threshold  : 22050
  stop_threshold   : 22050
  silence_threshold: 0
  silence_size : 0
  boundary     : 1445068800
  appl_ptr     : 0
  hw_ptr       : 0
^CAborted by signal Interrupt...
clh@temuko:~/WavTest$

(turned pulse daemon off, in case weird interactions; trying to get
misbehaviour again)

Mar 12 07:28:51 temuko kernel: [ 2138.653480] 2:1: resetting device
after change 44100 -> 96000
Mar 12 07:29:04 temuko kernel: [ 2151.551293] 2:1: resetting device
after change 96000 -> 44100
Mar 12 07:29:08 temuko kernel: [ 2156.253409] 2:1: resetting device
after change 44100 -> 96000
Mar 12 07:29:19 temuko kernel: [ 2166.831417] 2:1: resetting device
after change 96000 -> 44100
Mar 12 07:29:29 temuko kernel: [ 2177.257902] 2:1: resetting device
after change 44100 -> 96000
Mar 12 07:29:45 temuko kernel: [ 2192.416641] 2:1: resetting device
after change 96000 -> 44100

(above is playing both starting with 44.1/16, transitioning now to 96/24)

Mar 12 07:32:56 temuko kernel: [ 2384.204363] 2:1: resetting device
after change 44100 -> 96000

(ok that worked.  trying gmusicbrowser...)

Mar 12 07:35:02 temuko kernel: [ 2509.853547] 2:1: resetting device
after change 96000 -> 44100
Mar 12 07:35:26 temuko kernel: [ 2533.492142] 2:1: resetting device
after change 44100 -> 96000
Mar 12 07:35:33 temuko kernel: [ 2540.483191] 2:1: resetting device
after change 96000 -> 44100
Mar 12 07:35:43 temuko kernel: [ 2550.692427] 2:1: resetting device
after change 44100 -> 96000
Mar 12 07:36:11 temuko kernel: [ 2578.524177] 2:1: resetting device
after change 96000 -> 44100
Mar 12 07:36:16 temuko kernel: [ 2584.310190] 2:1: resetting device
after change 44100 -> 96000
Mar 12 07:36:43 temuko kernel: [ 2610.696514] 2:1: resetting device
after change 96000 -> 44100
Mar 12 07:37:12 temuko kernel: [ 2639.837835] 2:1: resetting device
after change 44100 -> 96000
Mar 12 07:37:21 temuko kernel: [ 2649.198426] 2:1: resetting device
after change 96000 -> 44100
Mar 12 07:37:30 temuko kernel: [ 2658.369623] 2:1: resetting device
after change 44100 -> 96000
Mar 12 07:37:53 temuko kernel: [ 2681.026230] 2:1: resetting device
after change 96000 -> 44100
Mar 12 07:38:11 temuko kernel: [ 2699.235112] 2:1: resetting device
after change 44100 -> 96000
Mar 12 07:38:59 temuko kernel: [ 2746.979980] 2:1: resetting device
after change 96000 -> 44100

(well all of that seemed to work ok, both jumping from one track to
the next and letting the player handle the transition)

^C
clh@temuko:~$

The lsusb -v is at http://paste.ubuntu.com/5607907/

What is my conclusion?  That I was unable to make it misbehave after I
turned off pulse audio...

I will keep playing with it on and off over the next little while and
report back.


--
Chris Hermansen · clhermansen "at" gmail "dot" com

C'est ma façon de parler.

------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user



[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux