diff options
author | Chandrashekhar Urkeri | 2019-10-30 15:35:39 -0500 |
---|---|---|
committer | Praneeth Bajjuri | 2019-11-01 17:01:27 -0500 |
commit | f5b7578fc9232495138beaf82db3a6a92b1facd5 (patch) | |
tree | 95632d407e2b8cf315a8938d8d35d0152eb5fdbf | |
parent | fb8a507ecb7d8dfd435691c9c6a45bd9bc86daa7 (diff) | |
download | hardware-ti-j721e-f5b7578fc9232495138beaf82db3a6a92b1facd5.tar.gz hardware-ti-j721e-f5b7578fc9232495138beaf82db3a6a92b1facd5.tar.xz hardware-ti-j721e-f5b7578fc9232495138beaf82db3a6a92b1facd5.zip |
j721e: audio: cleanup and indentation update
Fixed some indentation issues with the source code and also removed
some unwanted parts of code.
Signed-off-by: Chandrashekhar Urkeri <x1048305@ti.com>
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
-rw-r--r-- | audio/primary/audio_hw.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/audio/primary/audio_hw.c b/audio/primary/audio_hw.c index 9c40f41..387a95f 100644 --- a/audio/primary/audio_hw.c +++ b/audio/primary/audio_hw.c | |||
@@ -101,7 +101,7 @@ static const char *supported_media_cards[] = { | |||
101 | }; | 101 | }; |
102 | 102 | ||
103 | #define MAX_CARD_COUNT 1 | 103 | #define MAX_CARD_COUNT 1 |
104 | #define BYTES_PER_SAMPLE (3 * sizeof(int8_t)) //for 24 bit 3 bytes are required | 104 | #define BYTES_PER_SAMPLE (3) //for 24 bit 3 bytes are required |
105 | 105 | ||
106 | #define SUPPORTED_IN_DEVICES (AUDIO_DEVICE_IN_WIRED_HEADSET | \ | 106 | #define SUPPORTED_IN_DEVICES (AUDIO_DEVICE_IN_WIRED_HEADSET | \ |
107 | AUDIO_DEVICE_IN_DEFAULT) | 107 | AUDIO_DEVICE_IN_DEFAULT) |
@@ -156,9 +156,9 @@ static inline uint32_t output_buffer_size(uint32_t rate) | |||
156 | uint32_t samples; | 156 | uint32_t samples; |
157 | 157 | ||
158 | if (rate == 48000){ | 158 | if (rate == 48000){ |
159 | return PLAYBACK_PERIOD_SIZE; | 159 | return PLAYBACK_PERIOD_SIZE; |
160 | } | 160 | } |
161 | else{ | 161 | else{ |
162 | /* | 162 | /* |
163 | * take resampling into account and return the closest majoring | 163 | * take resampling into account and return the closest majoring |
164 | * multiple of 16 frames, as audioflinger expects audio buffers to | 164 | * multiple of 16 frames, as audioflinger expects audio buffers to |
@@ -167,12 +167,10 @@ static inline uint32_t output_buffer_size(uint32_t rate) | |||
167 | samples = (rate * PLAYBACK_PERIOD_SIZE) / PLAYBACK_SAMPLE_RATE; | 167 | samples = (rate * PLAYBACK_PERIOD_SIZE) / PLAYBACK_SAMPLE_RATE; |
168 | samples = ((samples + 15) / 16) * 16; | 168 | samples = ((samples + 15) / 16) * 16; |
169 | ALOGE("output_buffer_size() samples=%d\n",samples); | 169 | ALOGE("output_buffer_size() samples=%d\n",samples); |
170 | } | 170 | } |
171 | return samples; | 171 | return samples; |
172 | } | 172 | } |
173 | 173 | ||
174 | static void do_out_standby(struct j7_stream_out *out); | ||
175 | |||
176 | static size_t get_input_buffer_size(uint32_t sample_rate, int format, int channel_count) | 174 | static size_t get_input_buffer_size(uint32_t sample_rate, int format, int channel_count) |
177 | { | 175 | { |
178 | size_t size; | 176 | size_t size; |