1#
2# Audio policy configuration for generic device builds (goldfish audio HAL - emulator)
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
9global_configuration {
10  attached_output_devices AUDIO_DEVICE_OUT_SPEAKER
11  default_output_device AUDIO_DEVICE_OUT_SPEAKER
12  attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_REMOTE_SUBMIX
13}
14
15# audio hardware module section: contains descriptors for all audio hw modules present on the
16# device. Each hw module node is named after the corresponding hw module library base name.
17# For instance, "primary" corresponds to audio.primary.<device>.so.
18# The "primary" module is mandatory and must include at least one output with
19# AUDIO_OUTPUT_FLAG_PRIMARY flag.
20# Each module descriptor contains one or more output profile descriptors and zero or more
21# input profile descriptors. Each profile lists all the parameters supported by a given output
22# or input stream category.
23# The "channel_masks", "formats", "devices" and "flags" are specified using strings corresponding
24# to enums in audio.h and audio_policy.h. They are concatenated by use of "|" without space or "\n".
25#device sr changed from 44100 to 48000 to adapt chip
26audio_hw_modules {
27  primary {
28    outputs {
29      primary {
30        sampling_rates 48000
31        channel_masks AUDIO_CHANNEL_OUT_STEREO
32        formats AUDIO_FORMAT_PCM_16_BIT
33        devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_HDMI
34        flags AUDIO_OUTPUT_FLAG_PRIMARY
35      }
36      hw_av_sync {
37        sampling_rates 8000|11025|16000|22050|24000|32000|44100|48000
38        channel_masks AUDIO_CHANNEL_OUT_MONO|AUDIO_CHANNEL_OUT_STEREO
39        formats AUDIO_FORMAT_PCM_16_BIT
40        devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_HDMI
41        flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_HW_AV_SYNC
42      }
43      hw_compress {
44        sampling_rates 8000|11025|16000|22050|24000|32000|44100|48000
45        channel_masks AUDIO_CHANNEL_OUT_STEREO|AUDIO_CHANNEL_OUT_MONO|AUDIO_CHANNEL_OUT_5POINT1|AUDIO_CHANNEL_OUT_7POINT1
46        formats AUDIO_FORMAT_AC3|AUDIO_FORMAT_E_AC3
47        devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_HDMI
48        flags AUDIO_OUTPUT_FLAG_DIRECT
49      }
50      hw_av_sync_compress {
51        sampling_rates 8000|11025|16000|22050|24000|32000|44100|48000
52        channel_masks AUDIO_CHANNEL_OUT_STEREO|AUDIO_CHANNEL_OUT_MONO|AUDIO_CHANNEL_OUT_5POINT1|AUDIO_CHANNEL_OUT_7POINT1
53        formats AUDIO_FORMAT_AC3|AUDIO_FORMAT_E_AC3
54        devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_HDMI
55        flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_HW_AV_SYNC
56      }
57    }
58    inputs {
59      primary {
60        sampling_rates 8000|11025|16000|22050|24000|32000|44100|48000
61        channel_masks AUDIO_CHANNEL_IN_MONO
62        formats AUDIO_FORMAT_PCM_16_BIT
63        devices AUDIO_DEVICE_IN_BUILTIN_MIC
64      }
65    }
66  }
67  a2dp {
68      outputs {
69          a2dp {
70              sampling_rates 44100|48000
71                  channel_masks AUDIO_CHANNEL_OUT_STEREO
72                  formats AUDIO_FORMAT_PCM_16_BIT
73                  devices AUDIO_DEVICE_OUT_ALL_A2DP
74          }
75      }
76      input {
77          a2dp {
78              sampling_rates 44100|48000
79              channel_masks AUDIO_CHANNEL_IN_STEREO|AUDIO_CHANNEL_IN_MONO
80              formats AUDIO_FORMAT_PCM_16_BIT|AUDIO_FORMAT_PCM_8_BIT
81              devices AUDIO_DEVICE_IN_BLUETOOTH_A2DP
82          }
83      }
84  }
85  usb {
86    outputs {
87      usb_device {
88        sampling_rates dynamic
89        channel_masks dynamic
90        formats dynamic
91        devices AUDIO_DEVICE_OUT_USB_DEVICE
92      }
93    }
94   inputs {
95     usb_device {
96       sampling_rates dynamic
97       channel_masks dynamic
98       formats dynamic
99       devices AUDIO_DEVICE_IN_USB_DEVICE
100     }
101   }
102  }
103 r_submix {
104   outputs {
105     submix {
106       sampling_rates 48000
107       channel_masks AUDIO_CHANNEL_OUT_STEREO
108       formats AUDIO_FORMAT_PCM_16_BIT
109       devices AUDIO_DEVICE_OUT_REMOTE_SUBMIX
110     }
111    }
112   inputs {
113    submix {
114      sampling_rates 8000|48000
115      channel_masks AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO
116      formats AUDIO_FORMAT_PCM_16_BIT
117      devices AUDIO_DEVICE_IN_REMOTE_SUBMIX
118     }
119   }
120  }
121}
122