/arch/arm/mach-fsm/include/mach/qdsp5v2/qdsp5afecmdi.h
C++ Header | 83 lines | 45 code | 10 blank | 28 comment | 0 complexity | 6b36cc6e3d2312e9126153f2e63befe3 MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.0, AGPL-1.0
1/* Copyright (c) 2009-2010, Code Aurora Forum. All rights reserved.
2 *
3 * Redistribution and use in source and binary forms, with or without
4 * modification, are permitted provided that the following conditions are
5 * met:
6 * * Redistributions of source code must retain the above copyright
7 * notice, this list of conditions and the following disclaimer.
8 * * Redistributions in binary form must reproduce the above
9 * copyright notice, this list of conditions and the following
10 * disclaimer in the documentation and/or other materials provided
11 * with the distribution.
12 * * Neither the name of Code Aurora Forum, Inc. nor the names of its
13 * contributors may be used to endorse or promote products derived
14 * from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
28 */
29#ifndef __MACH_QDSP5_V2_QDSP5AFECMDI_H
30#define __MACH_QDSP5_V2_QDSP5AFECMDI_H
31
32#define QDSP5_DEVICE_mI2S_CODEC_RX 1 /* internal codec rx path */
33#define QDSP5_DEVICE_mI2S_CODEC_TX 2 /* internal codec tx path */
34#define QDSP5_DEVICE_AUX_CODEC_RX 3 /* external codec rx path */
35#define QDSP5_DEVICE_AUX_CODEC_TX 4 /* external codec tx path */
36#define QDSP5_DEVICE_mI2S_HDMI_RX 5 /* HDMI/FM block rx path */
37#define QDSP5_DEVICE_mI2S_HDMI_TX 6 /* HDMI/FM block tx path */
38#define QDSP5_DEVICE_ID_MAX 7
39
40#define AFE_CMD_CODEC_CONFIG_CMD 0x1
41#define AFE_CMD_CODEC_CONFIG_LEN sizeof(struct afe_cmd_codec_config)
42
43struct afe_cmd_codec_config{
44 uint16_t cmd_id;
45 uint16_t device_id;
46 uint16_t activity;
47 uint16_t sample_rate;
48 uint16_t channel_mode;
49 uint16_t volume;
50 uint16_t reserved;
51} __attribute__ ((packed));
52
53#define AFE_CMD_AUX_CODEC_CONFIG_CMD 0x3
54#define AFE_CMD_AUX_CODEC_CONFIG_LEN sizeof(struct afe_cmd_aux_codec_config)
55
56struct afe_cmd_aux_codec_config{
57 uint16_t cmd_id;
58 uint16_t dma_path_ctl;
59 uint16_t pcm_ctl;
60 uint16_t eight_khz_int_mode;
61 uint16_t aux_codec_intf_ctl;
62 uint16_t data_format_padding_info;
63} __attribute__ ((packed));
64
65#define AFE_CMD_FM_RX_ROUTING_CMD 0x6
66#define AFE_CMD_FM_RX_ROUTING_LEN sizeof(struct afe_cmd_fm_codec_config)
67
68struct afe_cmd_fm_codec_config{
69 uint16_t cmd_id;
70 uint16_t enable;
71 uint16_t device_id;
72} __attribute__ ((packed));
73
74#define AFE_CMD_FM_PLAYBACK_VOLUME_CMD 0x8
75#define AFE_CMD_FM_PLAYBACK_VOLUME_LEN sizeof(struct afe_cmd_fm_volume_config)
76
77struct afe_cmd_fm_volume_config{
78 uint16_t cmd_id;
79 uint16_t volume;
80 uint16_t reserved;
81} __attribute__ ((packed));
82
83#endif