mbox series

[0/5] ALSA: hda / ASoC: SOF: Add support for PIO command mode

Message ID 20240409083812.14001-1-peter.ujfalusi@linux.intel.com (mailing list archive)
Headers show
Series ALSA: hda / ASoC: SOF: Add support for PIO command mode | expand

Message

Peter Ujfalusi April 9, 2024, 8:38 a.m. UTC
Hi,

This series will introduce support for using PIO for commands (immediate
commands) instead of CORB while retaining the use of RIRB for unsolicited 
responses (notifications).

This mode of operation is the recommended one for Lunar Lake family. 

The series adds support for the PIO mode for SOF and the 'legacy' HDA
stack to make sure that they will work correctly when Lunar Lake is available
for consumers.

Regards,
Peter
---
Peter Ujfalusi (5):
  ALSA: hda: Introduce flags to force commands via PIO instead of CORB
  ALSA: hda: hdac_controller: Implement support for use_pio_for_commands
    mode
  ALSA: pci: hda: hda_controller: Add support for use_pio_for_commands
    mode
  ALSA: hda: Intel: Select AZX_DCAPS_PIO_COMMANDS for Lunar Lake
  ASoC: SOF: Intel: hda-bus: Use PIO mode for Lunar Lake

 include/sound/hdaudio.h        |   1 +
 sound/hda/hdac_controller.c    | 127 +++++++++++++++++++++++++++++++--
 sound/pci/hda/hda_controller.c |   7 +-
 sound/pci/hda/hda_controller.h |   1 +
 sound/pci/hda/hda_intel.c      |   5 +-
 sound/soc/sof/intel/hda-bus.c  |   5 ++
 6 files changed, 136 insertions(+), 10 deletions(-)

Comments

Jaroslav Kysela April 9, 2024, 8:53 a.m. UTC | #1
On 09. 04. 24 10:38, Peter Ujfalusi wrote:
> Hi,
> 
> This series will introduce support for using PIO for commands (immediate
> commands) instead of CORB while retaining the use of RIRB for unsolicited
> responses (notifications).

Hi,

Could you elaborate, how this affects CPU usage (busy loops for I/O)? Do the 
bus read operation wait until the data transfer on bus is finished?

> This mode of operation is the recommended one for Lunar Lake family.

A bit more explanation, please. It looks like a step back.

					Jaroslav
Peter Ujfalusi April 10, 2024, 8:56 a.m. UTC | #2
Hi Jaroslav,

On 09/04/2024 11:53, Jaroslav Kysela wrote:
> On 09. 04. 24 10:38, Peter Ujfalusi wrote:
>> Hi,
>>
>> This series will introduce support for using PIO for commands (immediate
>> commands) instead of CORB while retaining the use of RIRB for unsolicited
>> responses (notifications).
> 
> Hi,
> 
> Could you elaborate, how this affects CPU usage (busy loops for I/O)? Do
> the bus read operation wait until the data transfer on bus is finished?
> 
>> This mode of operation is the recommended one for Lunar Lake family.
> 
> A bit more explanation, please. It looks like a step back.

LunarLake is a different architecture compared to previous solutions, so
some things are improved with e.g. all audio interfaces using the
HDaudio DMA, and others are done differently (commands, wakes, etc).
In practice, we have not found any cases where performance would be
significantly impacted by the use of PIO v. DMA. The number of 'verbs'
sent is usually fairly limited.

The major concern we had initially was firmware download for Cirrus/TI
amps behind an HDaudio bridge, but all of those solutions rely on a side
I2C/SPI bus so the firmware does not rely on the HDaudio commands.
Hope this answers to your questions
Takashi Iwai April 18, 2024, 6:39 a.m. UTC | #3
On Tue, 09 Apr 2024 10:38:07 +0200,
Peter Ujfalusi wrote:
> 
> Hi,
> 
> This series will introduce support for using PIO for commands (immediate
> commands) instead of CORB while retaining the use of RIRB for unsolicited 
> responses (notifications).
> 
> This mode of operation is the recommended one for Lunar Lake family. 
> 
> The series adds support for the PIO mode for SOF and the 'legacy' HDA
> stack to make sure that they will work correctly when Lunar Lake is available
> for consumers.
> 
> Regards,
> Peter
> ---
> Peter Ujfalusi (5):
>   ALSA: hda: Introduce flags to force commands via PIO instead of CORB
>   ALSA: hda: hdac_controller: Implement support for use_pio_for_commands
>     mode
>   ALSA: pci: hda: hda_controller: Add support for use_pio_for_commands
>     mode
>   ALSA: hda: Intel: Select AZX_DCAPS_PIO_COMMANDS for Lunar Lake
>   ASoC: SOF: Intel: hda-bus: Use PIO mode for Lunar Lake

Now applied all patches to for-next branch.  Thanks.


Takashi