alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Vinod Koul <vinod.koul@intel.com>
To: alsa-devel@alsa-project.org
Cc: tiwai@suse.de, patches.audio@intel.com,
	liam.r.girdwood@linux.intel.com,
	Vinod Koul <vinod.koul@intel.com>,
	broonie@kernel.org, Jeeja KP <jeeja.kp@intel.com>
Subject: [PATCH v4 2/7] ALSA: hda - add new HDA registers
Date: Mon, 11 May 2015 16:24:00 +0530	[thread overview]
Message-ID: <1431341645-2457-3-git-send-email-vinod.koul@intel.com> (raw)
In-Reply-To: <1431341645-2457-1-git-send-email-vinod.koul@intel.com>

From: Jeeja KP <jeeja.kp@intel.com>

This patch adds new registers as per HD audio Spec like capability registers
for processing pipe, software position based FIFO, Multiple Links and Global
Time Synchronization.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
 include/sound/hda_register.h | 88 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 88 insertions(+)

diff --git a/include/sound/hda_register.h b/include/sound/hda_register.h
index 4f6d3fce6ee6..b213d3155be1 100644
--- a/include/sound/hda_register.h
+++ b/include/sound/hda_register.h
@@ -28,6 +28,10 @@
 #define AZX_REG_STATESTS		0x0e
 #define AZX_REG_GSTS			0x10
 #define   AZX_GSTS_FSTS		(1 << 1)   /* flush status */
+#define AZX_REG_GCAP2			0x12
+#define AZX_REG_LLCH			0x14
+#define AZX_REG_OUTSTRMPAY		0x18
+#define AZX_REG_INSTRMPAY		0x1A
 #define AZX_REG_INTCTL			0x20
 #define AZX_REG_INTSTS			0x24
 #define AZX_REG_WALLCLK			0x30	/* 24Mhz source */
@@ -81,6 +85,7 @@ enum { SDI0, SDI1, SDI2, SDI3, SDO0, SDO1, SDO2, SDO3 };
 #define AZX_REG_SD_FIFOW		0x0e
 #define AZX_REG_SD_FIFOSIZE		0x10
 #define AZX_REG_SD_FORMAT		0x12
+#define AZX_REG_SD_FIFOL		0x14
 #define AZX_REG_SD_BDLPL		0x18
 #define AZX_REG_SD_BDLPU		0x1c
 
@@ -134,6 +139,89 @@ enum { SDI0, SDI1, SDI2, SDI3, SDO0, SDO1, SDO2, SDO3 };
 #define AZX_MAX_CORB_ENTRIES	256
 #define AZX_MAX_RIRB_ENTRIES	256
 
+/* Capability header  Structure */
+#define AZX_REG_CAP_HDR			0x0
+#define AZX_CAP_HDR_VER_OFF		28
+#define AZX_CAP_HDR_VER_MASK		(0xF << AZX_CAP_HDR_VER_OFF)
+#define AZX_CAP_HDR_ID_OFF		16
+#define AZX_CAP_HDR_ID_MASK		(0xFFF << AZX_CAP_HDR_ID_OFF)
+#define AZX_CAP_HDR_NXT_PTR_MASK	0xFFFF
+
+/* registers of Software Position Based FIFO Capability Structure */
+#define AZX_SPB_CAP_ID			0x4
+#define AZX_REG_SPB_BASE_ADDR		0x700
+#define AZX_REG_SPB_SPBFCH		0x00
+#define AZX_REG_SPB_SPBFCCTL		0x04
+/* Base used to calculate the iterating register offset */
+#define AZX_SPB_BASE			0x08
+/* Interval used to calculate the iterating register offset */
+#define AZX_SPB_INTERVAL		0x08
+
+/* registers of Global Time Synchronization Capability Structure */
+#define AZX_GTS_CAP_ID			0x1
+#define AZX_REG_GTS_GTSCH		0x00
+#define AZX_REG_GTS_GTSCD		0x04
+#define AZX_REG_GTS_GTSCTLAC		0x0C
+#define AZX_GTS_BASE			0x20
+#define AZX_GTS_INTERVAL		0x20
+
+/* registers for Processing Pipe Capability Structure */
+#define AZX_PP_CAP_ID			0x3
+#define AZX_REG_PP_PPCH			0x10
+#define AZX_REG_PP_PPCTL		0x04
+#define AZX_PPCTL_PIE			(1<<31)
+#define AZX_PPCTL_GPROCEN		(1<<30)
+/* _X_ = dma engine # and cannot * exceed 29 (per spec max 30 dma engines) */
+#define AZX_PPCTL_PROCEN(_X_)		(1<<(_X_))
+
+#define AZX_REG_PP_PPSTS		0x08
+
+#define AZX_PPHC_BASE			0x10
+#define AZX_PPHC_INTERVAL		0x10
+
+#define AZX_REG_PPHCLLPL		0x0
+#define AZX_REG_PPHCLLPU		0x4
+#define AZX_REG_PPHCLDPL		0x8
+#define AZX_REG_PPHCLDPU		0xC
+
+#define AZX_PPLC_BASE			0x10
+#define AZX_PPLC_MULTI			0x10
+#define AZX_PPLC_INTERVAL		0x10
+
+#define AZX_REG_PPLCCTL			0x0
+#define AZX_PPLCCTL_STRM_BITS		4
+#define AZX_PPLCCTL_STRM_SHIFT		20
+#define AZX_REG_MASK(bit_num, offset) \
+	(((1 << (bit_num)) - 1) << (offset))
+#define AZX_PPLCCTL_STRM_MASK \
+	AZX_REG_MASK(AZX_PPLCCTL_STRM_BITS, AZX_PPLCCTL_STRM_SHIFT)
+#define AZX_PPLCCTL_RUN			(1<<1)
+#define AZX_PPLCCTL_STRST		(1<<0)
+
+#define AZX_REG_PPLCFMT			0x4
+#define AZX_REG_PPLCLLPL		0x8
+#define AZX_REG_PPLCLLPU		0xC
+
+/* registers for Multiple Links Capability Structure */
+#define AZX_ML_CAP_ID			0x2
+#define AZX_REG_ML_MLCH			0x00
+#define AZX_REG_ML_MLCD			0x04
+#define AZX_ML_BASE			0x40
+#define AZX_ML_INTERVAL			0x40
+
+#define AZX_REG_ML_LCAP			0x00
+#define AZX_REG_ML_LCTL			0x04
+#define AZX_REG_ML_LOSIDV		0x08
+#define AZX_REG_ML_LSDIID		0x0C
+#define AZX_REG_ML_LPSOO		0x10
+#define AZX_REG_ML_LPSIO		0x12
+#define AZX_REG_ML_LWALFC		0x18
+#define AZX_REG_ML_LOUTPAY		0x20
+#define AZX_REG_ML_LINPAY		0x30
+
+#define AZX_MLCTL_SPA			(1<<16)
+#define AZX_MLCTL_CPA			23
+
 /*
  * helpers to read the stream position
  */
