From 04324ccc75f96b3ed7aad1c866d1b7925e977bdf Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 26 Nov 2012 16:24:02 +0100 Subject: 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 --- sound/usb/card.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sound/usb/card.h') 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 { unsigned int nr_rates; /* number of rate table entries */ unsigned int *rate_table; /* rate table */ unsigned char clock; /* associated clock */ + struct snd_pcm_chmap_elem *chmap; /* (optional) channel map */ }; struct snd_usb_substream; @@ -109,6 +110,7 @@ struct snd_usb_substream { struct audioformat *cur_audiofmt; /* current audioformat pointer (for hw_params callback) */ snd_pcm_format_t pcm_format; /* current audio format (for hw_params callback) */ unsigned int channels; /* current number of channels (for hw_params callback) */ + unsigned int channels_max; /* max channels in the all audiofmts */ unsigned int cur_rate; /* current rate (for hw_params callback) */ unsigned int period_bytes; /* current period bytes (for hw_params callback) */ unsigned int altset_idx; /* USB data format: index of alternate setting */ -- cgit v1.2.3