summaryrefslogtreecommitdiffstats
path: root/sound/usb/card.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-11-26 10:24:02 -0500
committerTakashi Iwai <tiwai@suse.de>2012-11-26 10:24:02 -0500
commit04324ccc75f96b3ed7aad1c866d1b7925e977bdf (patch)
tree8ac8f049686de15f2241ea991f03a79d663dc65e /sound/usb/card.h
parent7cc17a31ff5ca3d8e1719af88907beec7b1fd24e (diff)
ALSA: usb-audio: add channel map support
Add the support for channel maps of the PCM streams on USB audio devices. The channel map information is already found in ChannelConfig descriptor entries, which haven't been referred until now. Each chmap entry is added to audioformat list entry and copied to TLV dynamically instead of creating a whole chmap array. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/card.h')
-rw-r--r--sound/usb/card.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/usb/card.h b/sound/usb/card.h
index 814cb357ff88..8a751b4887ea 100644
--- a/sound/usb/card.h
+++ b/sound/usb/card.h
@@ -27,6 +27,7 @@ struct audioformat {
27 unsigned int nr_rates; /* number of rate table entries */ 27 unsigned int nr_rates; /* number of rate table entries */
28 unsigned int *rate_table; /* rate table */ 28 unsigned int *rate_table; /* rate table */
29 unsigned char clock; /* associated clock */ 29 unsigned char clock; /* associated clock */
30 struct snd_pcm_chmap_elem *chmap; /* (optional) channel map */
30}; 31};
31 32
32struct snd_usb_substream; 33struct snd_usb_substream;
@@ -109,6 +110,7 @@ struct snd_usb_substream {
109 struct audioformat *cur_audiofmt; /* current audioformat pointer (for hw_params callback) */ 110 struct audioformat *cur_audiofmt; /* current audioformat pointer (for hw_params callback) */
110 snd_pcm_format_t pcm_format; /* current audio format (for hw_params callback) */ 111 snd_pcm_format_t pcm_format; /* current audio format (for hw_params callback) */
111 unsigned int channels; /* current number of channels (for hw_params callback) */ 112 unsigned int channels; /* current number of channels (for hw_params callback) */
113 unsigned int channels_max; /* max channels in the all audiofmts */
112 unsigned int cur_rate; /* current rate (for hw_params callback) */ 114 unsigned int cur_rate; /* current rate (for hw_params callback) */
113 unsigned int period_bytes; /* current period bytes (for hw_params callback) */ 115 unsigned int period_bytes; /* current period bytes (for hw_params callback) */
114 unsigned int altset_idx; /* USB data format: index of alternate setting */ 116 unsigned int altset_idx; /* USB data format: index of alternate setting */