From 04e9214065637a6ad17983d18475eb4e67c2c680 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 20 Jan 2009 21:00:35 +0100 Subject: export pa_channel_map_superset() --- src/modules/alsa/alsa-util.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'src/modules/alsa/alsa-util.c') diff --git a/src/modules/alsa/alsa-util.c b/src/modules/alsa/alsa-util.c index eb7042b8..b7f44b85 100644 --- a/src/modules/alsa/alsa-util.c +++ b/src/modules/alsa/alsa-util.c @@ -574,25 +574,6 @@ static const struct pa_alsa_profile_info device_table[] = { {{ 0, { 0 }}, NULL, NULL, NULL, 0 } }; -static pa_bool_t channel_map_superset(const pa_channel_map *a, const pa_channel_map *b) { - pa_bool_t in_a[PA_CHANNEL_POSITION_MAX]; - unsigned i; - - pa_assert(a); - pa_assert(b); - - memset(in_a, 0, sizeof(in_a)); - - for (i = 0; i < a->channels; i++) - in_a[a->map[i]] = TRUE; - - for (i = 0; i < b->channels; i++) - if (!in_a[b->map[i]]) - return FALSE; - - return TRUE; -} - snd_pcm_t *pa_alsa_open_by_device_id( const char *dev_id, char **dev, @@ -629,7 +610,7 @@ snd_pcm_t *pa_alsa_open_by_device_id( i = 0; for (;;) { - if ((direction > 0) == channel_map_superset(&device_table[i].map, map)) { + if ((direction > 0) == pa_channel_map_superset(&device_table[i].map, map)) { pa_sample_spec try_ss; pa_log_debug("Checking for %s (%s)", device_table[i].name, device_table[i].alsa_name); -- cgit