summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorChristopher N. Hesse <raymanfx@gmail.com>2018-01-28 13:16:17 +0100
committerChristopher N. Hesse <raymanfx@gmail.com>2018-02-16 10:58:10 +0000
commit2beff4222c8eb3c2f0ee0f419bc68c1b062eeab0 (patch)
treeaab6eddc7a77f75cfeb1f12c714fbe659fa9c39b /audio
parent11ef2117492b5a92aeee6f6c990fc7af5b2f346d (diff)
downloadandroid_hardware_samsung-2beff4222c8eb3c2f0ee0f419bc68c1b062eeab0.tar.gz
android_hardware_samsung-2beff4222c8eb3c2f0ee0f419bc68c1b062eeab0.tar.bz2
android_hardware_samsung-2beff4222c8eb3c2f0ee0f419bc68c1b062eeab0.zip
audio: Print error in case of nonexistant mixer paths
Change-Id: I131ed6518ce8f26638a3490ee1be7a5d93b4e5b8 (cherry picked from commit 0524e26d2a1d155ce1dc9609b8e8741fd5f1500f)
Diffstat (limited to 'audio')
-rw-r--r--audio/audio_hw.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/audio/audio_hw.c b/audio/audio_hw.c
index 1ede8e1..bd15634 100644
--- a/audio/audio_hw.c
+++ b/audio/audio_hw.c
@@ -540,6 +540,11 @@ static int mixer_init(struct audio_device *adev)
} while (mixer == NULL);
sprintf(mixer_path, "/system/etc/mixer_paths_%d.xml", card);
+ if (access(mixer_path, F_OK) == -1) {
+ ALOGE("%s: Failed to load mixer paths from %s, your system is going to crash",
+ __func__, mixer_path);
+ }
+
audio_route = audio_route_init(card, mixer_path);
if (!audio_route) {
ALOGE("%s: Failed to init audio route controls for card %d, aborting.",