msm: audio: qdsp6v2: Add support to configure ISO and ARIB coefficients

Add support for configuring ISO or ARIB stereo mixing coefficients.
This change introduces an IOCTL through which the user space can
configure ISO or ARIB coefficients.

Change-Id: I55ffa339ac8daa2b58212774277f895a22ea048c
Signed-off-by: Amal Paul <amal@codeaurora.org>
This commit is contained in:
Amal Paul
2013-02-26 19:28:53 -08:00
committed by Gerrit - the friendly Code Review server
parent 2ca061bff0
commit 6253698708
2 changed files with 22 additions and 0 deletions
@@ -185,6 +185,25 @@ static long audio_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
}
break;
}
case AUDIO_SET_AAC_MIX_CONFIG: {
pr_debug("%s, AUDIO_SET_AAC_MIX_CONFIG", __func__);
if (copy_from_user(audio->codec_cfg, (void *)arg,
sizeof(unsigned long))) {
rc = -EFAULT;
break;
} else {
unsigned long *mix_coeff =
(unsigned long *)audio->codec_cfg;
pr_debug("%s, value of coeff = %lu",
__func__, *mix_coeff);
q6asm_cfg_aac_sel_mix_coef(audio->ac, *mix_coeff);
if (rc < 0)
pr_err("%s asm aac_sel_mix_coef failed rc=%d\n",
__func__, rc);
break;
}
break;
}
default:
pr_debug("Calling utils ioctl\n");
rc = audio->codec_ioctl(file, cmd, arg);
+3
View File
@@ -14,6 +14,9 @@
#define AUDIO_GET_AAC_ENC_CONFIG _IOR(AUDIO_IOCTL_MAGIC, \
(AUDIO_MAX_COMMON_IOCTL_NUM+4), struct msm_audio_aac_enc_config)
#define AUDIO_SET_AAC_MIX_CONFIG _IOR(AUDIO_IOCTL_MAGIC, \
(AUDIO_MAX_COMMON_IOCTL_NUM+5), unsigned)
#define AUDIO_AAC_FORMAT_ADTS -1
#define AUDIO_AAC_FORMAT_RAW 0x0000
#define AUDIO_AAC_FORMAT_PSUEDO_RAW 0x0001