-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
amixer unable to find simple control 'master' 0 #24
Comments
amixer get master I am using analogue not HDMI |
how about this #22 |
okie, for raspberry pi user douban.py inside find "Master" > "PCM" fix the bug. |
有解决办法吗? |
def get_volume(self):
if self.platform == 'Linux':
volume = subprocess.check_output('amixer get Master | grep Mono: | cut -d " " -f 6', shell=True)
return volume[1:-3]
elif self.platform == 'Darwin':
return subprocess.check_output('osascript -e "output volume of (get volume settings)"', shell=True)
else:
return
# 调整音量大小
def change_volume(self, increment):
if increment == 1:
volume = int(self.volume) + 5
else:
volume = int(self.volume) - 5
if self.platform == 'Linux':
subprocess.Popen('amixer set Master ' + str(volume) + '% >/dev/null 2>&1', shell=True)
elif self.platform == 'Darwin':
subprocess.Popen('osascript -e "set volume output volume ' + str(volume) + '"', shell=True)
else:
pass 因为声卡不一样,上面的同学是把"Master" 转换成"PCM"就可以了,你可以看看你的声卡是哪种,替换master应该就可以了 http://blog.csdn.net/juncoder/article/details/39269595 这里也有查看的方法 |
多谢 大神 指点,现已搞定 |
hi, just found this post after i posted another issue for the same symptom :) |
What does this statement mean? What do you mean by "inside" and "find", are these commands? Please give full syntax. I've been struggling with this for too long. Thanks. |
Unable to adjust the volume, I'm using Raspberry pi user.
The text was updated successfully, but these errors were encountered: