aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/clock.h
diff options
context:
space:
mode:
authorDaniel Mack <daniel@caiaq.de>2010-05-31 08:51:31 -0400
committerTakashi Iwai <tiwai@suse.de>2010-05-31 12:16:59 -0400
commit79f920fbff566ffc9de44111eb1456a3cef310f0 (patch)
tree97b574ee648320163fcbcf8793b23e826fb3a1f8 /sound/usb/clock.h
parent7176d37a28fa4ea7e32815007673f578cdcebf51 (diff)
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>
Diffstat (limited to 'sound/usb/clock.h')
-rw-r--r--sound/usb/clock.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/sound/usb/clock.h b/sound/usb/clock.h
new file mode 100644
index 000000000000..beb253684e2d
--- /dev/null
+++ b/sound/usb/clock.h
@@ -0,0 +1,12 @@
1#ifndef __USBAUDIO_CLOCK_H
2#define __USBAUDIO_CLOCK_H
3
4int snd_usb_init_sample_rate(struct snd_usb_audio *chip, int iface,
5 struct usb_host_interface *alts,
6 struct audioformat *fmt, int rate);
7
8int snd_usb_clock_find_source(struct snd_usb_audio *chip,
9 struct usb_host_interface *host_iface,
10 int entity_id);
11
12#endif /* __USBAUDIO_CLOCK_H */