1 #ifndef __INTEL_SST_H__
2 #define __INTEL_SST_H__
4 * intel_sst.h - Intel SST Driver for audio engine
6 * Copyright (C) 2008-10 Intel Corporation
7 * Authors: Vinod Koul <vinod.koul@intel.com>
8 * Harsha Priya <priya.harsha@intel.com>
9 * Dharageswari R <dharageswari.r@intel.com>
10 * KP Jeeja <jeeja.kp@intel.com>
11 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; version 2 of the License.
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
22 * You should have received a copy of the GNU General Public License along
23 * with this program; if not, write to the Free Software Foundation, Inc.,
24 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
26 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
28 * This driver exposes the audio engine functionalities to the ALSA
30 * This file is shared between the SST and MAD drivers
32 #include "intel_sst_ioctl.h"
34 #define SST_CARD_NAMES "intel_mid_card"
36 /* control list Pmic & Lpe */
44 enum sst_card_states {
50 SST_SND_ALLOC = 0x1000,
51 SST_SND_PAUSE = 0x1001,
52 SST_SND_RESUME = 0x1002,
53 SST_SND_DROP = 0x1003,
54 SST_SND_FREE = 0x1004,
55 SST_SND_BUFFER_POINTER = 0x1005,
56 SST_SND_STREAM_INIT = 0x1006,
57 SST_SND_START = 0x1007,
58 SST_SND_STREAM_PROCESS = 0x1008,
59 SST_MAX_CONTROLS = 0x1008,
60 SST_CONTROL_BASE = 0x1000,
61 SST_ENABLE_RX_TIME_SLOT = 0x1009,
71 struct pcm_stream_info {
74 void (*period_elapsed) (void *mad_substream);
75 unsigned long long buffer_ptr;
88 int (*set_input_dev) (u8 value);
89 int (*set_output_dev) (u8 value);
91 int (*set_mute) (int dev_id, u8 value);
92 int (*get_mute) (int dev_id, u8 *value);
94 int (*set_vol) (int dev_id, int value);
95 int (*get_vol) (int dev_id, int *value);
97 int (*init_card) (void);
98 int (*set_pcm_audio_params)
99 (int sfreq, int word_size , int num_channel);
100 int (*set_pcm_voice_params) (void);
101 int (*set_voice_port) (int status);
102 int (*set_audio_port) (int status);
104 int (*power_up_pmic_pb) (unsigned int port);
105 int (*power_up_pmic_cp) (unsigned int port);
106 int (*power_down_pmic_pb) (void);
107 int (*power_down_pmic_cp) (void);
108 int (*power_down_pmic) (void);
111 struct intel_sst_pcm_control {
112 int (*open) (struct snd_sst_params *str_param);
113 int (*device_control) (int cmd, void *arg);
114 int (*close) (unsigned int str_id);
116 struct intel_sst_card_ops {
118 unsigned int vendor_id;
119 struct intel_sst_pcm_control *pcm_control;
120 struct snd_pmic_ops *scard_ops;
123 /* modified for generic access */
124 struct sc_reg_access {
129 enum sc_reg_access_type {
135 int register_sst_card(struct intel_sst_card_ops *card);
136 void unregister_sst_card(struct intel_sst_card_ops *card);
137 #endif /* __INTEL_SST_H__ */