alsa: include the alsa mixer control that is used in the property list

This commit is contained in:
Lennart Poettering 2009-04-13 22:48:29 +02:00
parent 6fd8fd18c2
commit 49dcf0940e
4 changed files with 7 additions and 4 deletions

View file

@ -1515,7 +1515,7 @@ void pa_alsa_init_proplist_pcm_info(pa_core *c, pa_proplist *p, snd_pcm_info_t *
pa_alsa_init_proplist_card(c, p, card);
}
void pa_alsa_init_proplist_pcm(pa_core *c, pa_proplist *p, snd_pcm_t *pcm) {
void pa_alsa_init_proplist_pcm(pa_core *c, pa_proplist *p, snd_pcm_t *pcm, snd_mixer_elem_t *elem) {
snd_pcm_hw_params_t *hwparams;
snd_pcm_info_t *info;
int bits, err;
@ -1531,6 +1531,9 @@ void pa_alsa_init_proplist_pcm(pa_core *c, pa_proplist *p, snd_pcm_t *pcm) {
pa_proplist_setf(p, "alsa.resolution_bits", "%i", bits);
}
if (elem)
pa_proplist_sets(p, "alsa.mixer_element", snd_mixer_selem_get_name(elem));
if ((err = snd_pcm_info(pcm, info)) < 0)
pa_log_warn("Error fetching PCM info: %s", snd_strerror(err));
else