chiark
/
gitweb
/
~mdw
/
disorder
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9c72279
)
More detailed errors from mixer-alsa
author
Richard Kettlewell
<richard@fanticule>
Tue, 1 Jan 2008 14:35:25 +0000
(14:35 +0000)
committer
Richard Kettlewell
<richard@fanticule>
Tue, 1 Jan 2008 14:35:25 +0000
(14:35 +0000)
lib/mixer-alsa.c
patch
|
blob
|
blame
|
history
diff --git
a/lib/mixer-alsa.c
b/lib/mixer-alsa.c
index 7cf88788892c8f2088f629fc78f40bdf8b22f75e..a0e57670420ebb13c79087d0ffe04cfe751f8041 100644
(file)
--- a/
lib/mixer-alsa.c
+++ b/
lib/mixer-alsa.c
@@
-108,11
+108,13
@@
static int alsa_open(struct alsa_mixer_state *h) {
snd_mixer_selem_id_set_name(id, config->channel);
snd_mixer_selem_id_set_index(id, atoi(config->mixer));
if(!(h->elem = snd_mixer_find_selem(h->handle, id))) {
snd_mixer_selem_id_set_name(id, config->channel);
snd_mixer_selem_id_set_index(id, atoi(config->mixer));
if(!(h->elem = snd_mixer_find_selem(h->handle, id))) {
- error(0, "snd_mixer_find_selem returned NULL");
+ error(0, "device '%s' mixer control '%s,%s' does not exist",
+ config->device, config->channel, config->mixer);
goto error;
}
if(!snd_mixer_selem_has_playback_volume(h->elem)) {
goto error;
}
if(!snd_mixer_selem_has_playback_volume(h->elem)) {
- error(0, "configured mixer control has no playback volume");
+ error(0, "device '%s' mixer control '%s,%s' has no playback volume",
+ config->device, config->channel, config->mixer);
goto error;
}
if(snd_mixer_selem_is_playback_mono(h->elem)) {
goto error;
}
if(snd_mixer_selem_is_playback_mono(h->elem)) {
@@
-123,7
+125,8
@@
static int alsa_open(struct alsa_mixer_state *h) {
}
if(!snd_mixer_selem_has_playback_channel(h->elem, h->left)
|| !snd_mixer_selem_has_playback_channel(h->elem, h->right)) {
}
if(!snd_mixer_selem_has_playback_channel(h->elem, h->left)
|| !snd_mixer_selem_has_playback_channel(h->elem, h->right)) {
- error(0, "configured mixer control lacks required playback channels");
+ error(0, "device '%s' mixer control '%s,%s' lacks required playback channels",
+ config->device, config->channel, config->mixer);
goto error;
}
snd_mixer_selem_get_playback_volume_range(h->elem, &h->min, &h->max);
goto error;
}
snd_mixer_selem_get_playback_volume_range(h->elem, &h->min, &h->max);