2 LuCI - Lua Configuration Interface - Shairplay support
4 Copyright 2014 Álvaro Fernández Rojas <noltari@gmail.com>
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
10 http://www.apache.org/licenses/LICENSE-2.0
15 m = Map("shairplay", "Shairplay", translate("Shairplay is a simple AirPlay server implementation, here you can configure the settings."))
17 s = m:section(TypedSection, "shairplay", "")
21 enable=s:option(Flag, "disabled", translate("Enabled"))
25 respawn=s:option(Flag, "respawn", translate("Respawn"))
26 respawn.default = false
28 apname = s:option(Value, "apname", translate("Airport Name"))
31 port=s:option(Value, "port", translate("Port"))
33 port.datatype = "port"
35 pw = s:option(Value, "password", translate("Password"))
39 hwaddr=s:option(Value, "hwaddr", translate("HW Address"))
41 hwaddr.datatype = "macaddr"
43 ao_driver=s:option(ListValue, "ao_driver", translate("AO Driver"))
44 ao_driver:value("", translate("Default"))
45 ao_driver:value("alsa")
46 --ao_driver:value("alsa05")
47 --ao_driver:value("arts")
48 --ao_driver:value("esd")
49 --ao_driver:value("irix")
50 --ao_driver:value("nas")
51 ao_driver:value("oss")
52 --ao_driver:value("sun")
54 ao_devicename=s:option(Value, "ao_devicename", translate("AO Device Name"))
55 ao_devicename.rmempty = true
57 ao_deviceid = s:option(ListValue, "ao_deviceid", translate("AO Device ID"))
58 ao_deviceid.rmempty = true
59 ao_deviceid:value("", translate("Default"))
60 local pats = io.popen("find /proc/asound/ -type d -name 'card*' | sort")
65 if not l then break end
67 l = string.gsub(l, "/proc/asound/card", "")