Yogesh Agrawal | 9240c1a | 2013-10-16 15:13:32 +0530 | [diff] [blame] | 1 | # |
| 2 | # Audio policy configuration for nvidia device builds |
| 3 | # |
| 4 | |
| 5 | # Global configuration section: lists input and output devices always present on the device |
| 6 | # as well as the output device selected by default. |
| 7 | # Devices are designated by a string that corresponds to the enum in audio.h |
| 8 | |
| 9 | global_configuration { |
| 10 | attached_output_devices AUDIO_DEVICE_OUT_SPEAKER |
| 11 | default_output_device AUDIO_DEVICE_OUT_SPEAKER |
Glenn Kasten | e97c30f | 2014-08-28 13:37:38 -0700 | [diff] [blame] | 12 | attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_REMOTE_SUBMIX |
Jean-Michel Trivi | 3ac48b3 | 2014-06-05 16:17:28 -0700 | [diff] [blame] | 13 | speaker_drc_enabled TRUE |
Yogesh Agrawal | 9240c1a | 2013-10-16 15:13:32 +0530 | [diff] [blame] | 14 | } |
| 15 | |
| 16 | # audio hardware module section: contains descriptors for all audio hw modules present on the |
| 17 | # device. Each hw module node is named after the corresponding hw module library base name. |
| 18 | # For instance, "primary" corresponds to audio.primary.<device>.so. |
| 19 | # The "primary" module is mandatory and must include at least one output with |
| 20 | # AUDIO_OUTPUT_FLAG_PRIMARY flag. |
| 21 | # Each module descriptor contains one or more output profile descriptors and zero or more |
| 22 | # input profile descriptors. Each profile lists all the parameters supported by a given output |
| 23 | # or input stream category. |
| 24 | # The "channel_masks", "formats", "devices" and "flags" are specified using strings corresponding |
| 25 | # to enums in audio.h and audio_policy.h. They are concatenated by use of "|" without space or "\n". |
| 26 | |
| 27 | audio_hw_modules { |
| 28 | primary { |
| 29 | outputs { |
| 30 | primary { |
| 31 | sampling_rates 48000 |
| 32 | channel_masks AUDIO_CHANNEL_OUT_STEREO |
| 33 | formats AUDIO_FORMAT_PCM_16_BIT |
Eric Laurent | e9b8820 | 2013-12-17 17:57:18 -0800 | [diff] [blame] | 34 | devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_ALL_SCO |
Yogesh Agrawal | 9240c1a | 2013-10-16 15:13:32 +0530 | [diff] [blame] | 35 | flags AUDIO_OUTPUT_FLAG_PRIMARY |
| 36 | } |
| 37 | } |
| 38 | inputs { |
| 39 | primary { |
| 40 | sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000 |
| 41 | channel_masks AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO |
| 42 | formats AUDIO_FORMAT_PCM_16_BIT |
| 43 | devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET|AUDIO_DEVICE_IN_WIRED_HEADSET |
| 44 | } |
| 45 | } |
| 46 | } |
| 47 | a2dp { |
| 48 | outputs { |
| 49 | a2dp { |
| 50 | sampling_rates 44100 |
| 51 | channel_masks AUDIO_CHANNEL_OUT_STEREO |
| 52 | formats AUDIO_FORMAT_PCM_16_BIT |
| 53 | devices AUDIO_DEVICE_OUT_ALL_A2DP |
| 54 | } |
| 55 | } |
| 56 | } |
Paul McLean | 2dcef22 | 2014-04-11 10:56:56 -0700 | [diff] [blame] | 57 | usb { |
| 58 | outputs { |
| 59 | usb_accessory { |
| 60 | sampling_rates 44100 |
| 61 | channel_masks AUDIO_CHANNEL_OUT_STEREO |
| 62 | formats AUDIO_FORMAT_PCM_16_BIT |
| 63 | devices AUDIO_DEVICE_OUT_USB_ACCESSORY |
| 64 | } |
| 65 | usb_device { |
| 66 | sampling_rates dynamic |
Andy Hung | 7bcba3b | 2014-07-29 18:25:33 -0700 | [diff] [blame] | 67 | channel_masks dynamic |
Paul McLean | ffcb883 | 2014-07-01 08:21:19 -0700 | [diff] [blame] | 68 | formats dynamic |
Paul McLean | 2dcef22 | 2014-04-11 10:56:56 -0700 | [diff] [blame] | 69 | devices AUDIO_DEVICE_OUT_USB_DEVICE |
| 70 | } |
| 71 | } |
Paul McLean | 6847b49 | 2014-05-01 08:39:37 -0700 | [diff] [blame] | 72 | inputs { |
| 73 | usb_device { |
| 74 | sampling_rates dynamic |
Paul McLean | abffc46 | 2014-09-12 13:43:48 -0700 | [diff] [blame] | 75 | channel_masks dynamic |
| 76 | formats dynamic |
Paul McLean | 6847b49 | 2014-05-01 08:39:37 -0700 | [diff] [blame] | 77 | devices AUDIO_DEVICE_IN_USB_DEVICE |
| 78 | } |
| 79 | } |
Paul McLean | 2dcef22 | 2014-04-11 10:56:56 -0700 | [diff] [blame] | 80 | } |
Eric Laurent | e9b8820 | 2013-12-17 17:57:18 -0800 | [diff] [blame] | 81 | r_submix { |
| 82 | outputs { |
| 83 | submix { |
| 84 | sampling_rates 48000 |
| 85 | channel_masks AUDIO_CHANNEL_OUT_STEREO |
| 86 | formats AUDIO_FORMAT_PCM_16_BIT |
| 87 | devices AUDIO_DEVICE_OUT_REMOTE_SUBMIX |
| 88 | } |
| 89 | } |
| 90 | inputs { |
| 91 | submix { |
| 92 | sampling_rates 48000 |
| 93 | channel_masks AUDIO_CHANNEL_IN_STEREO |
| 94 | formats AUDIO_FORMAT_PCM_16_BIT |
| 95 | devices AUDIO_DEVICE_IN_REMOTE_SUBMIX |
| 96 | } |
| 97 | } |
| 98 | } |
Yogesh Agrawal | 9240c1a | 2013-10-16 15:13:32 +0530 | [diff] [blame] | 99 | } |