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
33 #define SST_CARD_NAMES "intel_mid_card"
35 /* control list Pmic & Lpe */
43 enum sst_card_states {
49 SST_SND_ALLOC = 0x1000,
50 SST_SND_PAUSE = 0x1001,
51 SST_SND_RESUME = 0x1002,
52 SST_SND_DROP = 0x1003,
53 SST_SND_FREE = 0x1004,
54 SST_SND_BUFFER_POINTER = 0x1005,
55 SST_SND_STREAM_INIT = 0x1006,
56 SST_SND_START = 0x1007,
57 SST_SND_STREAM_PROCESS = 0x1008,
58 SST_MAX_CONTROLS = 0x1008,
59 SST_CONTROL_BASE = 0x1000,
60 SST_ENABLE_RX_TIME_SLOT = 0x1009,
70 struct pcm_stream_info {
73 void (*period_elapsed) (void *mad_substream);
74 unsigned long long buffer_ptr;
87 int (*set_input_dev) (u8 value);
88 int (*set_output_dev) (u8 value);
90 int (*set_mute) (int dev_id, u8 value);
91 int (*get_mute) (int dev_id, u8 *value);
93 int (*set_vol) (int dev_id, int value);
94 int (*get_vol) (int dev_id, int *value);
96 int (*init_card) (void);
97 int (*set_pcm_audio_params)
98 (int sfreq, int word_size , int num_channel);
99 int (*set_pcm_voice_params) (void);
100 int (*set_voice_port) (int status);
101 int (*set_audio_port) (int status);
103 int (*power_up_pmic_pb) (unsigned int port);
104 int (*power_up_pmic_cp) (unsigned int port);
105 int (*power_down_pmic_pb) (void);
106 int (*power_down_pmic_cp) (void);
107 int (*power_down_pmic) (void);
110 struct intel_sst_card_ops {
112 unsigned int vendor_id;
113 int (*control_set) (int control_element, void *value);
114 struct snd_pmic_ops *scard_ops;
117 /* modified for generic access */
118 struct sc_reg_access {
123 enum sc_reg_access_type {
129 int register_sst_card(struct intel_sst_card_ops *card);
130 void unregister_sst_card(struct intel_sst_card_ops *card);
131 #endif /* __INTEL_SST_H__ */