Re: [Alsa-user] usb-audio:2: clock source 19 is not valid, cannot use

2014-06-04 Thread Davor Herga
It is interesting that  # cat /proc/asound/card1/stream0 gives you the 
output of Altset = 2 and the Momentary freq = 96008 Hz (0xc.0040),
while you are playing 44.1kHz/16bit file. Shouldn't it be Altset = 1 and 
Momentary freq = 44100 Hz?

On 04. 06. 2014 02:02, chris hermansen wrote:
 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


--
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] usb-audio:2: clock source 19 is not valid, cannot use

2014-06-04 Thread Torstein Hegge
Hi,

I think you have more or less answered your own question, but:

On Tue, Jun 03, 2014 at 17:02:30 -0700, chris hermansen wrote:
 On Tue, Jun 3, 2014 at 10:44 AM, Daniel Mack dan...@zonque.org wrote:
  On 06/03/2014 07:26 PM, chris hermansen wrote:
   usb-audio:2: clock source 19 is not valid, cannot use
 
  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.

 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'
 
 But looking at the fields in that Interface Descriptor, I can't see what
 links me back to the INPUT or OUTPUT TERMINALs.

   AudioControl Interface Descriptor:
 bLength17
 bDescriptorType36
 bDescriptorSubtype  2 (INPUT_TERMINAL)
 bTerminalID 5
 wTerminalType  0x0605 SPDIF interface
 bAssocTerminal  0
 bCSourceID 19
 bNrChannels 2
 bmChannelConfig   0x0003
   Front Left (FL)
   Front Right (FR)
 bmControls0x0040
   Cluster Control (read-only)
 iChannelNames   0 
 iTerminal   0 
 [...]
   AudioControl Interface Descriptor:
 bLength12
 bDescriptorType36
 bDescriptorSubtype  3 (OUTPUT_TERMINAL)
 bTerminalID10
 wTerminalType  0x0101 USB Streaming
 bAssocTerminal  0
 bSourceID   5

That is the SPDIF INPUT_TERMINAL.

 bCSourceID 19
 bmControls 0x
 iTerminal   0 
 [...]
   AudioControl Interface Descriptor:
 bLength 8
 bDescriptorType36
 bDescriptorSubtype 10 (CLOCK_SOURCE)
 bClockID   19
 bmAttributes 0x00 External Clock 
 bmControls   0x07
   Clock Frequency Control (read/write)
   Clock Validity Control (read-only)
 bAssocTerminal  0
 iClockSource0 

So CLOCK_SOURCE 19 is an external clock from the optical input, only
used when using an SPDIF input, and only usable when an optical input is
connected.

Just to make things a bit more confusing, the SPDIF interface of the
CM6631 isn't connected to anything in the Schiit Bifrost, it uses a
separate CS8416 for SPDIF input. So I would expect the clock source 19
is not valid, cannot use message to show up even when connected to an
optical input.


Torstein

--
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] usb-audio:2: clock source 19 is not valid, cannot use

2014-06-04 Thread chris hermansen
Davor and list,

On Jun 4, 2014 1:02 AM, Davor Herga davor.he...@guest.arnes.si wrote:

 It is interesting that  # cat /proc/asound/card1/stream0 gives you the
output of Altset = 2 and the Momentary freq = 96008 Hz (0xc.0040),
 while you are playing 44.1kHz/16bit file. Shouldn't it be Altset = 1 and
Momentary freq = 44100 Hz?

No, I goofed. Sorry!



 On 04. 06. 2014 02:02, chris hermansen wrote:

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

I wrote the above text. Then I poked around some more, with some different
files. Then I pasted in the info below and forgot to change the above.

 # 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

...

Sorry again!!!
--
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] usb-audio:2: clock source 19 is not valid, cannot use

2014-06-04 Thread chris hermansen
Torstein and list,

On Jun 4, 2014 1:33 AM, Torstein Hegge he...@resisty.net wrote:

 Hi,

 I think you have more or less answered your own question, but:

 On Tue, Jun 03, 2014 at 17:02:30 -0700, chris hermansen wrote:
  On Tue, Jun 3, 2014 at 10:44 AM, Daniel Mack dan...@zonque.org wrote:
   On 06/03/2014 07:26 PM, chris hermansen wrote:
