Guest User

audio_policy.conf

a guest
Jan 13th, 2019
10
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Global configuration section:
  2. # - lists input and output devices always present on the device
  3. # as well as the output device selected by default.
  4. # Devices are designated by a string that corresponds to the enum in audio.h
  5. # - defines whether the speaker output path uses DRC
  6. # "TRUE" means DRC is enabled, "FALSE" or omission means DRC isn't used.
  7.  
  8. global_configuration {
  9. attached_output_devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_TELEPHONY_TX
  10. default_output_device AUDIO_DEVICE_OUT_SPEAKER
  11. attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_BACK_MIC|AUDIO_DEVICE_IN_REMOTE_SUBMIX|AUDIO_DEVICE_IN_FM_TUNER|AUDIO_DEVICE_IN_TELEPHONY_RX
  12. }
  13.  
  14. # audio hardware module section: contains descriptors for all audio hw modules present on the
  15. # device. Each hw module node is named after the corresponding hw module library base name.
  16. # For instance, "primary" corresponds to audio.primary.<device>.so.
  17. # The "primary" module is mandatory and must include at least one output with
  18. # AUDIO_OUTPUT_FLAG_PRIMARY flag.
  19. # Each module descriptor contains one or more output profile descriptors and zero or more
  20. # input profile descriptors. Each profile lists all the parameters supported by a given output
  21. # or input stream category.
  22. # The "channel_masks", "formats", "devices" and "flags" are specified using strings corresponding
  23. # to enums in audio.h and audio_policy.h. They are concatenated by use of "|" without space or "\n".
  24.  
  25. audio_hw_modules {
  26. primary {
  27. outputs {
  28. primary {
  29. sampling_rates 44100|48000
  30. channel_masks AUDIO_CHANNEL_OUT_STEREO
  31. formats AUDIO_FORMAT_PCM_16_BIT
  32. 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_LINE|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET|AUDIO_DEVICE_OUT_FM
  33. flags AUDIO_OUTPUT_FLAG_FAST|AUDIO_OUTPUT_FLAG_PRIMARY
  34. }
  35. deep_buffer {
  36. sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000
  37. channel_masks AUDIO_CHANNEL_OUT_STEREO
  38. formats AUDIO_FORMAT_PCM_16_BIT
  39. 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_LINE|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET
  40. flags AUDIO_OUTPUT_FLAG_DEEP_BUFFER
  41. }
  42. compress_offload {
  43. sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000|88200|96000|176400|192000
  44. channel_masks AUDIO_CHANNEL_OUT_MONO|AUDIO_CHANNEL_OUT_STEREO
  45. formats AUDIO_FORMAT_MP3|AUDIO_FORMAT_AAC_LC|AUDIO_FORMAT_AAC_HE_V1|AUDIO_FORMAT_AAC_HE_V2|AUDIO_FORMAT_FLAC
  46. 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_LINE
  47. flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING
  48. }
  49. voice_tx {
  50. sampling_rates 8000|16000|48000
  51. channel_masks AUDIO_CHANNEL_OUT_STEREO|AUDIO_CHANNEL_OUT_MONO
  52. formats AUDIO_FORMAT_PCM_16_BIT
  53. devices AUDIO_DEVICE_OUT_TELEPHONY_TX
  54. }
  55. }
  56. inputs {
  57. primary {
  58. sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000
  59. channel_masks AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO
  60. formats AUDIO_FORMAT_PCM_16_BIT
  61. devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_WIRED_HEADSET|AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET|AUDIO_DEVICE_IN_BACK_MIC|AUDIO_DEVICE_IN_FM_TUNER
  62. }
  63. voice_rx {
  64. sampling_rates 8000|16000|48000
  65. channel_masks AUDIO_CHANNEL_IN_STEREO|AUDIO_CHANNEL_IN_MONO
  66. formats AUDIO_FORMAT_PCM_16_BIT
  67. devices AUDIO_DEVICE_IN_TELEPHONY_RX
  68. }
  69. }
  70. }
  71. a2dp {
  72. outputs {
  73. a2dp {
  74. sampling_rates 44100
  75. channel_masks AUDIO_CHANNEL_OUT_STEREO
  76. formats AUDIO_FORMAT_PCM_16_BIT
  77. devices AUDIO_DEVICE_OUT_ALL_A2DP
  78. }
  79. }
  80. }
  81. usb {
  82. outputs {
  83. usb_accessory {
  84. sampling_rates 44100
  85. channel_masks AUDIO_CHANNEL_OUT_STEREO
  86. formats AUDIO_FORMAT_PCM_16_BIT
  87. devices AUDIO_DEVICE_OUT_USB_ACCESSORY
  88. }
  89. usb_device {
  90. sampling_rates dynamic
  91. channel_masks dynamic
  92. formats dynamic
  93. devices AUDIO_DEVICE_OUT_USB_DEVICE
  94. }
  95. }
  96. inputs {
  97. usb_device {
  98. sampling_rates dynamic
  99. channel_masks AUDIO_CHANNEL_IN_STEREO
  100. formats AUDIO_FORMAT_PCM_16_BIT
  101. devices AUDIO_DEVICE_IN_USB_DEVICE
  102. }
  103. }
  104. }
  105. r_submix {
  106. outputs {
  107. submix {
  108. sampling_rates 48000
  109. channel_masks AUDIO_CHANNEL_OUT_STEREO
  110. formats AUDIO_FORMAT_PCM_16_BIT
  111. devices AUDIO_DEVICE_OUT_REMOTE_SUBMIX
  112. }
  113. }
  114. inputs {
  115. submix {
  116. sampling_rates 48000
  117. channel_masks AUDIO_CHANNEL_IN_STEREO
  118. formats AUDIO_FORMAT_PCM_16_BIT
  119. devices AUDIO_DEVICE_IN_REMOTE_SUBMIX
  120. }
  121. }
  122. }
  123. }
RAW Paste Data