Re: usb-audio:2: clock source 19 is not valid, cannot use

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

 



Daniel and list;


On Tue, Jun 3, 2014 at 10:44 AM, Daniel Mack <daniel@xxxxxxxxxx> wrote:
Hi Chris,

On 06/03/2014 07:26 PM, chris hermansen wrote:
> My ongoing attempts to have a happy Schiit Bifrost have hit a new
> speed-bump.  I am hoping for some enlightment and possibly ideas on how
> to fix.
>
> I have a CuBox-i4 running voyage linux with 3.14.0 kernel.  The CuBox-i4
> is connected to the Bifrost via USB (TOSLINK hardware appears incomplete
> on this machine and does not support audio rates above 48kHz, so for me
> this is not an option).  This is the original Bifrost USB interface with
> the CM6631, not the new version with the CM6631A receiver.
>
> As far as I can tell things are working correctly - sound plays, bit
> rates and depths appear to be correct in the /proc/asound file.
>
> However, in my syslog I see the message shown on the subject line, namely
>
> usb-audio:2: clock source 19 is not valid, cannot use

A clock source in the UAC2 topology is an entity that can be asked
whether it's valid or not (see 5.2.5.1.2 "Clock Validity Control" in the
UAC2 spec).

I looked at that section and realized immediately how little I understand of this topic.  Time to do some reading.  Unnecessary helplessness is so ugly.

Thanks very much for the reference!

Apparently, the clock source selected by the driver reports that it is
invalid (ie, missing phase lock of a optical link plug), and this is
what the driver reports.

Is there a clock selector in your descriptors? 'lsusb -v' will tell you
how the clock nets are interconnected, just follow the bCSourceID from
the input or output terminal back to the source.

I took a closer look at the output of lsusb -v.  I see five CLOCK_SOURCEs: those with bClockID 15, 16, 17, 18 and 19.

bClockIDs 15 through 18 are labelled as "Internal Programmable Clock".  bClockID 19 is as below:

      AudioControl Interface Descriptor:
        bLength                 8
        bDescriptorType        36
        bDescriptorSubtype     10 (CLOCK_SOURCE)
        bClockID               19
        bmAttributes         0x00 External Clock
        bmControls           0x07
          Clock Frequency Control (read/write)
          Clock Validity Control (read-only)
        bAssocTerminal          0
        iClockSource            0

I am guessing that this is the offending clock source based on the value of bClockID.

I don't see anything in the output of lsusb -v that refers to a "selector" (grep -i).  Maybe I misunderstand your question "Is there a clock selector in your descriptors".

You said "follow the bCSourceID from the input or output terminal back to the source".

Looking at the output of lsusb -v, I see that two terminals refer to bCSourceID 19:
- INPUT_TERMINAL bTerminalID 5 'SPDIF interface'
- OUTPUT_TERMINAL bTerminalID 10 'USB Streaming'

At this point, I can't seem to link things up.  When I play music, e.g. some 44.1kHz/16bit music, and I

# cat /proc/asound/card1/stream0

I see:

CMEDIA Schiit USB Interface at usb-ci_hdrc.0-1, high speed : USB Audio

Playback:
  Status: Running
    Interface = 1
    Altset = 2
    Packet Size = 127
    Momentary freq = 96008 Hz (0xc.0040)
    Feedback Format = 16.16
  Interface 1
    Altset 1
    Format: S16_LE
    Channels: 2
    Endpoint: 5 OUT (ASYNC)
    Rates: 44100, 48000, 88200, 96000, 192000
    Data packet interval: 125 us
  Interface 1
    Altset 2
    Format: S32_LE
    Channels: 2
    Endpoint: 5 OUT (ASYNC)
    Rates: 44100, 48000, 88200, 96000, 192000
    Data packet interval: 125 us

Capture:
  Status: Stop
  Interface 4
    Altset 1
    Format: S16_LE
    Channels: 2
    Endpoint: 8 IN (ASYNC)
    Rates: 44100, 48000, 88200, 96000, 192000
    Data packet interval: 125 us
  Interface 4
    Altset 2
    Format: S32_LE
    Channels: 2
    Endpoint: 8 IN (ASYNC)
    Rates: 44100, 48000, 88200, 96000, 192000
    Data packet interval: 125 us

Looking back to lsusb -v output, this seems to correspond with the Interface Descriptor whose bInterfaceNumber is 1, and in particular in the above example to bAlternateSetting 2.

But looking at the fields in that Interface Descriptor, I can't see what links me back to the INPUT or OUTPUT TERMINALs.

So, I am still a bit stuck.  Could I beg a bit more clarification, please?

You could add some printk()s to trace the flow in sound/usb/clock.c.
Most probably the code will select some other clock eventually and be
happy with it. In this case, the information which clock source that is
could be helpful.

I am trying to track down the source for the particular kernel I am using but I am not sure if it came from voyage or solid run.
 
We should really teach alsa-info.sh to dump the 'lsusb -v' output as well :)


 I've attached lsusb-v.out.bz2 in case it is of use.



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

C'est ma façon de parler.

Attachment: lsusb-v.out.bz2
Description: BZip2 compressed data

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
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