ref: 62721182c40b2133f277f96c38c644b0c1e76900
parent: 29aa4996828e9052b4682e98e6cabc8986548a79
author: cinap_lenrek <[email protected]>
date: Thu Dec 6 19:36:15 EST 2012
audiohda: fix getoutamprange() same problem as previous commit. have to query function group if not Wampovrcap.
--- a/sys/src/9/pc/audiohda.c
+++ b/sys/src/9/pc/audiohda.c
@@ -511,7 +511,13 @@
getoutamprange(Widget *w)
{
uint r;
- r = cmd(w->id, Getparm, Outampcap);
+
+ if((w->cap & Woutampcap) == 0)
+ return 0;
+ if((w->cap & Wampovrcap) == 0)
+ r = cmd(w->fg->id, Getparm, Outampcap);
+ else
+ r = cmd(w->id, Getparm, Outampcap);
return (r >> 8) & 0x7f;
}