From bbf3f7c67ef8e602f2702a578f2da8ac95161bde Mon Sep 17 00:00:00 2001 From: codeworkx Date: Sun, 12 Jun 2011 00:04:57 +0200 Subject: [PATCH] sound config (wip) --- asound.conf | 163 +++++++++++++++++++++++++++++++++++----------------- 1 file changed, 111 insertions(+), 52 deletions(-) diff --git a/asound.conf b/asound.conf index 6144596..e6cb735 100644 --- a/asound.conf +++ b/asound.conf @@ -1,61 +1,120 @@ +# Infos from /proc/asound # -# Copyright(c) 2010 Yamaha Corporation +# devices +# 0: [ 0] : control +# 4: [ 0- 0]: hardware dependent +# 16: [ 0- 0]: digital audio playback +# 24: [ 0- 0]: digital audio capture +# 33: : timer # - -# ---------------------------------------- -# PCM Interface +# pcm +# 00-00: hifiaudio mc1n2-da0-0 : : playback 1 : capture 1 # - -pcm.hifi { - type plug - slave.pcm { - type hw - card 0 - device 0 - format S16_LE - channels 2 - rate 44100 - } -} - -pcm.voice { - type plug - slave.pcm { - type hw - card 0 - device 1 - format S16_LE - channels 1 - rate 8000 - } -} - -pcm.bluetooth { - type plug - slave.pcm { - type hw - card 0 - device 2 - format S16_LE - channels 1 - rate 8000 - } -} - -# ---------------------------------------- -# Mixer Interface -# - -ctl.mc1n2 { - type hw - card 0 -} - -# ---------------------------------------- -# Hardware Dependant Interface +# timers +# G0: system timer : 5000.000us (10000000 ticks) +# P0-0-0: PCM playback 0-0-0 : SLAVE +# P0-0-1: PCM capture 0-0-1 : SLAVE # hwdep.mc1n2 { type hw card 0 } + +# ---------------------------------------- +# Mixer Interface +# + +ctl.AndroidPlayback { + type hw + card 0 # C1YMU823 +} + +ctl.AndroidCapture { + type hw + card 0 # C1YMU823 +} + +# ---------------------------------------- +# PCM Interface Playback +# + +pcm.AndroidPlayback { + type hooks + slave.pcm { + type hw + card 0 + device 16 # Must be of type "digital audio playback" + } +} + +pcm.AndroidPlayback_Speaker { + type hooks + slave.pcm { + type hw + card 0 + device 16 # Must be of type "digital audio playback" + } +} + +pcm.AndroidPlayback_Speaker_normal { + type hooks + slave.pcm { + type hw + card 0 + device 16 # Must be of type "digital audio playback" + } +} + +pcm.AndroidPlayback_Headset { +} + +pcm.AndroidPlayback_Speaker_incall { +} + +pcm.AndroidPlayback_Headset_incall { +} + +pcm.AndroidPlayback_Earpiece_incall { +} + +pcm.AndroidPlayback_Bluetooth { +} + +pcm.AndroidPlayback_Bluetooth_incall { +} + +# ---------------------------------------- +# PCM Interface Capture +# + +pcm.AndroidCapture { + type hooks + slave.pcm { + type hw + card 0 + device 24 + format S16_LE + channels 1 + rate 8000 + } + hooks.0 { + type ctl_elems + hook_args [ + { name 'Input Volume' value [ 95 95 ] } + { iface HWDEP name 'DAC Path' value 1 } + { iface HWDEP name 'Phone Path' value 0 } + { iface HWDEP name 'Rec Path' value 1 } + { iface HWDEP name 'Mic Path' value 1 } + ] + } +} + +pcm.AndroidCapture_Microphone { +} + +pcm.AndroidCapture_Speaker_normal { +} + +pcm.AndroidCapture_Speaker { +}