diff options
author | Kyle Repinski <repinski23@gmail.com> | 2014-10-13 04:40:11 -0500 |
---|---|---|
committer | Ziyan <jaraidaniel@gmail.com> | 2016-01-15 12:24:25 +0100 |
commit | fc5a515f9b0f9a9c471edea3ad29bdf90e7fd37a (patch) | |
tree | ba39d80196d3ed719526738e6dbae86201d928b6 | |
parent | 0d513b93097790dc06121352c4822bf9cce363f5 (diff) | |
download | device_samsung_tuna-fc5a515f9b0f9a9c471edea3ad29bdf90e7fd37a.zip device_samsung_tuna-fc5a515f9b0f9a9c471edea3ad29bdf90e7fd37a.tar.gz device_samsung_tuna-fc5a515f9b0f9a9c471edea3ad29bdf90e7fd37a.tar.bz2 |
tuna: Proper 48kHz audio support.
This fixes a bunch of annoying junk in the logcat about fast path being denied to UI sounds due to them having a 48000Hz sample rate.
Also allows playback of 96kHz audio, as Android refuses to resample to anything lower than a divide by two.
-rw-r--r-- | audio/audio_hw.c | 2 | ||||
-rw-r--r-- | audio/audio_policy.conf | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/audio/audio_hw.c b/audio/audio_hw.c index c4c4b76..ba8a81d 100644 --- a/audio/audio_hw.c +++ b/audio/audio_hw.c @@ -216,7 +216,7 @@ /* minimum sleep time in out_write() when write threshold is not reached */ #define MIN_WRITE_SLEEP_US 5000 -#define DEFAULT_OUT_SAMPLING_RATE 44100 // 48000 is possible but interacts poorly with HDMI +#define DEFAULT_OUT_SAMPLING_RATE 48000 // TODO: Check with HDMI. /* sampling rate when using MM low power port */ #define MM_LOW_POWER_SAMPLING_RATE 44100 diff --git a/audio/audio_policy.conf b/audio/audio_policy.conf index a782448..3131fa7 100644 --- a/audio/audio_policy.conf +++ b/audio/audio_policy.conf @@ -23,14 +23,14 @@ audio_hw_modules { primary { outputs { primary { - sampling_rates 44100 + sampling_rates 44100|48000 channel_masks AUDIO_CHANNEL_OUT_STEREO formats AUDIO_FORMAT_PCM_16_BIT 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_DGTL_DOCK_HEADSET flags AUDIO_OUTPUT_FLAG_PRIMARY } deep_buffer { - sampling_rates 44100 + sampling_rates 44100|48000 channel_masks AUDIO_CHANNEL_OUT_STEREO formats AUDIO_FORMAT_PCM_16_BIT devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE |