On 2022-10-19 8:02 PM, Pierre-Louis Bossart wrote:
...
This is clearly going to conflict with my own rename/move changes in
"ALSA/ASoC: hda: move SPIB/DRMS functionality from ext layer"
The SPIB and DRMS handling are not DSP-specific and should be handled in
the 'generic' sound/hda layer. In theory the HDaudio legacy driver
should have used those capabilities.
It should be a simple rebase though for this patch.
No problem with waiting for the series you mention to be merged first.
Will rebase once it's done.
Also, that's a good point in regard to DRSM. This could indeed be added
into common sound/hda lib. Something like below perhaps?
int snd_hdac_stream_resume(struct hdac_stream *azx_dev)
{
struct hdac_bus *bus = azx_dev->bus;
u32 mask, reg;
int ret;
mask = 1 << azx_dev->index;
ret = readb_poll_timeout(bus->drsmcap + AZX_REG_DRSM_CTL, reg,
!(reg & mask), 250, 2000);
if (ret)
dev_dbg(bus->dev, "polling RSM 0x%08x failed: %d\n",
mask, ret);
return ret;
}
EXPORT_SYMBOL_GPL(snd_hdac_stream_resume);