summaryrefslogtreecommitdiffstats
path: root/configs
diff options
context:
space:
mode:
authorPaul Kocialkowski <contact@paulk.fr>2014-05-11 00:56:15 +0200
committerPaul Kocialkowski <contact@paulk.fr>2014-05-11 00:56:15 +0200
commit0bcd90da87361c7109d02e02950b5fb87674e10d (patch)
tree604edf876577258e93d1667b0b123f3df178bab9 /configs
parent415f68a8f66df504a7d5b6337b6765af3fe57695 (diff)
downloaddevice_goldelico_gta04-0bcd90da87361c7109d02e02950b5fb87674e10d.zip
device_goldelico_gta04-0bcd90da87361c7109d02e02950b5fb87674e10d.tar.gz
device_goldelico_gta04-0bcd90da87361c7109d02e02950b5fb87674e10d.tar.bz2
audio: Audio policy, TinyAlsa-Audio config cleanup, headset detection
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Diffstat (limited to 'configs')
-rw-r--r--configs/audio_policy.conf27
-rw-r--r--configs/tinyalsa-audio.xml57
2 files changed, 63 insertions, 21 deletions
diff --git a/configs/audio_policy.conf b/configs/audio_policy.conf
new file mode 100644
index 0000000..1d87e15
--- /dev/null
+++ b/configs/audio_policy.conf
@@ -0,0 +1,27 @@
+global_configuration {
+ attached_output_devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER
+ default_output_device AUDIO_DEVICE_OUT_SPEAKER
+ attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC
+}
+
+audio_hw_modules {
+ primary {
+ outputs {
+ primary {
+ sampling_rates 44100
+ channel_masks AUDIO_CHANNEL_OUT_STEREO
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE
+ flags AUDIO_OUTPUT_FLAG_PRIMARY
+ }
+ }
+ inputs {
+ primary {
+ sampling_rates 8000|11025|16000|22050|24000|32000|44100|48000
+ channel_masks AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_WIRED_HEADSET
+ }
+ }
+ }
+}
diff --git a/configs/tinyalsa-audio.xml b/configs/tinyalsa-audio.xml
index b04b510..701ded8 100644
--- a/configs/tinyalsa-audio.xml
+++ b/configs/tinyalsa-audio.xml
@@ -5,37 +5,35 @@
<device type="default">
<path type="enable">
- <ctrl name="DAC1 Digital Fine Playback Volume" value="60" />
+ <ctrl name="Codec Operation Mode" value="Option 1 (audio)" />
+ <ctrl name="DAC1 Analog Playback Switch" value="off" />
+ <ctrl name="DAC2 Analog Playback Switch" value="on" />
+
<ctrl name="DAC2 Digital Fine Playback Volume" value="60" />
- <ctrl name="DAC1 Digital Coarse Playback Volume" value="0" />
<ctrl name="DAC2 Digital Coarse Playback Volume" value="0" />
-
- <ctrl name="Headset Playback Volume" value="1" />
-
- <ctrl name="TX1 Digital Capture Volume" value="12" />
- <ctrl name="TX2 Digital Capture Volume" value="12" />
-
- <ctrl name="Analog Capture Volume" value="5" />
</path>
</device>
<device type="earpiece">
<path type="enable">
<ctrl name="Earpiece Mixer AudioL2" value="on" />
+
+ <ctrl name="DAC2 Analog Playback Volume" value="16" />
<ctrl name="Earpiece Playback Volume" value="3" />
</path>
<path type="disable">
<ctrl name="Earpiece Mixer AudioL2" value="off" />
+
<ctrl name="Earpiece Playback Volume" value="0" />
</path>
</device>
<device type="speaker">
<path type="enable">
- <ctrl name="DAC1 Analog Playback Volume" value="16" />
- <ctrl name="DAC2 Analog Playback Volume" value="16" />
<ctrl name="HandsfreeL Mux" value="AudioL2" />
<ctrl name="HandsfreeR Mux" value="AudioR2" />
<ctrl name="HandsfreeL Switch" value="on" />
<ctrl name="HandsfreeR Switch" value="on" />
+
+ <ctrl name="DAC2 Analog Playback Volume" value="16" />
</path>
<path type="disable">
<ctrl name="HandsfreeL Switch" value="off" />
@@ -45,13 +43,13 @@
<device type="wired-headphone">
<path type="enable">
<write name="/sys/class/gpio/gpio55/value" value="1" />
- <ctrl name="DAC1 Analog Playback Volume" value="10" />
- <ctrl name="DAC2 Analog Playback Volume" value="10" />
<ctrl name="HeadsetR Mixer AudioR2" value="on" />
<ctrl name="HeadsetL Mixer AudioL2" value="on" />
+
+ <ctrl name="DAC2 Analog Playback Volume" value="12" />
+ <ctrl name="Headset Playback Volume" value="1" />
</path>
<path type="disable">
- <write name="/sys/class/gpio/gpio55/value" value="0" />
<ctrl name="HeadsetR Mixer AudioR2" value="off" />
<ctrl name="HeadsetL Mixer AudioL2" value="off" />
</path>
@@ -59,13 +57,13 @@
<device type="wired-headset">
<path type="enable">
<write name="/sys/class/gpio/gpio55/value" value="1" />
- <ctrl name="DAC1 Analog Playback Volume" value="10" />
- <ctrl name="DAC2 Analog Playback Volume" value="10" />
<ctrl name="HeadsetR Mixer AudioR2" value="on" />
<ctrl name="HeadsetL Mixer AudioL2" value="on" />
+
+ <ctrl name="DAC2 Analog Playback Volume" value="12" />
+ <ctrl name="Headset Playback Volume" value="1" />
</path>
<path type="disable">
- <write name="/sys/class/gpio/gpio55/value" value="0" />
<ctrl name="HeadsetR Mixer AudioR2" value="off" />
<ctrl name="HeadsetL Mixer AudioL2" value="off" />
</path>
@@ -76,6 +74,13 @@
rate="44100" channels="2" format="PCM_16"
period_size="1024" period_count="4">
+ <device type="default">
+ <path type="enable">
+ <ctrl name="TX1 Capture Route" value="Analog" />
+ <ctrl name="TX1 Digital Capture Volume" value="12" />
+ <ctrl name="Analog Capture Volume" value="5" />
+ </path>
+ </device>
<device type="builtin-mic">
<path type="enable">
<ctrl name="Analog Left Main Mic Capture Switch" value="on" />
@@ -86,6 +91,7 @@
</device>
<device type="wired-headset">
<path type="enable">
+ <write name="/sys/devices/virtual/gpio/gpio23/value" value="0" />
<ctrl name="Analog Left Headset Mic Capture Switch" value="on" />
</path>
<path type="disable">
@@ -95,23 +101,32 @@
</input>
<modem card="0" device="0">
- <device type="earpiece">
+
+ <device type="default">
<path type="enable">
<ctrl name="Voice route" value="Voice to twl4030" />
+ <ctrl name="DAC Voice Analog Downlink Switch" value="on" />
+ </path>
+ <path type="disable">
+ <ctrl name="Voice route" value="Voice to SoC" />
+ <ctrl name="DAC Voice Analog Downlink Switch" value="off" />
+ </path>
+ </device>
+ <device type="earpiece">
+ <path type="enable">
<ctrl name="Earpiece Mixer Voice" value="on" />
+
<ctrl name="Earpiece Playback Volume" value="3" />
<ctrl name="DAC Voice Digital Downlink Volume" value="40" />
- <ctrl name="DAC Voice Analog Downlink Switch" value="on" />
<ctrl name="Analog Left Main Mic Capture Switch" attr="mic" value="on" />
<ctrl name="DAC Voice Analog Downlink Volume" attr="voice-volume" value="0-15" />
</path>
<path type="disable">
- <ctrl name="Voice route" value="Voice to SoC" />
<ctrl name="Earpiece Mixer Voice" value="off" />
+
<ctrl name="Earpiece Playback Volume" value="0" />
<ctrl name="DAC Voice Digital Downlink Volume" value="0" />
- <ctrl name="DAC Voice Analog Downlink Switch" value="off" />
<ctrl name="Analog Left Main Mic Capture Switch" attr="mic" value="off" />
</path>