blob: 866b71d74eb4b8b506fc0926218bd24434ab7a84 [file] [log] [blame]
Duy Truong790f06d2013-02-13 16:38:12 -08001/* Copyright (c) 2010, The Linux Foundation. All rights reserved.
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 */
12
13#include <linux/fs.h>
14#include <linux/uaccess.h>
15#include <linux/wait.h>
16
17#include <linux/msm_audio.h>
18
19#include <mach/qdsp5v2/qdsp5audppmsg.h>
20#include <mach/qdsp5v2/qdsp5audplaycmdi.h>
21#include <mach/qdsp5v2/qdsp5audplaymsg.h>
22#include <mach/qdsp5v2/audpp.h>
23#include <mach/qdsp5v2/codec_utils.h>
24#include <mach/qdsp5v2/pcm_funcs.h>
25#include <mach/debug_mm.h>
26
27long pcm_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
28{
29 MM_DBG("pcm_ioctl() cmd = %d\n", cmd);
30
31 return -EINVAL;
32}
33
34void audpp_cmd_cfg_pcm_params(struct audio *audio)
35{
36 struct audpp_cmd_cfg_adec_params_wav cmd;
37
38 memset(&cmd, 0, sizeof(cmd));
39 cmd.common.cmd_id = AUDPP_CMD_CFG_ADEC_PARAMS;
40 cmd.common.length = AUDPP_CMD_CFG_ADEC_PARAMS_WAV_LEN >> 1;
41 cmd.common.dec_id = audio->dec_id;
42 cmd.common.input_sampling_frequency = audio->out_sample_rate;
43 cmd.stereo_cfg = audio->out_channel_mode;
44 cmd.pcm_width = audio->out_bits;
45 cmd.sign = 0;
46 audpp_send_queue2(&cmd, sizeof(cmd));
47}