be a little bit more elaborate on the reason why we drop to software volume control if hw is not featureful enough for us

git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1827 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Lennart Poettering 2007-09-16 15:09:45 +00:00
parent 0469c84366
commit e17fbf0606

View file

@ -834,16 +834,17 @@ int pa__init(pa_module*m) {
if (snd_mixer_selem_has_playback_volume(u->mixer_elem)) { if (snd_mixer_selem_has_playback_volume(u->mixer_elem)) {
int i; int i;
for (i = 0;i < ss.channels; i++) { for (i = 0; i < ss.channels; i++)
if (!snd_mixer_selem_has_playback_channel(u->mixer_elem, i)) if (!snd_mixer_selem_has_playback_channel(u->mixer_elem, i))
break; break;
}
if (i == ss.channels) { if (i == ss.channels) {
pa_log_debug("ALSA device has separate volumes controls for all %u channels.", ss.channels);
u->sink->get_volume = sink_get_volume_cb; u->sink->get_volume = sink_get_volume_cb;
u->sink->set_volume = sink_set_volume_cb; u->sink->set_volume = sink_set_volume_cb;
snd_mixer_selem_get_playback_volume_range(u->mixer_elem, &u->hw_volume_min, &u->hw_volume_max); snd_mixer_selem_get_playback_volume_range(u->mixer_elem, &u->hw_volume_min, &u->hw_volume_max);
} } else
pa_log_info("ALSA device lacks separate volumes controls for all %u channels (%u available), falling back to software volume control.", ss.channels, i+1);
} }
if (snd_mixer_selem_has_playback_switch(u->mixer_elem)) { if (snd_mixer_selem_has_playback_switch(u->mixer_elem)) {