ALSA: usb-audio: parse clock topology of UAC2 devices
authorDaniel Mack <daniel@caiaq.de>
Mon, 31 May 2010 12:51:31 +0000 (14:51 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 31 May 2010 16:16:59 +0000 (18:16 +0200)
commit79f920fbff566ffc9de44111eb1456a3cef310f0
tree97b574ee648320163fcbcf8793b23e826fb3a1f8
parent7176d37a28fa4ea7e32815007673f578cdcebf51
ALSA: usb-audio: parse clock topology of UAC2 devices

Audio devices which comply to the UAC2 standard can export complex clock
topologies in its descriptors and set up links between them.

The entities that are defined are

 - clock sources, which define the end-leafs.
 - clock selectors, which act as switch to select one out of many
   possible clocks sources.
 - clock multipliers, which have an input clock source, and act as clock
   source again. They can be used to derive one clock from another.

All sample rate changes, clock validity queries and the like must go to
clock source elements, while clock selectors and multipliers can be used
as terminal clock source.

The following patch adds a parser for these elements and functions to
iterate over the tree and find the leaf nodes (clock sources).

The samplerate set functions were moved to the new clock.c file.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/Makefile
sound/usb/card.c
sound/usb/card.h
sound/usb/clock.c [new file with mode: 0644]
sound/usb/clock.h [new file with mode: 0644]
sound/usb/endpoint.c
sound/usb/format.c
sound/usb/pcm.c
sound/usb/usbaudio.h