diff --git a/alsaaudio.c b/alsaaudio.c index 1cf3ed3..75e628b 100644 --- a/alsaaudio.c +++ b/alsaaudio.c @@ -1977,6 +1977,15 @@ alsamixer_getvolume(alsamixer_t *self, PyObject *args) elem = alsamixer_find_elem(self->handle,self->controlname,self->controlid); + if (!pcmtypeobj || (pcmtypeobj == Py_None)) { + if (self->pchannels) { + pcmtype = SND_PCM_STREAM_PLAYBACK; + } + } + else { + pcmtype = SND_PCM_STREAM_CAPTURE; + } + result = PyList_New(0); for (channel = 0; channel <= SND_MIXER_SCHN_LAST; channel++) {