/usr/share/doc/python-pyalsa/utils/remove-user-ctl.py is in python-pyalsa 1.0.29-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 | #! /usr/bin/python
# -*- Python -*-
from pyalsa.alsahcontrol import HControl, Element, Info
hctl = HControl(name='hw:1')
list = hctl.list()
for id in list:
elem = Element(hctl, id[1:])
info = Info(elem)
if info.is_user:
print 'Removing element %s' % repr(id)
hctl.element_remove(id[1:])
|