SHARE
TWEET

Audio Policy A0001

a guest May 19th, 2018 180 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Global configuration section: lists input and output devices always present on the device
  2. # as well as the output device selected by default.
  3. # Devices are designated by a string that corresponds to the enum in audio.h
  4.  
  5. global_configuration {
  6.   attached_output_devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_TELEPHONY_TX
  7.   default_output_device AUDIO_DEVICE_OUT_SPEAKER
  8.   attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_BACK_MIC|AUDIO_DEVICE_IN_REMOTE_SUBMIX|AUDIO_DEVICE_IN_VOICE_CALL|AUDIO_DEVICE_IN_TELEPHONY_RX
  9.   speaker_drc_enabled true
  10. }
  11.  
  12. # audio hardware module section: contains descriptors for all audio hw modules present on the
  13. # device. Each hw module node is named after the corresponding hw module library base name.
  14. # For instance, "primary" corresponds to audio.primary.<device>.so.
  15. # The "primary" module is mandatory and must include at least one output with
  16. # AUDIO_OUTPUT_FLAG_PRIMARY flag.
  17. # Each module descriptor contains one or more output profile descriptors and zero or more
  18. # input profile descriptors. Each profile lists all the parameters supported by a given output
  19. # or input stream category.
  20. # The "channel_masks", "formats", "devices" and "flags" are specified using strings corresponding
  21. # to enums in audio.h and audio_policy.h. They are concatenated by use of "|" without space or "\n".
  22.  
  23. audio_hw_modules {
  24.   primary {
  25.     outputs {
  26.       primary {
  27.         sampling_rates 44100|48000
  28.         channel_masks AUDIO_CHANNEL_OUT_STEREO
  29.         formats AUDIO_FORMAT_PCM_16_BIT
  30.         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|AUDIO_DEVICE_OUT_PROXY
  31.         flags AUDIO_OUTPUT_FLAG_PRIMARY
  32.       }
  33. #      deep_buffer {
  34. #        sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000
  35. #        channel_masks AUDIO_CHANNEL_OUT_STEREO
  36. #        formats AUDIO_FORMAT_PCM_16_BIT
  37. #        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|AUDIO_DEVICE_OUT_PROXY
  38. #        flags AUDIO_OUTPUT_FLAG_DEEP_BUFFER
  39. #      }
  40.       multichannel {
  41.         sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000|96000
  42.         channel_masks dynamic
  43.         formats AUDIO_FORMAT_PCM_16_BIT
  44.         devices AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY
  45.         flags AUDIO_OUTPUT_FLAG_DIRECT
  46.       }
  47.       compress_offload {
  48.         sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000|64000|88200|96000|176400|192000
  49.         channel_masks AUDIO_CHANNEL_OUT_MONO|AUDIO_CHANNEL_OUT_STEREO|AUDIO_CHANNEL_OUT_2POINT1|AUDIO_CHANNEL_OUT_QUAD|AUDIO_CHANNEL_OUT_PENTA|AUDIO_CHANNEL_OUT_5POINT1|AUDIO_CHANNEL_OUT_6POINT1|AUDIO_CHANNEL_OUT_7POINT1
  50.         formats AUDIO_FORMAT_MP3|AUDIO_FORMAT_AAC_LC|AUDIO_FORMAT_AAC_HE_V1|AUDIO_FORMAT_AAC_HE_V2|AUDIO_FORMAT_MP2|AUDIO_FORMAT_PCM_16_BIT_OFFLOAD|AUDIO_FORMAT_PCM_24_BIT_OFFLOAD
  51.         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
  52.         flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING
  53.       }
  54.       incall_music {
  55.         sampling_rates 8000|16000|48000
  56.         channel_masks AUDIO_CHANNEL_OUT_MONO
  57.         formats AUDIO_FORMAT_PCM_16_BIT
  58.         devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO
  59.         flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_INCALL_MUSIC
  60.       }
  61.       voice_tx {
  62.         sampling_rates 8000|16000|48000
  63.         channel_masks AUDIO_CHANNEL_OUT_STEREO|AUDIO_CHANNEL_OUT_MONO
  64.         formats AUDIO_FORMAT_PCM_16_BIT
  65.         devices AUDIO_DEVICE_OUT_TELEPHONY_TX
  66.       }
  67.       voip_rx {
  68.         sampling_rates 8000|16000
  69.         channel_masks AUDIO_CHANNEL_OUT_MONO
  70.         formats AUDIO_FORMAT_PCM_16_BIT|AUDIO_FORMAT_AMR_NB|AUDIO_FORMAT_AMR_WB|AUDIO_FORMAT_QCELP|AUDIO_FORMAT_EVRC|AUDIO_FORMAT_EVRCB|AUDIO_FORMAT_EVRCWB|AUDIO_FORMAT_EVRCNW
  71.         devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO
  72.         flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_VOIP_RX
  73.       }
  74.     }
  75.     inputs {
  76.       primary {
  77.         sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000
  78.         channel_masks AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO|AUDIO_CHANNEL_IN_FRONT_BACK
  79.         formats AUDIO_FORMAT_PCM_16_BIT|AUDIO_FORMAT_AMR_NB|AUDIO_FORMAT_AMR_WB|AUDIO_FORMAT_QCELP|AUDIO_FORMAT_EVRC|AUDIO_FORMAT_EVRCB|AUDIO_FORMAT_EVRCWB|AUDIO_FORMAT_EVRCNW
  80.         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_VOICE_CALL
  81.       }
  82.       voice_rx {
  83.         sampling_rates 8000|16000|48000
  84.         channel_masks AUDIO_CHANNEL_IN_STEREO|AUDIO_CHANNEL_IN_MONO
  85.         formats AUDIO_FORMAT_PCM_16_BIT
  86.         devices AUDIO_DEVICE_IN_TELEPHONY_RX
  87.       }
  88.     }
  89.   }
  90.   a2dp {
  91.     outputs {
  92.       a2dp {
  93.         sampling_rates 44100
  94.         channel_masks AUDIO_CHANNEL_OUT_STEREO
  95.         formats AUDIO_FORMAT_PCM_16_BIT
  96.         devices AUDIO_DEVICE_OUT_ALL_A2DP
  97.       }
  98.     }
  99.   }
  100.   usb {
  101.     outputs {
  102.       usb_accessory {
  103.         sampling_rates 44100
  104.         channel_masks AUDIO_CHANNEL_OUT_STEREO
  105.         formats AUDIO_FORMAT_PCM_16_BIT
  106.         devices AUDIO_DEVICE_OUT_USB_ACCESSORY
  107.       }
  108.       usb_device {
  109.         sampling_rates dynamic
  110.         channel_masks dynamic
  111.         formats dynamic
  112.         devices AUDIO_DEVICE_OUT_USB_DEVICE
  113.       }
  114.     }
  115.     inputs {
  116.       usb_device {
  117.         sampling_rates dynamic
  118.         channel_masks dynamic
  119.         formats dynamic
  120.         devices AUDIO_DEVICE_IN_USB_DEVICE
  121.       }
  122.     }
  123.   }
  124.   r_submix {
  125.     outputs {
  126.       submix {
  127.         sampling_rates 48000
  128.         channel_masks AUDIO_CHANNEL_OUT_STEREO
  129.         formats AUDIO_FORMAT_PCM_16_BIT
  130.         devices AUDIO_DEVICE_OUT_REMOTE_SUBMIX
  131.       }
  132.     }
  133.     inputs {
  134.       submix {
  135.         sampling_rates 48000
  136.         channel_masks AUDIO_CHANNEL_IN_STEREO
  137.         formats AUDIO_FORMAT_PCM_16_BIT
  138.         devices AUDIO_DEVICE_IN_REMOTE_SUBMIX
  139.       }
  140.     }
  141.   }
  142. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top