hikey960: Remove PCM gain running on DSP
Removed PCM gain running on DSP
Change-Id: I8c3555fee6b4de357a88c390b1274707a1fd6e5c
Signed-off-by: Niranjan Yadla <nyadla@cadence.com>
diff --git a/audio/audio_hw.c b/audio/audio_hw.c
index a62c344..7b66a1a 100644
--- a/audio/audio_hw.c
+++ b/audio/audio_hw.c
@@ -71,7 +71,6 @@
struct alsa_stream_in *active_input;
struct alsa_stream_out *active_output;
bool mic_mute;
- int hifi_dsp_fd;
};
struct alsa_stream_out {
@@ -249,7 +248,6 @@
struct alsa_audio_device *adev = out->dev;
size_t frame_size = audio_stream_out_frame_size(stream);
size_t out_frames = bytes / frame_size;
- struct misc_io_pcm_buf_param pcmbuf;
/* acquiring hw device mutex systematically is useful if a low priority thread is waiting
* on the output stream mutex - e.g. executing select_mode() while holding the hw device
@@ -268,14 +266,6 @@
pthread_mutex_unlock(&adev->lock);
- if (adev->hifi_dsp_fd >= 0) {
- pcmbuf.buf = (uint64_t)buffer;
- pcmbuf.buf_size = bytes;
- ret = ioctl(adev->hifi_dsp_fd, HIFI_MISC_IOCTL_PCM_GAIN, &pcmbuf);
- if (ret) {
- ALOGV("hifi_dsp: Error buffer processing: %d", errno);
- }
- }
ret = pcm_mmap_write(out->pcm, buffer, out_frames * frame_size);
if (ret == 0) {
@@ -638,11 +628,7 @@
static int adev_close(hw_device_t *device)
{
- struct alsa_audio_device *adev = (struct alsa_audio_device *)device;
-
ALOGV("adev_close");
- if (adev->hifi_dsp_fd >= 0)
- close(adev->hifi_dsp_fd);
free(device);
return 0;
}
@@ -687,12 +673,6 @@
*device = &adev->hw_device.common;
- adev->hifi_dsp_fd = open(HIFI_DSP_MISC_DRIVER, O_WRONLY, 0);
- if (adev->hifi_dsp_fd < 0) {
- ALOGW("hifi_dsp: Error opening device %d", errno);
- } else {
- ALOGI("hifi_dsp: Open device");
- }
return 0;
}