aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorJeeja KP <jeeja.kp@intel.com>2015-08-21 12:06:20 -0400
committerTakashi Iwai <tiwai@suse.de>2015-08-21 13:28:20 -0400
commitee8bc4df1b5a9df1ede13975c40dec7009214595 (patch)
tree7c2da8f6921a454d31529016a700dc564f79143c /include/sound
parentc5b0c09b8fa3e02d9cbfd9445fb4114becdd3390 (diff)
ALSA: hdac: Add support to enable SPIB for hdac ext stream
The drivers need to set the spib and maxfifios values, so add these new APIs snd_hdac_ext_stream_set_spib() and snd_hdac_ext_stream_set_spbmaxfifo() APIs For these APIs we also need to have spib and fifos pointer, so add these to hdac_ext_stream and initialize them at stream init Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/hda_register.h4
-rw-r--r--include/sound/hdaudio_ext.h10
2 files changed, 14 insertions, 0 deletions
diff --git a/include/sound/hda_register.h b/include/sound/hda_register.h
index ae995e523ff8..2ae8812d7b1a 100644
--- a/include/sound/hda_register.h
+++ b/include/sound/hda_register.h
@@ -160,6 +160,10 @@ enum { SDI0, SDI1, SDI2, SDI3, SDO0, SDO1, SDO2, SDO3 };
160#define AZX_SPB_BASE 0x08 160#define AZX_SPB_BASE 0x08
161/* Interval used to calculate the iterating register offset */ 161/* Interval used to calculate the iterating register offset */
162#define AZX_SPB_INTERVAL 0x08 162#define AZX_SPB_INTERVAL 0x08
163/* SPIB base */
164#define AZX_SPB_SPIB 0x00
165/* SPIB MAXFIFO base*/
166#define AZX_SPB_MAXFIFO 0x04
163 167
164/* registers of Global Time Synchronization Capability Structure */ 168/* registers of Global Time Synchronization Capability Structure */
165#define AZX_GTS_CAP_ID 0x1 169#define AZX_GTS_CAP_ID 0x1
diff --git a/include/sound/hdaudio_ext.h b/include/sound/hdaudio_ext.h
index 160160d9bffc..9385c99a6504 100644
--- a/include/sound/hdaudio_ext.h
+++ b/include/sound/hdaudio_ext.h
@@ -63,6 +63,8 @@ enum hdac_ext_stream_type {
63 * @hstream: hdac_stream 63 * @hstream: hdac_stream
64 * @pphc_addr: processing pipe host stream pointer 64 * @pphc_addr: processing pipe host stream pointer
65 * @pplc_addr: processing pipe link stream pointer 65 * @pplc_addr: processing pipe link stream pointer
66 * @spib_addr: software position in buffers stream pointer
67 * @fifo_addr: software position Max fifos stream pointer
66 * @decoupled: stream host and link is decoupled 68 * @decoupled: stream host and link is decoupled
67 * @link_locked: link is locked 69 * @link_locked: link is locked
68 * @link_prepared: link is prepared 70 * @link_prepared: link is prepared
@@ -74,6 +76,9 @@ struct hdac_ext_stream {
74 void __iomem *pphc_addr; 76 void __iomem *pphc_addr;
75 void __iomem *pplc_addr; 77 void __iomem *pplc_addr;
76 78
79 void __iomem *spib_addr;
80 void __iomem *fifo_addr;
81
77 bool decoupled:1; 82 bool decoupled:1;
78 bool link_locked:1; 83 bool link_locked:1;
79 bool link_prepared; 84 bool link_prepared;
@@ -100,6 +105,11 @@ void snd_hdac_ext_stream_decouple(struct hdac_ext_bus *bus,
100 struct hdac_ext_stream *azx_dev, bool decouple); 105 struct hdac_ext_stream *azx_dev, bool decouple);
101void snd_hdac_ext_stop_streams(struct hdac_ext_bus *sbus); 106void snd_hdac_ext_stop_streams(struct hdac_ext_bus *sbus);
102 107
108int snd_hdac_ext_stream_set_spib(struct hdac_ext_bus *ebus,
109 struct hdac_ext_stream *stream, u32 value);
110int snd_hdac_ext_stream_set_spbmaxfifo(struct hdac_ext_bus *ebus,
111 struct hdac_ext_stream *stream);
112
103void snd_hdac_ext_link_stream_start(struct hdac_ext_stream *hstream); 113void snd_hdac_ext_link_stream_start(struct hdac_ext_stream *hstream);
104void snd_hdac_ext_link_stream_clear(struct hdac_ext_stream *hstream); 114void snd_hdac_ext_link_stream_clear(struct hdac_ext_stream *hstream);
105void snd_hdac_ext_link_stream_reset(struct hdac_ext_stream *hstream); 115void snd_hdac_ext_link_stream_reset(struct hdac_ext_stream *hstream);