All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
To: lgirdwood@gmail.com, broonie@kernel.org, tiwai@suse.de
Cc: linux-sound@vger.kernel.org,
	pierre-louis.bossart@linux.intel.com,
	kai.vehmanen@linux.intel.com, yung-chuan.liao@linux.intel.com,
	liam.r.girdwood@intel.com, ranjani.sridharan@linux.intel.com,
	perex@perex.cz
Subject: [PATCH 1/5] ALSA: hda: Introduce flags to force commands via PIO instead of CORB
Date: Tue,  9 Apr 2024 11:38:08 +0300	[thread overview]
Message-ID: <20240409083812.14001-2-peter.ujfalusi@linux.intel.com> (raw)
In-Reply-To: <20240409083812.14001-1-peter.ujfalusi@linux.intel.com>

Add AZX_DCAPS_PIO_COMMANDS quirk (bit 31) and use_pio_for_commands flag to
be able to select PIO mode as alternative for CORB based command sending
while retaining the RIRB functionality to receive unsolicited responses.

This mode differs from the azx single_cmd mode when RIRB is disabled.

The mixed mode is needed on Lunar Lake family because it is recommended to
use Immediate Command Response (PIO mode) instead of CORB for HDA commands.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
---
 include/sound/hdaudio.h        | 1 +
 sound/pci/hda/hda_controller.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/include/sound/hdaudio.h b/include/sound/hdaudio.h
index a73d7f34f4e5..85d2c3d00a27 100644
--- a/include/sound/hdaudio.h
+++ b/include/sound/hdaudio.h
@@ -351,6 +351,7 @@ struct hdac_bus {
 	bool needs_damn_long_delay:1;
 	bool not_use_interrupts:1;	/* prohibiting the RIRB IRQ */
 	bool access_sdnctl_in_dword:1;	/* accessing the sdnctl register by dword */
+	bool use_pio_for_commands:1;	/* Use PIO instead of CORB for commands */
 
 	int poll_count;
 
diff --git a/sound/pci/hda/hda_controller.h b/sound/pci/hda/hda_controller.h
index 8556031bcd68..c2d0109866e6 100644
--- a/sound/pci/hda/hda_controller.h
+++ b/sound/pci/hda/hda_controller.h
@@ -45,6 +45,7 @@
 #define AZX_DCAPS_CORBRP_SELF_CLEAR (1 << 28)	/* CORBRP clears itself after reset */
 #define AZX_DCAPS_NO_MSI64      (1 << 29)	/* Stick to 32-bit MSIs */
 #define AZX_DCAPS_SEPARATE_STREAM_TAG	(1 << 30) /* capture and playback use separate stream tag */
+#define AZX_DCAPS_PIO_COMMANDS (1 << 31)	/* Use PIO instead of CORB for commands */
 
 enum {
 	AZX_SNOOP_TYPE_NONE,
-- 
2.44.0


  reply	other threads:[~2024-04-09  8:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-09  8:38 [PATCH 0/5] ALSA: hda / ASoC: SOF: Add support for PIO command mode Peter Ujfalusi
2024-04-09  8:38 ` Peter Ujfalusi [this message]
2024-04-09  8:38 ` [PATCH 2/5] ALSA: hda: hdac_controller: Implement support for use_pio_for_commands mode Peter Ujfalusi
2024-04-09  8:38 ` [PATCH 3/5] ALSA: pci: hda: hda_controller: Add " Peter Ujfalusi
2024-04-09  8:38 ` [PATCH 4/5] ALSA: hda: Intel: Select AZX_DCAPS_PIO_COMMANDS for Lunar Lake Peter Ujfalusi
2024-04-09  8:38 ` [PATCH 5/5] ASoC: SOF: Intel: hda-bus: Use PIO mode " Peter Ujfalusi
2024-04-09 11:56   ` Mark Brown
2024-04-09  8:53 ` [PATCH 0/5] ALSA: hda / ASoC: SOF: Add support for PIO command mode Jaroslav Kysela
2024-04-10  8:56   ` Péter Ujfalusi
2024-04-18  6:39 ` 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=20240409083812.14001-2-peter.ujfalusi@linux.intel.com \
    --to=peter.ujfalusi@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=lgirdwood@gmail.com \
    --cc=liam.r.girdwood@intel.com \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=ranjani.sridharan@linux.intel.com \
    --cc=tiwai@suse.de \
    --cc=yung-chuan.liao@linux.intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.