usb-audio:2: clock source 19 is not valid, cannot use
  
   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.
 
  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'
 
  But looking at the fields in that Interface Descriptor, I can't see what
  links me back to the INPUT or OUTPUT TERMINALs.
 
AudioControl Interface Descriptor:
  bLength17
  bDescriptorType36
  bDescriptorSubtype  2 (INPUT_TERMINAL)
  bTerminalID 5
  wTerminalType  0x0605 SPDIF interface
  bAssocTerminal  0
  bCSourceID 19
  bNrChannels 2
  bmChannelConfig   0x0003
Front Left (FL)
Front Right (FR)
  bmControls0x0040
Cluster Control (read-only)
  iChannelNames   0
  iTerminal   0
  [...]
AudioControl Interface Descriptor:
  bLength12
  bDescriptorType36
  bDescriptorSubtype  3 (OUTPUT_TERMINAL)
  bTerminalID10
  wTerminalType  0x0101 USB Streaming
  bAssocTerminal  0
  bSourceID   5

 That is the SPDIF INPUT_TERMINAL.

  bCSourceID 19
  bmControls 0x
  iTerminal   0
  [...]
AudioControl Interface Descriptor:
  bLength 8
  bDescriptorType36
  bDescriptorSubtype 10 (CLOCK_SOURCE)
  bClockID   19
  bmAttributes 0x00 External Clock
  bmControls   0x07
Clock Frequency Control (read/write)
Clock Validity Control (read-only)
  bAssocTerminal  0
  iClockSource0

 So CLOCK_SOURCE 19 is an external clock from the optical input, only
 used when using an SPDIF input, and only usable when an optical input is
 connected.

 Just to make things a bit more confusing, the SPDIF interface of the
 CM6631 isn't connected to anything in the Schiit Bifrost, it uses a
 separate CS8416 for SPDIF input. So I would expect the clock source 19
 is not valid, cannot use message to show up even when connected to an
 optical input.

Thank you very much for the additional explanation, Torstein.

I feel comfortable ignoring this message at this point.
--
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


[Alsa-user] usb-audio:2: clock source 19 is not valid, cannot use

2014-06-03 Thread chris hermansen
Good day, list members;

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

As I mentioned above, I am hoping that someone can enlightmen me as to
whether this is a problem that needs fixing, and if so offer some
suggestions on how I might go about this.

The alsa-info.sh is at

http://www.alsa-project.org/db/?f=f8b4a9c6a4280a0d8b6d5237989f77e93fb82afc


-- 
Chris Hermansen · clhermansen at gmail dot com

C'est ma façon de parler.
--
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] usb-audio:2: clock source 19 is not valid, cannot use

2014-06-03 Thread Daniel Mack
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).

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.

 As I mentioned above, I am hoping that someone can enlightmen me as to
 whether this is a problem that needs fixing, and if so offer some
 suggestions on how I might go about this.

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.

 The alsa-info.sh is at
 
 http://www.alsa-project.org/db/?f=f8b4a9c6a4280a0d8b6d5237989f77e93fb82afc

We should really teach alsa-info.sh to dump the 'lsusb -v' output as well :)


Best regards,
Daniel

--
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user


Re: [Alsa-user] usb-audio:2: clock source 19 is not valid, cannot use

2014-06-03 Thread chris hermansen
Daniel and list;


On Tue, Jun 3, 2014 at 10:44 AM, Daniel Mack dan...@zonque.org 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
bDescriptorType36
bDescriptorSubtype 10 (CLOCK_SOURCE)
bClockID   19
bmAttributes 0x00 External Clock
bmControls   0x07
  Clock Frequency Control (read/write)
  Clock Validity Control (read-only)
bAssocTerminal  0
iClockSource0

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.



  The alsa-info.sh is at
 
 
 http://www.alsa-project.org/db/?f=f8b4a9c6a4280a0d8b6d5237989f77e93fb82afc

 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.


lsusb-v.out.bz2
Description: