diff options
author | Jeffy Chen <jeffy.chen@rock-chips.com> | 2016-01-25 18:36:39 +0800 |
---|---|---|
committer | Leo Wang <leozwang@google.com> | 2016-03-04 19:43:33 +0000 |
commit | 55f75b6eb312fae73cb9958df2e68745611008b4 (patch) | |
tree | a35e20b39042e46709af99f8263734bc80ca343e | |
parent | e24b3c840684977054ec44964ed75d4248611233 (diff) | |
download | rockchip-55f75b6eb312fae73cb9958df2e68745611008b4.tar.gz |
kylin: audio: attach headset as default input/output
kylin doesn't support headset detect now, so we should attach
them in the audio_policy.conf
Bug: 27274328
Test: brillo_audio_test --playback --libmedia --sine
Change-Id: I8b0c59cbff3f6da5123024607c4d32cc254a9ae0
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
-rw-r--r-- | peripheral/audio/generic/audio_hal.c | 8 | ||||
-rw-r--r-- | peripheral/audio/generic/audio_policy.conf | 11 |
2 files changed, 9 insertions, 10 deletions
diff --git a/peripheral/audio/generic/audio_hal.c b/peripheral/audio/generic/audio_hal.c index 8cc1639..fcee516 100644 --- a/peripheral/audio/generic/audio_hal.c +++ b/peripheral/audio/generic/audio_hal.c @@ -14,8 +14,12 @@ * limitations under the License. */ -#define LOG_TAG "modules.audio.audio_hal" -/*#define LOG_NDEBUG 0*/ +#if TARGET_AUDIO_PRIMARY +#define LOG_TAG "modules.audio.audio_hal.primary" +#else +#define LOG_TAG "modules.audio.audio_hal.usb" +#endif +#define LOG_NDEBUG 0 #include <errno.h> #include <inttypes.h> diff --git a/peripheral/audio/generic/audio_policy.conf b/peripheral/audio/generic/audio_policy.conf index ec3624f..5978b63 100644 --- a/peripheral/audio/generic/audio_policy.conf +++ b/peripheral/audio/generic/audio_policy.conf @@ -19,9 +19,9 @@ # Devices are designated by a string that corresponds to the enum in audio.h global_configuration { - attached_output_devices AUDIO_DEVICE_OUT_SPEAKER - default_output_device AUDIO_DEVICE_OUT_SPEAKER - attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_REMOTE_SUBMIX + attached_output_devices AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_USB_DEVICE + default_output_device AUDIO_DEVICE_OUT_WIRED_HEADSET + attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_USB_DEVICE|AUDIO_DEVICE_IN_REMOTE_SUBMIX } audio_hw_modules { primary { @@ -44,17 +44,12 @@ audio_hw_modules { } } usb { - global_configuration { - attached_output_devices AUDIO_DEVICE_OUT_USB_DEVICE - attached_input_devices AUDIO_DEVICE_IN_USB_DEVICE - } outputs { usb_device { sampling_rates dynamic channel_masks dynamic formats dynamic devices AUDIO_DEVICE_OUT_USB_DEVICE - flags AUDIO_OUTPUT_FLAG_PRIMARY } } inputs { |