Torstein and list;
On Sun, Mar 17, 2013 at 5:31 AM, Torstein Hegge <[email protected]> wrote:
> On Thu, Mar 14, 2013 at 10:13:17AM +0100, Torstein Hegge wrote:
>> If we can find some other explanation for the 'cannot get freq' and the
>> large negative rate you saw earlier, it might help to replace the
>> if (cur_rate != prev_rate) {
>> with
>> if (rate != prev_rate) {
>> so that we do the reset if the target rate is different from the
>> previous rate, ignoring what the device thinks its current rate is.
>
> I had another look at the logs. If we choose to selectively ignore the
> 'cannot get freq', the other problems occurred directly after a missing
> reset due to the device not reporting the just set rate when reading
> back the rate. I think this is worth trying.
>
>
> diff --git a/sound/usb/clock.c b/sound/usb/clock.c
> index 746ec9b..68e1ac3 100644
> --- a/sound/usb/clock.c
> +++ b/sound/usb/clock.c
> @@ -311,7 +311,7 @@ static int set_sample_rate_v2(struct snd_usb_audio *chip,
> int iface,
>
> /* Some devices doesn't respond to sample rate changes while the
> * interface is active. */
> - if (cur_rate != prev_rate) {
> + if (rate != prev_rate) {
> switch (chip->usb_id) {
> /* C-Media CM6610/CM6620/CM6631 */
> case USB_ID(0x054c, 0x06cf): /* Sony */
Ok, I've made that change. I've also put a "(v2)" in some of the
error message strings.
The kernel's compiled and I'm testing. Cutting to the chase, I can't
seem to get it to misbehave any more.
Here's the tail -f /var/log/kern.log with my comments interspersed:
clh@temuko:~$ tail -f /var/log/kern.log
Mar 17 19:17:01 temuko kernel: [ 19.810439] clean.
Mar 17 19:17:06 temuko kernel: [ 24.237448] wlan0: authenticate with
20:76:00:0d:dd:00
Mar 17 19:17:06 temuko kernel: [ 24.241875] wlan0:
capabilities/regulatory prevented using AP HT/VHT configuration,
downgraded
Mar 17 19:17:06 temuko kernel: [ 24.242097] wlan0: send auth to
20:76:00:0d:dd:00 (try 1/3)
Mar 17 19:17:06 temuko kernel: [ 24.243578] wlan0: authenticated
Mar 17 19:17:06 temuko kernel: [ 24.243903] ath5k 0000:02:02.0
wlan0: disabling HT/VHT due to WEP/TKIP use
Mar 17 19:17:06 temuko kernel: [ 24.244045] wlan0: associate with
20:76:00:0d:dd:00 (try 1/3)
Mar 17 19:17:06 temuko kernel: [ 24.246152] wlan0: RX AssocResp from
20:76:00:0d:dd:00 (capab=0x411 status=0 aid=2)
Mar 17 19:17:06 temuko kernel: [ 24.246485] wlan0: associated
Mar 17 19:17:06 temuko kernel: [ 24.246550] IPv6:
ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
(plugging in now)
Mar 17 19:21:31 temuko kernel: [ 290.700080] usb 1-3: new high-speed
USB device number 2 using ehci-pci
Mar 17 19:21:31 temuko kernel: [ 290.857817] usb 1-3: config 1
interface 8 altsetting 0 bulk endpoint 0x1 has invalid maxpacket 64
Mar 17 19:21:31 temuko kernel: [ 290.857830] usb 1-3: config 1
interface 8 altsetting 0 bulk endpoint 0x82 has invalid maxpacket 64
Mar 17 19:21:31 temuko kernel: [ 290.860286] usb 1-3: New USB device
found, idVendor=0d8c, idProduct=0304
Mar 17 19:21:31 temuko kernel: [ 290.860298] usb 1-3: New USB device
strings: Mfr=1, Product=2, SerialNumber=0
Mar 17 19:21:31 temuko kernel: [ 290.860309] usb 1-3: Product: Schiit
USB Interface
Mar 17 19:21:31 temuko kernel: [ 290.860320] usb 1-3: Manufacturer: CMEDIA
Mar 17 19:21:32 temuko kernel: [ 291.221135] usbcore: registered new
interface driver usbhid
Mar 17 19:21:32 temuko kernel: [ 291.221146] usbhid: USB HID core driver
Mar 17 19:21:32 temuko kernel: [ 291.328752] 2:1: resetting device
after change 48000 -> 192000 (v2)
Mar 17 19:21:32 temuko kernel: [ 291.340612] usbcore: registered new
interface driver snd-usb-audio
Mar 17 19:21:32 temuko kernel: [ 291.422005] input: CMEDIA Schiit USB
Interface as /devices/pci0000:00/0000:00:13.2/usb1/1-3/1-3:1.6/input/input7
Mar 17 19:21:32 temuko kernel: [ 291.422576] 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
(ok continuing on with this device:
plughw:CARD=Interface,DEV=0
Schiit USB Interface, USB Audio
Hardware device with all software conversions
)
(aplay on the 44.1/16
)Mar 17 19:23:48 temuko kernel: [ 427.718349] 2:1: resetting device
after change 192000 -> 44100 (v2)
(that's working fine, see my (v2) above. interesting it was at 192 before)
(ctrl-c and aplay on the 96/24 file)
Mar 17 19:24:57 temuko kernel: [ 496.946829] 2:1: resetting device
after change 44100 -> 96000 (v2)
(also good, ctrl-c and back to the 44.1/16)
Mar 17 19:25:23 temuko kernel: [ 522.368867] 2:1: resetting device
after change 96000 -> 44100 (v2)
(also good, ctrl-c and back to the 96/24)
Mar 17 19:25:44 temuko kernel: [ 543.792783] 2:1: resetting device
after change 44100 -> 96000 (v2)
(also good, ctrl-c and trying the 44.1/16 then the 96/24 on the same
command line)
Mar 17 19:26:27 temuko kernel: [ 586.737842] 2:1: resetting device
after change 96000 -> 44100 (v2)
(that works, letting it play and transition on its own)
Mar 17 19:29:39 temuko kernel: [ 778.524774] 2:1: resetting device
after change 44100 -> 96000 (v2)
(that works too. flipping back and forth some more)
Mar 17 19:30:35 temuko kernel: [ 834.412413] 2:1: resetting device
after change 96000 -> 44100 (v2)
Mar 17 19:30:46 temuko kernel: [ 846.091818] 2:1: resetting device
after change 44100 -> 96000 (v2)
Mar 17 19:31:03 temuko kernel: [ 862.125787] 2:1: resetting device
after change 96000 -> 44100 (v2)
Mar 17 19:31:10 temuko kernel: [ 869.602377] 2:1: resetting device
after change 44100 -> 96000 (v2)
Mar 17 19:31:24 temuko kernel: [ 883.242775] 2:1: resetting device
after change 96000 -> 44100 (v2)
Mar 17 19:31:27 temuko kernel: [ 886.431458] 2:1: resetting device
after change 44100 -> 96000 (v2)
Mar 17 19:31:34 temuko kernel: [ 893.940796] 2:1: resetting device
after change 96000 -> 44100 (v2)
Mar 17 19:31:39 temuko kernel: [ 898.440258] 2:1: resetting device
after change 44100 -> 96000 (v2)
Mar 17 19:31:47 temuko kernel: [ 906.708833] 2:1: resetting device
after change 96000 -> 44100 (v2)
Mar 17 19:31:51 temuko kernel: [ 911.023781] 2:1: resetting device
after change 44100 -> 96000 (v2)
Mar 17 19:32:06 temuko kernel: [ 925.242116] 2:1: resetting device
after change 96000 -> 44100 (v2)
Mar 17 19:32:09 temuko kernel: [ 928.965283] 2:1: resetting device
after change 44100 -> 96000 (v2)
Mar 17 19:32:19 temuko kernel: [ 938.308085] 2:1: resetting device
after change 96000 -> 44100 (v2)
(well, I can't seem to get it to misbehave any more...)
^C
clh@temuko:~$
Torstein, I think you might have it nailed here. On behalf of us
Schiit owners let me offer you a huge huge thank you for your patience
and debugging here.
I can't do any more testing for the next two weeks as I will be away
(not in the same country as the Schiit and the old Toshiba). But I
can pick up again in early April if there's more to do.
Best to all
--
Chris Hermansen · clhermansen "at" gmail "dot" com
C'est ma façon de parler.
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-user