aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2016-01-11 08:54:28 -0500
committerMark Brown <broonie@kernel.org>2016-01-11 08:54:28 -0500
commit7b2f32cc81e14149e2fe515f69f35f9e11e8ba5a (patch)
treedac5980859c5af6566c7f9be2a12c7b68651eea9 /include/sound
parentb7f08d29c9ef76fb4bc95385e3f90b51e0494a3b (diff)
parentfe09dd8eb2310ec658f49a5431df2259f11cbe9e (diff)
Merge remote-tracking branch 'asoc/topic/intel' into asoc-next
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/hda_register.h9
-rw-r--r--include/sound/hdaudio_ext.h21
-rw-r--r--include/sound/soc-dapm.h4
-rw-r--r--include/sound/soc.h5
4 files changed, 38 insertions, 1 deletions
diff --git a/include/sound/hda_register.h b/include/sound/hda_register.h
index 94dc6a9772e0..ff1aecf325e8 100644
--- a/include/sound/hda_register.h
+++ b/include/sound/hda_register.h
@@ -233,6 +233,15 @@ enum { SDI0, SDI1, SDI2, SDI3, SDO0, SDO1, SDO2, SDO3 };
233#define AZX_MLCTL_SPA (1<<16) 233#define AZX_MLCTL_SPA (1<<16)
234#define AZX_MLCTL_CPA 23 234#define AZX_MLCTL_CPA 23
235 235
236
237/* registers for DMA Resume Capability Structure */
238#define AZX_DRSM_CAP_ID 0x5
239#define AZX_REG_DRSM_CTL 0x4
240/* Base used to calculate the iterating register offset */
241#define AZX_DRSM_BASE 0x08
242/* Interval used to calculate the iterating register offset */
243#define AZX_DRSM_INTERVAL 0x08
244
236/* 245/*
237 * helpers to read the stream position 246 * helpers to read the stream position
238 */ 247 */
diff --git a/include/sound/hdaudio_ext.h b/include/sound/hdaudio_ext.h
index a4cadd9c297a..07fa59237feb 100644
--- a/include/sound/hdaudio_ext.h
+++ b/include/sound/hdaudio_ext.h
@@ -12,6 +12,7 @@
12 * @spbcap: SPIB capabilities pointer 12 * @spbcap: SPIB capabilities pointer
13 * @mlcap: MultiLink capabilities pointer 13 * @mlcap: MultiLink capabilities pointer
14 * @gtscap: gts capabilities pointer 14 * @gtscap: gts capabilities pointer
15 * @drsmcap: dma resume capabilities pointer
15 * @hlink_list: link list of HDA links 16 * @hlink_list: link list of HDA links
16 */ 17 */
17struct hdac_ext_bus { 18struct hdac_ext_bus {
@@ -23,6 +24,7 @@ struct hdac_ext_bus {
23 void __iomem *spbcap; 24 void __iomem *spbcap;
24 void __iomem *mlcap; 25 void __iomem *mlcap;
25 void __iomem *gtscap; 26 void __iomem *gtscap;
27 void __iomem *drsmcap;
26 28
27 struct list_head hlink_list; 29 struct list_head hlink_list;
28}; 30};
@@ -72,6 +74,9 @@ enum hdac_ext_stream_type {
72 * @pplc_addr: processing pipe link stream pointer 74 * @pplc_addr: processing pipe link stream pointer
73 * @spib_addr: software position in buffers stream pointer 75 * @spib_addr: software position in buffers stream pointer
74 * @fifo_addr: software position Max fifos stream pointer 76 * @fifo_addr: software position Max fifos stream pointer
77 * @dpibr_addr: DMA position in buffer resume pointer
78 * @dpib: DMA position in buffer
79 * @lpib: Linear position in buffer
75 * @decoupled: stream host and link is decoupled 80 * @decoupled: stream host and link is decoupled
76 * @link_locked: link is locked 81 * @link_locked: link is locked
77 * @link_prepared: link is prepared 82 * @link_prepared: link is prepared
@@ -86,6 +91,10 @@ struct hdac_ext_stream {
86 void __iomem *spib_addr; 91 void __iomem *spib_addr;
87 void __iomem *fifo_addr; 92 void __iomem *fifo_addr;
88 93
94 void __iomem *dpibr_addr;
95
96 u32 dpib;
97 u32 lpib;
89 bool decoupled:1; 98 bool decoupled:1;
90 bool link_locked:1; 99 bool link_locked:1;
91 bool link_prepared; 100 bool link_prepared;
@@ -116,6 +125,11 @@ int snd_hdac_ext_stream_set_spib(struct hdac_ext_bus *ebus,
116 struct hdac_ext_stream *stream, u32 value); 125 struct hdac_ext_stream *stream, u32 value);
117int snd_hdac_ext_stream_get_spbmaxfifo(struct hdac_ext_bus *ebus, 126int snd_hdac_ext_stream_get_spbmaxfifo(struct hdac_ext_bus *ebus,
118 struct hdac_ext_stream *stream); 127 struct hdac_ext_stream *stream);
128void snd_hdac_ext_stream_drsm_enable(struct hdac_ext_bus *ebus,
129 bool enable, int index);
130int snd_hdac_ext_stream_set_dpibr(struct hdac_ext_bus *ebus,
131 struct hdac_ext_stream *stream, u32 value);
132int snd_hdac_ext_stream_set_lpib(struct hdac_ext_stream *stream, u32 value);
119 133
120void snd_hdac_ext_link_stream_start(struct hdac_ext_stream *hstream); 134void snd_hdac_ext_link_stream_start(struct hdac_ext_stream *hstream);
121void snd_hdac_ext_link_stream_clear(struct hdac_ext_stream *hstream); 135void snd_hdac_ext_link_stream_clear(struct hdac_ext_stream *hstream);
@@ -133,6 +147,7 @@ struct hdac_ext_link {
133 147
134int snd_hdac_ext_bus_link_power_up(struct hdac_ext_link *link); 148int snd_hdac_ext_bus_link_power_up(struct hdac_ext_link *link);
135int snd_hdac_ext_bus_link_power_down(struct hdac_ext_link *link); 149int snd_hdac_ext_bus_link_power_down(struct hdac_ext_link *link);
150int snd_hdac_ext_bus_link_power_up_all(struct hdac_ext_bus *ebus);
136int snd_hdac_ext_bus_link_power_down_all(struct hdac_ext_bus *ebus); 151int snd_hdac_ext_bus_link_power_down_all(struct hdac_ext_bus *ebus);
137void snd_hdac_ext_link_set_stream_id(struct hdac_ext_link *link, 152void snd_hdac_ext_link_set_stream_id(struct hdac_ext_link *link,
138 int stream); 153 int stream);
@@ -186,9 +201,15 @@ struct hdac_ext_device {
186 /* codec ops */ 201 /* codec ops */
187 struct hdac_ext_codec_ops ops; 202 struct hdac_ext_codec_ops ops;
188 203
204 struct snd_card *card;
205 void *scodec;
189 void *private_data; 206 void *private_data;
190}; 207};
191 208
209struct hdac_ext_dma_params {
210 u32 format;
211 u8 stream_tag;
212};
192#define to_ehdac_device(dev) (container_of((dev), \ 213#define to_ehdac_device(dev) (container_of((dev), \
193 struct hdac_ext_device, hdac)) 214 struct hdac_ext_device, hdac))
194/* 215/*
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index 95a937eafb79..97069466c38d 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -49,6 +49,9 @@ struct device;
49#define SND_SOC_DAPM_SIGGEN(wname) \ 49#define SND_SOC_DAPM_SIGGEN(wname) \
50{ .id = snd_soc_dapm_siggen, .name = wname, .kcontrol_news = NULL, \ 50{ .id = snd_soc_dapm_siggen, .name = wname, .kcontrol_news = NULL, \
51 .num_kcontrols = 0, .reg = SND_SOC_NOPM } 51 .num_kcontrols = 0, .reg = SND_SOC_NOPM }
52#define SND_SOC_DAPM_SINK(wname) \
53{ .id = snd_soc_dapm_sink, .name = wname, .kcontrol_news = NULL, \
54 .num_kcontrols = 0, .reg = SND_SOC_NOPM }
52#define SND_SOC_DAPM_INPUT(wname) \ 55#define SND_SOC_DAPM_INPUT(wname) \
53{ .id = snd_soc_dapm_input, .name = wname, .kcontrol_news = NULL, \ 56{ .id = snd_soc_dapm_input, .name = wname, .kcontrol_news = NULL, \
54 .num_kcontrols = 0, .reg = SND_SOC_NOPM } 57 .num_kcontrols = 0, .reg = SND_SOC_NOPM }
@@ -485,6 +488,7 @@ enum snd_soc_dapm_type {
485 snd_soc_dapm_aif_in, /* audio interface input */ 488 snd_soc_dapm_aif_in, /* audio interface input */
486 snd_soc_dapm_aif_out, /* audio interface output */ 489 snd_soc_dapm_aif_out, /* audio interface output */
487 snd_soc_dapm_siggen, /* signal generator */ 490 snd_soc_dapm_siggen, /* signal generator */
491 snd_soc_dapm_sink,
488 snd_soc_dapm_dai_in, /* link to DAI structure */ 492 snd_soc_dapm_dai_in, /* link to DAI structure */
489 snd_soc_dapm_dai_out, 493 snd_soc_dapm_dai_out,
490 snd_soc_dapm_dai_link, /* link between two DAI structures */ 494 snd_soc_dapm_dai_link, /* link between two DAI structures */
diff --git a/include/sound/soc.h b/include/sound/soc.h
index fb955e69a78e..2fb08df8d934 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -1106,7 +1106,7 @@ struct snd_soc_card {
1106 /* CPU <--> Codec DAI links */ 1106 /* CPU <--> Codec DAI links */
1107 struct snd_soc_dai_link *dai_link; 1107 struct snd_soc_dai_link *dai_link;
1108 int num_links; 1108 int num_links;
1109 struct snd_soc_pcm_runtime *rtd; 1109 struct list_head rtd_list;
1110 int num_rtd; 1110 int num_rtd;
1111 1111
1112 /* optional codec specific configuration */ 1112 /* optional codec specific configuration */
@@ -1201,6 +1201,9 @@ struct snd_soc_pcm_runtime {
1201 struct dentry *debugfs_dpcm_root; 1201 struct dentry *debugfs_dpcm_root;
1202 struct dentry *debugfs_dpcm_state; 1202 struct dentry *debugfs_dpcm_state;
1203#endif 1203#endif
1204
1205 unsigned int num; /* 0-based and monotonic increasing */
1206 struct list_head list; /* rtd list of the soc card */
1204}; 1207};
1205 1208
1206/* mixer control */ 1209/* mixer control */