diff options
| author | Christopher N. Hesse <raymanfx@gmail.com> | 2017-01-31 21:59:54 +0100 |
|---|---|---|
| committer | Christopher N. Hesse <raymanfx@gmail.com> | 2017-02-02 11:39:00 +0000 |
| commit | 530cf0d012d6ea7ea256bdbe3fc2f4c8589b72a0 (patch) | |
| tree | 04d49e000de4bc67d48df394b276929736f77208 /audio | |
| parent | ce6d5afbcd00c722f4e62097ee69605052b62007 (diff) | |
| download | hardware_samsung-530cf0d012d6ea7ea256bdbe3fc2f4c8589b72a0.tar.gz hardware_samsung-530cf0d012d6ea7ea256bdbe3fc2f4c8589b72a0.tar.bz2 hardware_samsung-530cf0d012d6ea7ea256bdbe3fc2f4c8589b72a0.zip | |
audio: s/handset/earpiece/g
HANDSET is too similar to HEADSET.
Choose a better name instead and call it EARPIECE
like everyone else.
Change-Id: Ida986366e2ef16cb422cba6ecaeedbe8c1ae9908
Diffstat (limited to 'audio')
| -rw-r--r-- | audio/audio_hw.c | 30 | ||||
| -rw-r--r-- | audio/audio_hw.h | 8 |
2 files changed, 19 insertions, 19 deletions
diff --git a/audio/audio_hw.c b/audio/audio_hw.c index 0e1e18b..954660c 100644 --- a/audio/audio_hw.c +++ b/audio/audio_hw.c @@ -274,11 +274,11 @@ static int get_snd_codec_id(audio_format_t format) static const char * const device_table[SND_DEVICE_MAX] = { [SND_DEVICE_NONE] = "none", /* Playback sound devices */ - [SND_DEVICE_OUT_HANDSET] = "handset", + [SND_DEVICE_OUT_EARPIECE] = "earpiece", [SND_DEVICE_OUT_SPEAKER] = "speaker", [SND_DEVICE_OUT_HEADPHONES] = "headphones", [SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES] = "speaker-and-headphones", - [SND_DEVICE_OUT_VOICE_HANDSET] = "voice-handset", + [SND_DEVICE_OUT_VOICE_EARPIECE] = "voice-earpiece", [SND_DEVICE_OUT_VOICE_SPEAKER] = "voice-speaker", [SND_DEVICE_OUT_VOICE_HEADPHONES] = "voice-headphones", [SND_DEVICE_OUT_HDMI] = "hdmi", @@ -289,10 +289,10 @@ static const char * const device_table[SND_DEVICE_MAX] = { [SND_DEVICE_OUT_VOICE_TTY_HCO_HANDSET] = "voice-tty-hco-handset", /* Capture sound devices */ - [SND_DEVICE_IN_HANDSET_MIC] = "handset-mic", + [SND_DEVICE_IN_EARPIECE_MIC] = "earpiece-mic", [SND_DEVICE_IN_SPEAKER_MIC] = "speaker-mic", [SND_DEVICE_IN_HEADSET_MIC] = "headset-mic", - [SND_DEVICE_IN_HANDSET_MIC_AEC] = "handset-mic", + [SND_DEVICE_IN_EARPIECE_MIC_AEC] = "earpiece-mic", [SND_DEVICE_IN_SPEAKER_MIC_AEC] = "voice-speaker-mic", [SND_DEVICE_IN_HEADSET_MIC_AEC] = "headset-mic", [SND_DEVICE_IN_VOICE_SPEAKER_MIC] = "voice-speaker-mic", @@ -508,7 +508,7 @@ static snd_device_t get_output_snd_device(struct audio_device *adev, audio_devic } else if (devices & AUDIO_DEVICE_OUT_SPEAKER) { snd_device = SND_DEVICE_OUT_VOICE_SPEAKER; } else if (devices & AUDIO_DEVICE_OUT_EARPIECE) { - snd_device = SND_DEVICE_OUT_HANDSET; + snd_device = SND_DEVICE_OUT_EARPIECE; } if (snd_device != SND_DEVICE_NONE) { goto exit; @@ -544,7 +544,7 @@ static snd_device_t get_output_snd_device(struct audio_device *adev, audio_devic } else if (devices & AUDIO_DEVICE_OUT_ALL_SCO) { snd_device = SND_DEVICE_OUT_BT_SCO; } else if (devices & AUDIO_DEVICE_OUT_EARPIECE) { - snd_device = SND_DEVICE_OUT_HANDSET; + snd_device = SND_DEVICE_OUT_EARPIECE; } else { ALOGE("%s: Unknown device(s) %#x", __func__, devices); } @@ -604,7 +604,7 @@ static snd_device_t get_input_snd_device(struct audio_device *adev, audio_device } if (out_device & AUDIO_DEVICE_OUT_EARPIECE || out_device & AUDIO_DEVICE_OUT_WIRED_HEADPHONE) { - snd_device = SND_DEVICE_IN_HANDSET_MIC; + snd_device = SND_DEVICE_IN_EARPIECE_MIC; } else if (out_device & AUDIO_DEVICE_OUT_WIRED_HEADSET) { snd_device = SND_DEVICE_IN_VOICE_HEADSET_MIC; } else if (out_device & AUDIO_DEVICE_OUT_ALL_SCO) { @@ -643,7 +643,7 @@ static snd_device_t get_input_snd_device(struct audio_device *adev, audio_device if (out_device & AUDIO_DEVICE_OUT_WIRED_HEADPHONE) { snd_device = SND_DEVICE_IN_SPEAKER_MIC_AEC; } else { - snd_device = SND_DEVICE_IN_HANDSET_MIC_AEC; + snd_device = SND_DEVICE_IN_EARPIECE_MIC_AEC; } } else if (in_device & AUDIO_DEVICE_IN_WIRED_HEADSET) { snd_device = SND_DEVICE_IN_HEADSET_MIC_AEC; @@ -664,7 +664,7 @@ static snd_device_t get_input_snd_device(struct audio_device *adev, audio_device !(in_device & AUDIO_DEVICE_IN_VOICE_CALL) && !(in_device & AUDIO_DEVICE_IN_COMMUNICATION)) { if (in_device & AUDIO_DEVICE_IN_BUILTIN_MIC) { - snd_device = SND_DEVICE_IN_HANDSET_MIC; + snd_device = SND_DEVICE_IN_EARPIECE_MIC; } else if (in_device & AUDIO_DEVICE_IN_BACK_MIC) { snd_device = SND_DEVICE_IN_SPEAKER_MIC; } else if (in_device & AUDIO_DEVICE_IN_WIRED_HEADSET) { @@ -675,24 +675,24 @@ static snd_device_t get_input_snd_device(struct audio_device *adev, audio_device snd_device = SND_DEVICE_IN_HDMI_MIC; } else { ALOGE("%s: Unknown input device(s) %#x", __func__, in_device); - ALOGW("%s: Using default handset-mic", __func__); - snd_device = SND_DEVICE_IN_HANDSET_MIC; + ALOGW("%s: Using default earpiece-mic", __func__); + snd_device = SND_DEVICE_IN_EARPIECE_MIC; } } else { if (out_device & AUDIO_DEVICE_OUT_EARPIECE) { - snd_device = SND_DEVICE_IN_HANDSET_MIC; + snd_device = SND_DEVICE_IN_EARPIECE_MIC; } else if (out_device & AUDIO_DEVICE_OUT_WIRED_HEADSET) { snd_device = SND_DEVICE_IN_HEADSET_MIC; } else if (out_device & AUDIO_DEVICE_OUT_SPEAKER) { snd_device = SND_DEVICE_IN_SPEAKER_MIC; } else if (out_device & AUDIO_DEVICE_OUT_WIRED_HEADPHONE) { - snd_device = SND_DEVICE_IN_HANDSET_MIC; + snd_device = SND_DEVICE_IN_EARPIECE_MIC; } else if (out_device & AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET) { snd_device = SND_DEVICE_IN_BT_SCO_MIC; } else { ALOGE("%s: Unknown output device(s) %#x", __func__, out_device); - ALOGW("%s: Using default handset-mic", __func__); - snd_device = SND_DEVICE_IN_HANDSET_MIC; + ALOGW("%s: Using default earpiece-mic", __func__); + snd_device = SND_DEVICE_IN_EARPIECE_MIC; } } exit: diff --git a/audio/audio_hw.h b/audio/audio_hw.h index d2c6e0f..2f1282c 100644 --- a/audio/audio_hw.h +++ b/audio/audio_hw.h @@ -71,11 +71,11 @@ enum { /* Playback devices */ SND_DEVICE_MIN, SND_DEVICE_OUT_BEGIN = SND_DEVICE_MIN, - SND_DEVICE_OUT_HANDSET = SND_DEVICE_OUT_BEGIN, + SND_DEVICE_OUT_EARPIECE = SND_DEVICE_OUT_BEGIN, SND_DEVICE_OUT_SPEAKER, SND_DEVICE_OUT_HEADPHONES, SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES, - SND_DEVICE_OUT_VOICE_HANDSET, + SND_DEVICE_OUT_VOICE_EARPIECE, SND_DEVICE_OUT_VOICE_SPEAKER, SND_DEVICE_OUT_VOICE_HEADPHONES, SND_DEVICE_OUT_HDMI, @@ -92,10 +92,10 @@ enum { */ /* Capture devices */ SND_DEVICE_IN_BEGIN = SND_DEVICE_OUT_END, - SND_DEVICE_IN_HANDSET_MIC = SND_DEVICE_IN_BEGIN, + SND_DEVICE_IN_EARPIECE_MIC = SND_DEVICE_IN_BEGIN, SND_DEVICE_IN_SPEAKER_MIC, SND_DEVICE_IN_HEADSET_MIC, - SND_DEVICE_IN_HANDSET_MIC_AEC, + SND_DEVICE_IN_EARPIECE_MIC_AEC, SND_DEVICE_IN_SPEAKER_MIC_AEC, SND_DEVICE_IN_HEADSET_MIC_AEC, SND_DEVICE_IN_VOICE_SPEAKER_MIC, |