-- 
1.9.1

  parent reply	other threads:[~2015-05-11 10:53 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-11 10:53 [PATCH v4 0/7] ASoC: intel - add skylake PCM driver Vinod Koul
2015-05-11 10:53 ` [PATCH v4 1/7] ASoC: hda - add ASoC HDA codec match function Vinod Koul
2015-05-22 12:56   ` Mark Brown
2015-05-22 13:35     ` Takashi Iwai
2015-05-22 17:41       ` Mark Brown
2015-05-22 18:13         ` Takashi Iwai
2015-05-23  5:51           ` Vinod Koul
2015-05-25 10:48             ` Mark Brown
2015-05-25 11:21               ` Vinod Koul
2015-05-25 11:55                 ` Takashi Iwai
2015-05-25 13:58                   ` Mark Brown
2015-05-26  5:24                     ` Takashi Iwai
2015-05-26 13:32                       ` Mark Brown
2015-05-26 13:41                         ` Takashi Iwai
2015-05-26 19:43                           ` Mark Brown
2015-05-27  6:05                             ` Takashi Iwai
2015-05-27 18:34                               ` Mark Brown
2015-05-27 19:17                                 ` Takashi Iwai
2015-05-28 19:53                                   ` Mark Brown
2015-05-29  4:58                                     ` Takashi Iwai
2015-05-29  8:15                                       ` Vinod Koul
2015-05-29 17:35                                         ` Mark Brown
2015-06-01  5:05                                           ` Vinod Koul
2015-06-02 10:38                                             ` Mark Brown
2015-06-02 12:25                                               ` Vinod Koul
2015-05-11 10:54 ` Vinod Koul [this message]
2015-05-22 12:58   ` [PATCH v4 2/7] ALSA: hda - add new HDA registers Mark Brown
2015-05-22 13:32     ` Takashi Iwai
2015-05-11 10:54 ` [PATCH v4 3/7] ASoC: hda - add asoc hda core bus, controller and stream helpers Vinod Koul
2015-05-26 18:51   ` Mark Brown
2015-05-27  5:40     ` Vinod Koul
2015-05-11 10:54 ` [PATCH v4 4/7] ASoC: intel - add Skylake HDA platform driver Vinod Koul
2015-05-11 10:54 ` [PATCH v4 5/7] ASoC: intel - add Skylake HDA audio driver Vinod Koul
2015-05-29 17:41   ` Mark Brown
2015-05-29 18:25     ` Takashi Iwai
2015-06-02 10:45       ` Mark Brown
2015-06-02 10:53         ` Takashi Iwai
2015-06-02 11:07           ` Mark Brown
2015-06-02 11:57             ` Takashi Iwai
2015-06-02 12:39             ` Vinod Koul
2015-06-02 14:30               ` Mark Brown
2015-06-01  5:13     ` Vinod Koul
2015-06-01  5:32       ` Takashi Iwai
2015-06-02 10:42         ` Mark Brown
2015-06-02 10:48           ` Takashi Iwai
2015-06-02 11:10             ` Mark Brown
2015-06-02 11:44               ` Takashi Iwai
2015-06-02 12:29                 ` Vinod Koul
2015-05-11 10:54 ` [PATCH v4 6/7] ASoC: intel - add makefile support for SKL driver Vinod Koul
2015-05-11 10:54 ` [PATCH v4 7/7] ASoC: intel - adds support for decoupled mode in skl driver Vinod Koul
2015-05-22 12:20 ` [PATCH v4 0/7] ASoC: intel - add skylake PCM driver Vinod Koul
2015-05-22 13:12   ` Mark Brown
2015-05-25  6:57 ` Takashi Iwai
2015-05-25 11:24   ` Vinod Koul
2015-05-25 11:58     ` Takashi Iwai
2015-05-26  4:14       ` Vinod Koul
2015-05-26  5:27         ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1431341645-2457-3-git-send-email-vinod.koul@intel.com \
    --to=vinod.koul@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=jeeja.kp@intel.com \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=patches.audio@intel.com \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).