1 -- Copyright 2014 Álvaro Fernández Rojas <noltari@gmail.com>
2 -- Licensed to the public under the Apache License 2.0.
4 m = Map("shairplay", "Shairplay", translate("Shairplay is a simple AirPlay server implementation, here you can configure the settings."))
6 s = m:section(TypedSection, "shairplay", "")
10 enable=s:option(Flag, "disabled", translate("Enabled"))
14 enable.rmempty = false
15 respawn=s:option(Flag, "respawn", translate("Respawn"))
16 respawn.default = false
18 apname = s:option(Value, "apname", translate("Airport Name"))
21 port=s:option(Value, "port", translate("Port"))
23 port.datatype = "port"
25 pw = s:option(Value, "password", translate("Password"))
29 hwaddr=s:option(Value, "hwaddr", translate("HW Address"))
31 hwaddr.datatype = "macaddr"
33 ao_driver=s:option(ListValue, "ao_driver", translate("AO Driver"))
34 ao_driver:value("", translate("Default"))
35 ao_driver:value("alsa")
36 --ao_driver:value("alsa05")
37 --ao_driver:value("arts")
38 --ao_driver:value("esd")
39 --ao_driver:value("irix")
40 --ao_driver:value("nas")
41 ao_driver:value("oss")
42 --ao_driver:value("sun")
44 ao_devicename=s:option(Value, "ao_devicename", translate("AO Device Name"))
45 ao_devicename.rmempty = true
47 ao_deviceid = s:option(ListValue, "ao_deviceid", translate("AO Device ID"))
48 ao_deviceid.rmempty = true
49 ao_deviceid:value("", translate("Default"))
50 local pats = io.popen("find /proc/asound/ -type d -name 'card*' | sort")
55 if not l then break end
57 l = string.gsub(l, "/proc/asound/card", "")