1 #ifndef __SST_MFLD_DSP_H__
2 #define __SST_MFLD_DSP_H__
4 * sst_mfld_dsp.h - Intel SST Driver for audio engine
6 * Copyright (C) 2008-12 Intel Corporation
7 * Authors: Vinod Koul <vinod.koul@linux.intel.com>
8 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; version 2 of the License.
14 * This program is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
19 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22 enum sst_codec_types {
23 /* AUDIO/MUSIC CODEC Type Definitions */
24 SST_CODEC_TYPE_UNKNOWN = 0,
25 SST_CODEC_TYPE_PCM, /* Pass through Audio codec */
34 SST_STREAM_TYPE_NONE = 0,
35 SST_STREAM_TYPE_MUSIC = 1,
38 struct snd_pcm_params {
39 u8 num_chan; /* 1=Mono, 2=Stereo */
40 u8 pcm_wd_sz; /* 16/24 - bit*/
41 u32 reserved; /* Bitrate in bits per second */
42 u32 sfreq; /* Sampling rate in Hz */
49 /* MP3 Music Parameters Message */
50 struct snd_mp3_params {
51 u8 num_chan; /* 1=Mono, 2=Stereo */
52 u8 pcm_wd_sz; /* 16/24 - bit*/
53 u8 crc_check; /* crc_check - disable (0) or enable (1) */
54 u8 reserved1; /* unused*/
55 u16 reserved2; /* Unused */
58 #define AAC_BIT_STREAM_ADTS 0
59 #define AAC_BIT_STREAM_ADIF 1
60 #define AAC_BIT_STREAM_RAW 2
62 /* AAC Music Parameters Message */
63 struct snd_aac_params {
64 u8 num_chan; /* 1=Mono, 2=Stereo*/
65 u8 pcm_wd_sz; /* 16/24 - bit*/
66 u8 bdownsample; /*SBR downsampling 0 - disable 1 -enabled AAC+ only */
67 u8 bs_format; /* input bit stream format adts=0, adif=1, raw=2 */
69 u32 externalsr; /*sampling rate of basic AAC raw bit stream*/
70 u8 sbr_signalling;/*disable/enable/set automode the SBR tool.AAC+*/
75 /* WMA Music Parameters Message */
76 struct snd_wma_params {
77 u8 num_chan; /* 1=Mono, 2=Stereo */
78 u8 pcm_wd_sz; /* 16/24 - bit*/
79 u32 brate; /* Use the hard coded value. */
80 u32 sfreq; /* Sampling freq eg. 8000, 441000, 48000 */
81 u32 channel_mask; /* Channel Mask */
82 u16 format_tag; /* Format Tag */
83 u16 block_align; /* packet size */
84 u16 wma_encode_opt;/* Encoder option */
85 u8 op_align; /* op align 0- 16 bit, 1- MSB, 2 LSB */
86 u8 reserved; /* reserved */
89 /* Codec params struture */
90 union snd_sst_codec_params {
91 struct snd_pcm_params pcm_params;
92 struct snd_mp3_params mp3_params;
93 struct snd_aac_params aac_params;
94 struct snd_wma_params wma_params;
97 /* Address and size info of a frame buffer */
98 struct sst_address_info {
99 u32 addr; /* Address at IA */
100 u32 size; /* Size of the buffer */
103 struct snd_sst_alloc_params_ext {
104 struct sst_address_info ring_buf_info[8];
108 u32 frag_size; /*Number of samples after which period elapsed
109 message is sent valid only if path = 0*/
112 struct snd_sst_stream_params {
113 union snd_sst_codec_params uc;
116 struct snd_sst_params {
122 struct snd_sst_stream_params sparams;
123 struct snd_sst_alloc_params_ext aparams;
126 #endif /* __SST_MFLD_DSP_H__ */