From baf3522bd77cdb6eb8abe9cc1cfa07186ebcfebc Mon Sep 17 00:00:00 2001 From: SathishKumar Mani Date: Tue, 28 Aug 2012 11:51:50 -0700 Subject: [PATCH] audio: modify config files for lowlatency implementation Change-Id: Id38e6503a44f8d57deab458774bc3673e37e7a70 Signed-off-by: Iliyan Malchev --- audio_policy.conf | 9 +- snd_soc_msm_2x_Fusion3 | 620 +++++++++++++++++++++++++++++++++++++++-- 2 files changed, 612 insertions(+), 17 deletions(-) diff --git a/audio_policy.conf b/audio_policy.conf index cb77c73a8..f3fe4d51e 100644 --- a/audio_policy.conf +++ b/audio_policy.conf @@ -23,12 +23,19 @@ audio_hw_modules { primary { outputs { primary { - sampling_rates 44100 + sampling_rates 44100|48000 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|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL flags AUDIO_OUTPUT_FLAG_PRIMARY } + deep_buffer { + sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000 + channel_masks AUDIO_CHANNEL_OUT_STEREO + formats AUDIO_FORMAT_PCM_16_BIT + devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL + flags AUDIO_OUTPUT_FLAG_DEEP_BUFFER + } } inputs { primary { diff --git a/snd_soc_msm_2x_Fusion3 b/snd_soc_msm_2x_Fusion3 index 98c2c221f..0cc9c6b8b 100644 --- a/snd_soc_msm_2x_Fusion3 +++ b/snd_soc_msm_2x_Fusion3 @@ -240,11 +240,11 @@ SectionVerb Name "HiFi Low PowerBT SCO Rx" EnableSequence - '"INTERNAL_BT_SCO_RX Audio Mixer MultiMedia3':1:1 + 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia3':1:1 EndSequence DisableSequence - '"INTERNAL_BT_SCO_RX Audio Mixer MultiMedia3':1:0 + 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia3':1:0 EndSequence # ALSA PCMs @@ -256,11 +256,11 @@ SectionVerb Name "HiFi Low PowerBT SCO WB Rx" EnableSequence - '"INTERNAL_BT_SCO_RX Audio Mixer MultiMedia3':1:1 + 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia3':1:1 EndSequence DisableSequence - '"INTERNAL_BT_SCO_RX Audio Mixer MultiMedia3':1:0 + 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia3':1:0 EndSequence # ALSA PCMs @@ -1015,11 +1015,11 @@ SectionVerb Name "HiFi TunnelBT SCO Rx" EnableSequence - '"INTERNAL_BT_SCO_RX Audio Mixer MultiMedia4':1:1 + 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia4':1:1 EndSequence DisableSequence - '"INTERNAL_BT_SCO_RX Audio Mixer MultiMedia4':1:0 + 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia4':1:0 EndSequence # ALSA PCMs @@ -1031,11 +1031,11 @@ SectionVerb Name "HiFi TunnelBT SCO WB Rx" EnableSequence - '"INTERNAL_BT_SCO_RX Audio Mixer MultiMedia4':1:1 + 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia4':1:1 EndSequence DisableSequence - '"INTERNAL_BT_SCO_RX Audio Mixer MultiMedia4':1:0 + 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia4':1:0 EndSequence # ALSA PCMs @@ -1081,6 +1081,344 @@ SectionVerb EndSection } +SectionUseCase."HiFi Lowlatency" { +Comment "LowLatnecy mode playback use case" +SectionVerb + Name "HiFi Lowlatency" + + EnableSequence + 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:1 + EndSequence + + DisableSequence + 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:0 + EndSequence + + # ALSA PCMs + PlaybackPCM 14 + CapturePCM 14 + +EndSection + +SectionVerb + Name "HiFi LowlatencySpeaker FM Tx" + + EnableSequence + 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:1 + 'INTERNAL_FM_RX Audio Mixer MultiMedia5':1:1 + EndSequence + + DisableSequence + 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:0 + 'INTERNAL_FM_RX Audio Mixer MultiMedia5':1:0 + EndSequence + + # ALSA PCMs + PlaybackPCM 14 + +EndSection + +SectionVerb + Name "HiFi LowlatencyFM Tx" + + EnableSequence + 'INTERNAL_FM_RX Audio Mixer MultiMedia5':1:1 + EndSequence + + DisableSequence + 'INTERNAL_FM_RX Audio Mixer MultiMedia5':1:0 + EndSequence + + # ALSA PCMs + PlaybackPCM 14 + +EndSection + +SectionVerb + Name "HiFi LowlatencyHDMI" + + EnableSequence + 'HDMI Mixer MultiMedia5':1:1 + EndSequence + + DisableSequence + 'HDMI Mixer MultiMedia5':1:0 + EndSequence + + # ALSA PCMs + PlaybackPCM 14 + +EndSection + +SectionVerb + Name "HiFi LowlatencyBT SCO Rx" + + EnableSequence + 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia5':1:1 + EndSequence + + DisableSequence + 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia5':1:0 + EndSequence + + # ALSA PCMs + PlaybackPCM 14 + +EndSection + +SectionVerb + Name "HiFi LowlatencyBT SCO WB Rx" + + EnableSequence + 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia5':1:1 + EndSequence + + DisableSequence + 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia5':1:0 + EndSequence + + # ALSA PCMs + PlaybackPCM 14 + +EndSection + +SectionVerb + Name "HiFi LowlatencyPROXY Rx" + + EnableSequence + 'AFE_PCM_RX Audio Mixer MultiMedia5':1:1 + EndSequence + + DisableSequence + 'AFE_PCM_RX Audio Mixer MultiMedia5':1:0 + EndSequence + + # ALSA PCMs + PlaybackPCM 14 + +EndSection + +SectionVerb + Name "HiFi LowlatencyPROXY Tx" + + EnableSequence + EndSequence + + DisableSequence + EndSequence + + # ALSA PCMs + PlaybackPCM 14 + +EndSection + +SectionVerb + Name "HiFi LowlatencyPROXY Rx Speaker" + + EnableSequence + 'AFE_PCM_RX Audio Mixer MultiMedia5':1:1 + 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:1 + EndSequence + + DisableSequence + 'AFE_PCM_RX Audio Mixer MultiMedia5':1:0 + 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:0 + EndSequence + + # ALSA PCMs + PlaybackPCM 14 + +EndSection +SectionVerb + Name "HiFi LowlatencyPROXY Rx Earpiece" + + EnableSequence + 'AFE_PCM_RX Audio Mixer MultiMedia5':1:1 + 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:1 + EndSequence + + DisableSequence + 'AFE_PCM_RX Audio Mixer MultiMedia5':1:0 + 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:0 + EndSequence + + # ALSA PCMs + PlaybackPCM 14 + +EndSection +SectionVerb + Name "HiFi LowlatencyPROXY Rx Headphones" + + EnableSequence + 'AFE_PCM_RX Audio Mixer MultiMedia5':1:1 + 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:1 + EndSequence + + DisableSequence + 'AFE_PCM_RX Audio Mixer MultiMedia5':1:0 + 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:0 + EndSequence + + # ALSA PCMs + PlaybackPCM 14 + +EndSection +SectionVerb + Name "HiFi LowlatencyPROXY Rx ANC Headset" + + EnableSequence + 'AFE_PCM_RX Audio Mixer MultiMedia5':1:1 + 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:1 + EndSequence + + DisableSequence + 'AFE_PCM_RX Audio Mixer MultiMedia5':1:0 + 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:0 + EndSequence + + # ALSA PCMs + PlaybackPCM 14 + +EndSection +SectionVerb + Name "HiFi LowlatencyPROXY Rx Speaker Headset" + + EnableSequence + 'AFE_PCM_RX Audio Mixer MultiMedia5':1:1 + 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:1 + EndSequence + + DisableSequence + 'AFE_PCM_RX Audio Mixer MultiMedia5':1:0 + 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:0 + EndSequence + + # ALSA PCMs + PlaybackPCM 14 + +EndSection +SectionVerb + Name "HiFi LowlatencyPROXY Rx Speaker ANC Headset" + + EnableSequence + 'AFE_PCM_RX Audio Mixer MultiMedia5':1:1 + 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:1 + EndSequence + + DisableSequence + 'AFE_PCM_RX Audio Mixer MultiMedia5':1:0 + 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:0 + EndSequence + + # ALSA PCMs + PlaybackPCM 14 + +EndSection +} + +SectionUseCase."HiFi Lowlatency Rec" { +Comment "Recording use case" +SectionVerb + Name "HiFi Lowlatency Rec" + + EnableSequence + 'MultiMedia5 Mixer SLIM_0_TX':1:1 + EndSequence + + DisableSequence + 'MultiMedia5 Mixer SLIM_0_TX':1:0 + EndSequence + + # ALSA PCMs + CapturePCM 14 + PlaybackPCM 14 + +EndSection + +SectionVerb + Name "HiFi Lowlatency RecBT SCO Tx" + + EnableSequence + 'MultiMedia5 Mixer INTERNAL_BT_SCO_TX':1:1 + EndSequence + + DisableSequence + 'MultiMedia5 Mixer INTERNAL_BT_SCO_TX':1:0 + EndSequence + + # ALSA PCMs + CapturePCM 14 + PlaybackPCM 14 + +EndSection + +SectionVerb + Name "HiFi Lowlatency RecBT SCO WB Tx" + + EnableSequence + 'MultiMedia5 Mixer INTERNAL_BT_SCO_TX':1:1 + EndSequence + + DisableSequence + 'MultiMedia5 Mixer INTERNAL_BT_SCO_TX':1:0 + EndSequence + + # ALSA PCMs + CapturePCM 14 + PlaybackPCM 14 + +EndSection + +SectionVerb + Name "HiFi Lowlatency RecPROXY Rx" + + EnableSequence + EndSequence + + DisableSequence + EndSequence + + # ALSA PCMs + CapturePCM 14 + PlaybackPCM 14 + +EndSection + +SectionVerb + Name "HiFi Lowlatency RecPROXY Tx" + + EnableSequence + 'MultiMedia5 Mixer AFE_PCM_TX':1:1 + EndSequence + + DisableSequence + 'MultiMedia5 Mixer AFE_PCM_TX':1:0 + EndSequence + + # ALSA PCMs + CapturePCM 14 + PlaybackPCM 14 + +EndSection + +SectionVerb + Name "HiFi Lowlatency RecSSR QMIC" + + EnableSequence + 'MultiMedia5 Mixer SLIM_0_TX':1:1 + EndSequence + + DisableSequence + 'MultiMedia5 Mixer SLIM_0_TX':1:0 + EndSequence + + # ALSA PCMs + CapturePCM 14 + PlaybackPCM 14 + +EndSection +} + SectionDevice Name "Earpiece" Comment "Handset Rx device" @@ -2570,11 +2908,11 @@ SectionModifier Name "Play LPABT SCO Rx" EnableSequence - '"INTERNAL_BT_SCO_RX Audio Mixer MultiMedia3':1:1 + 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia3':1:1 EndSequence DisableSequence - '"INTERNAL_BT_SCO_RX Audio Mixer MultiMedia3':1:0 + 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia3':1:0 EndSequence # ALSA PCMs @@ -2586,11 +2924,11 @@ SectionModifier Name "Play LPABT SCO WB Rx" EnableSequence - '"INTERNAL_BT_SCO_RX Audio Mixer MultiMedia3':1:1 + 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia3':1:1 EndSequence DisableSequence - '"INTERNAL_BT_SCO_RX Audio Mixer MultiMedia3':1:0 + 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia3':1:0 EndSequence # ALSA PCMs @@ -3283,11 +3621,11 @@ SectionModifier Name "Play TunnelBT SCO Rx" EnableSequence - '"INTERNAL_BT_SCO_RX Audio Mixer MultiMedia4':1:1 + 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia4':1:1 EndSequence DisableSequence - '"INTERNAL_BT_SCO_RX Audio Mixer MultiMedia4':1:0 + 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia4':1:0 EndSequence # ALSA PCMs @@ -3299,11 +3637,11 @@ SectionModifier Name "Play TunnelBT SCO WB Rx" EnableSequence - '"INTERNAL_BT_SCO_RX Audio Mixer MultiMedia4':1:1 + 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia4':1:1 EndSequence DisableSequence - '"INTERNAL_BT_SCO_RX Audio Mixer MultiMedia4':1:0 + 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia4':1:0 EndSequence # ALSA PCMs @@ -3326,4 +3664,254 @@ SectionModifier PlaybackPCM 9 EndSection + + +SectionModifier + Name "Capture Lowlatency Music" + + EnableSequence + 'MultiMedia5 Mixer SLIM_0_TX':1:1 + EndSequence + + DisableSequence + 'MultiMedia5 Mixer SLIM_0_TX':1:0 + EndSequence + + # ALSA PCMs + CapturePCM 14 + PlaybackPCM 14 + +EndSection + +SectionModifier + Name "Capture Lowlatency Music" + + EnableSequence + 'MultiMedia5 Mixer SLIM_0_TX':1:1 + EndSequence + + DisableSequence + 'MultiMedia5 Mixer SLIM_0_TX':1:0 + EndSequence + + # ALSA PCMs + CapturePCM 14 + PlaybackPCM 14 + +EndSection + + +SectionModifier + Name "Capture Lowlatency MusicBT SCO Tx" + + EnableSequence + 'MultiMedia5 Mixer INTERNAL_BT_SCO_TX':1:1 + EndSequence + + DisableSequence + 'MultiMedia5 Mixer INTERNAL_BT_SCO_TX':1:0 + EndSequence + + # ALSA PCMs + CapturePCM 14 + PlaybackPCM 14 + +EndSection + +SectionModifier + Name "Capture Lowlatency MusicBT SCO WB Tx" + + EnableSequence + 'MultiMedia5 Mixer INTERNAL_BT_SCO_TX':1:1 + EndSequence + + DisableSequence + 'MultiMedia5 Mixer INTERNAL_BT_SCO_TX':1:0 + EndSequence + + # ALSA PCMs + CapturePCM 14 + PlaybackPCM 14 + +EndSection + +SectionModifier + Name "Play Lowlatency Music" + Comment "Modifier for Lowlatency music playback" + + EnableSequence + 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:1 + EndSequence + + DisableSequence + 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:0 + EndSequence + + # ALSA PCMs + CapturePCM 14 + PlaybackPCM 14 + +EndSection + +SectionModifier + Name "Play Lowlatency MusicSpeaker FM Tx" + Comment "Modifier for Lowlatency music playback" + + EnableSequence + 'INTERNAL_FM_RX Audio Mixer MultiMedia5':1:1 + 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:1 + EndSequence + + DisableSequence + 'INTERNAL_FM_RX Audio Mixer MultiMedia5':1:0 + 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:0 + EndSequence + + # ALSA PCMs + CapturePCM 14 + PlaybackPCM 14 + +EndSection + +SectionModifier + Name "Play Lowlatency MusicFM Tx" + Comment "Modifier for Lowlatency music playback on FM Tx" + + EnableSequence + 'INTERNAL_FM_RX Audio Mixer MultiMedia5':1:1 + EndSequence + + DisableSequence + 'INTERNAL_FM_RX Audio Mixer MultiMedia5':1:0 + EndSequence + + # ALSA PCMs + CapturePCM 14 + PlaybackPCM 14 + +EndSection + +SectionModifier + Name "Play Lowlatency MusicHDMI" + Comment "Modifier for music playback on HDMI" + + EnableSequence + 'HDMI Mixer MultiMedia5':1:1 + EndSequence + + DisableSequence + 'HDMI Mixer MultiMedia5':1:0 + EndSequence + + # ALSA PCMs + CapturePCM 14 + PlaybackPCM 14 + +EndSection + +SectionModifier + Name "Play Lowlatency MusicBT SCO Rx" + Comment "Modifier for music playback" + + EnableSequence + 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia5':1:1 + EndSequence + + DisableSequence + 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia5':1:0 + EndSequence + + # ALSA PCMs + CapturePCM 14 + PlaybackPCM 14 + +EndSection + +SectionModifier + Name "Play Lowlatency MusicBT SCO WB Rx" + Comment "Modifier for music playback" + + EnableSequence + 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia5':1:1 + EndSequence + + DisableSequence + 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia5':1:0 + EndSequence + + # ALSA PCMs + CapturePCM 14 + PlaybackPCM 14 + +EndSection + +SectionModifier + Name "Play Lowlatency MusicPROXY Rx" + + EnableSequence + 'AFE_PCM_RX Audio Mixer MultiMedia5':1:1 + EndSequence + + DisableSequence + 'AFE_PCM_RX Audio Mixer MultiMedia5':1:0 + EndSequence + + # ALSA PCMs + CapturePCM 14 + PlaybackPCM 14 + +EndSection + +SectionModifier + Name "Play Lowlatency MusicBT SCO Rx" + Comment "Modifier for music playback" + + EnableSequence + 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia5':1:1 + EndSequence + + DisableSequence + 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia5':1:0 + EndSequence + + # ALSA PCMs + CapturePCM 14 + PlaybackPCM 14 + +EndSection + +SectionModifier + Name "Play Lowlatency MusicBT SCO WB Rx" + Comment "Modifier for music playback" + + EnableSequence + 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia5':1:1 + EndSequence + + DisableSequence + 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia5':1:0 + EndSequence + + # ALSA PCMs + CapturePCM 14 + PlaybackPCM 14 + +EndSection + +SectionModifier + Name "Play Lowlatency MusicPROXY Rx" + + EnableSequence + 'AFE_PCM_RX Audio Mixer MultiMedia5':1:1 + EndSequence + + DisableSequence + 'AFE_PCM_RX Audio Mixer MultiMedia5':1:0 + EndSequence + + # ALSA PCMs + CapturePCM 14 + PlaybackPCM 14 + +EndSection # End of master file