Skip to content

Commit

Permalink
system/core: Add MSM specific formats, devices and channels.
Browse files Browse the repository at this point in the history
- Add support for MSM formats, devices and channels

Change-Id: I0f613e25ae7e5bafa126ab582551807711ab9db6
(cherry picked from commit 3535a5eafaa700ae58d44c43c4491f3fbb90e060)
(cherry picked from commit d725c0473b0c7f51d157b8722131ed7b45f878d7)
(cherry picked from commit 8d43d24d91e7bcc8daef40c6e9f99fd8dcd23266)
  • Loading branch information
Srikanth Katta authored and broodplank committed Nov 11, 2013
1 parent 1579201 commit 23e0f13
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions include/system/audio.h
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2011 The Android Open Source Project
* Copyright (c) 2012, The Linux Foundation. All rights reserved.
* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -32,15 +32,15 @@ __BEGIN_DECLS
* frameworks/base/include/media/AudioSystem.h
*/

/* device address used to refer to the standard remote submix */
#define AUDIO_REMOTE_SUBMIX_DEVICE_ADDRESS "0"

#define AMR_FRAMESIZE 32
#define QCELP_FRAMESIZE 35
#define EVRC_FRAMESIZE 23
#define AMR_WB_FRAMESIZE 61
#define AAC_FRAMESIZE 2048

/* device address used to refer to the standard remote submix */
#define AUDIO_REMOTE_SUBMIX_DEVICE_ADDRESS "0"

typedef int audio_io_handle_t;

/* Audio stream types */
Expand Down Expand Up @@ -80,6 +80,10 @@ typedef enum {
/* An example of remote presentation is Wifi Display */
/* where a dongle attached to a TV can be used to */
/* play the mix captured by this audio source. */
#ifdef QCOM_FM_ENABLED
AUDIO_SOURCE_FM_RX = 9,
AUDIO_SOURCE_FM_RX_A2DP = 10,
#endif
AUDIO_SOURCE_CNT,
AUDIO_SOURCE_MAX = AUDIO_SOURCE_CNT - 1,
AUDIO_SOURCE_HOTWORD = 1999, /* A low-priority, preemptible audio source for
Expand Down Expand Up @@ -394,8 +398,10 @@ enum {
AUDIO_DEVICE_OUT_ANC_HEADSET = 0x10000,
AUDIO_DEVICE_OUT_ANC_HEADPHONE = 0x20000,
AUDIO_DEVICE_OUT_PROXY = 0x40000,
#ifdef QCOM_FM_ENABLED
AUDIO_DEVICE_OUT_FM = 0x80000,
AUDIO_DEVICE_OUT_FM_TX = 0x100000,
#endif
#endif
AUDIO_DEVICE_OUT_DEFAULT = AUDIO_DEVICE_BIT_DEFAULT,
AUDIO_DEVICE_OUT_ALL = (AUDIO_DEVICE_OUT_EARPIECE |
Expand All @@ -418,8 +424,10 @@ enum {
AUDIO_DEVICE_OUT_ANC_HEADSET |
AUDIO_DEVICE_OUT_ANC_HEADPHONE |
AUDIO_DEVICE_OUT_PROXY |
#ifdef QCOM_FM_ENABLED
AUDIO_DEVICE_OUT_FM |
AUDIO_DEVICE_OUT_FM_TX |
#endif
#endif
AUDIO_DEVICE_OUT_DEFAULT),
AUDIO_DEVICE_OUT_ALL_A2DP = (AUDIO_DEVICE_OUT_BLUETOOTH_A2DP |
Expand Down Expand Up @@ -464,8 +472,10 @@ enum {
#ifdef QCOM_HARDWARE
AUDIO_DEVICE_IN_ANC_HEADSET = AUDIO_DEVICE_BIT_IN | 0x2000,
AUDIO_DEVICE_IN_PROXY = AUDIO_DEVICE_BIT_IN | 0x4000,
#ifdef QCOM_FM_ENABLED
AUDIO_DEVICE_IN_FM_RX = AUDIO_DEVICE_BIT_IN | 0x8000,
AUDIO_DEVICE_IN_FM_RX_A2DP = AUDIO_DEVICE_BIT_IN | 0x10000,
#endif
#endif
AUDIO_DEVICE_IN_DEFAULT = AUDIO_DEVICE_BIT_IN | AUDIO_DEVICE_BIT_DEFAULT,
#endif
Expand All @@ -485,8 +495,10 @@ enum {
AUDIO_DEVICE_IN_USB_DEVICE |
#ifdef QCOM_HARDWARE
AUDIO_DEVICE_IN_ANC_HEADSET |
#ifdef QCOM_FM_ENABLED
AUDIO_DEVICE_IN_FM_RX |
AUDIO_DEVICE_IN_FM_RX_A2DP |
#endif
AUDIO_DEVICE_IN_PROXY |
#endif
AUDIO_DEVICE_IN_DEFAULT),
Expand Down Expand Up @@ -520,7 +532,7 @@ typedef enum {
// streams to hardware codec
AUDIO_OUTPUT_FLAG_NON_BLOCKING = 0x20, // use non-blocking write
#ifdef QCOM_HARDWARE
//Qualcomm Flags
//MSM Flags
AUDIO_OUTPUT_FLAG_LPA = 0x1000, // use LPA
AUDIO_OUTPUT_FLAG_TUNNEL = 0x2000, // use Tunnel
AUDIO_OUTPUT_FLAG_VOIP_RX = 0x4000, // use this flag in combination with DIRECT to
Expand Down

0 comments on commit 23e0f13

Please sign in to comment.