From: Cezary Rojewski <cezary.rojewski@intel.com>
To: tiwai@suse.com
Cc: linux-sound@vger.kernel.org, broonie@kernel.org, perex@perex.cz,
amadeuszx.slawinski@linux.intel.com,
Cezary Rojewski <cezary.rojewski@intel.com>
Subject: [PATCH 1/3] ALSA: hda: Fix compilation of snd_hdac_adsp_xxx() helpers
Date: Thu, 9 Jan 2025 13:52:02 +0100 [thread overview]
Message-ID: <20250109125204.3668961-2-cezary.rojewski@intel.com> (raw)
In-Reply-To: <20250109125204.3668961-1-cezary.rojewski@intel.com>
The snd_hdac_adsp_xxx() wrap snd_hdac_reg_xxx() helpers to simplify
register access for AudioDSP drivers e.g.: the avs-driver. Byte- and
word-variants of said helps do not expand to bare readx/writex()
operations but functions instead and, due to pointer type
incompatibility, cause compilation to fail.
As AudioDSP drivers e.g.: the avs-driver utilize struct hda_bus (and
thus struct hdac_bus) as the base structure, add casts to address the
problem.
Fixes: c19bd02e9029 ("ALSA: hda: Add helper macros for DSP capable devices")
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
---
include/sound/hdaudio_ext.h | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/include/sound/hdaudio_ext.h b/include/sound/hdaudio_ext.h
index 957295364a5e..79a010dd0062 100644
--- a/include/sound/hdaudio_ext.h
+++ b/include/sound/hdaudio_ext.h
@@ -120,21 +120,21 @@ int snd_hdac_ext_bus_link_put(struct hdac_bus *bus, struct hdac_ext_link *hlink)
void snd_hdac_ext_bus_link_power(struct hdac_device *codec, bool enable);
#define snd_hdac_adsp_writeb(chip, reg, value) \
- snd_hdac_reg_writeb(chip, (chip)->dsp_ba + (reg), value)
+ snd_hdac_reg_writeb((struct hdac_bus *)(chip), (chip)->dsp_ba + (reg), value)
#define snd_hdac_adsp_readb(chip, reg) \
- snd_hdac_reg_readb(chip, (chip)->dsp_ba + (reg))
+ snd_hdac_reg_readb((struct hdac_bus *)(chip), (chip)->dsp_ba + (reg))
#define snd_hdac_adsp_writew(chip, reg, value) \
- snd_hdac_reg_writew(chip, (chip)->dsp_ba + (reg), value)
+ snd_hdac_reg_writew((struct hdac_bus *)(chip), (chip)->dsp_ba + (reg), value)
#define snd_hdac_adsp_readw(chip, reg) \
- snd_hdac_reg_readw(chip, (chip)->dsp_ba + (reg))
+ snd_hdac_reg_readw((struct hdac_bus *)(chip), (chip)->dsp_ba + (reg))
#define snd_hdac_adsp_writel(chip, reg, value) \
- snd_hdac_reg_writel(chip, (chip)->dsp_ba + (reg), value)
+ snd_hdac_reg_writel((struct hdac_bus *)(chip), (chip)->dsp_ba + (reg), value)
#define snd_hdac_adsp_readl(chip, reg) \
- snd_hdac_reg_readl(chip, (chip)->dsp_ba + (reg))
+ snd_hdac_reg_readl((struct hdac_bus *)(chip), (chip)->dsp_ba + (reg))
#define snd_hdac_adsp_writeq(chip, reg, value) \
- snd_hdac_reg_writeq(chip, (chip)->dsp_ba + (reg), value)
+ snd_hdac_reg_writeq((struct hdac_bus *)(chip), (chip)->dsp_ba + (reg), value)
#define snd_hdac_adsp_readq(chip, reg) \
- snd_hdac_reg_readq(chip, (chip)->dsp_ba + (reg))
+ snd_hdac_reg_readq((struct hdac_bus *)(chip), (chip)->dsp_ba + (reg))
#define snd_hdac_adsp_updateb(chip, reg, mask, val) \
snd_hdac_adsp_writeb(chip, reg, \
--
2.25.1
next prev parent reply other threads:[~2025-01-09 12:38 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-09 12:52 [PATCH 0/3] ALSA: hda: Compilation and firmware-loading fixes Cezary Rojewski
2025-01-09 12:52 ` Cezary Rojewski [this message]
2025-01-09 12:42 ` [PATCH 1/3] ALSA: hda: Fix compilation of snd_hdac_adsp_xxx() helpers Jaroslav Kysela
2025-01-09 14:20 ` Takashi Iwai
2025-01-09 14:41 ` Cezary Rojewski
2025-01-09 14:52 ` Takashi Iwai
2025-01-09 12:52 ` [PATCH 2/3] ALSA: hda: Transfer firmware in two chunks Cezary Rojewski
2025-01-09 14:29 ` Takashi Iwai
2025-01-09 17:13 ` Cezary Rojewski
2025-01-09 12:52 ` [PATCH 3/3] ALSA: control: Fix argument type mismatch Cezary Rojewski
2025-01-09 14:31 ` Takashi Iwai
2025-01-09 14:47 ` Cezary Rojewski
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=20250109125204.3668961-2-cezary.rojewski@intel.com \
--to=cezary.rojewski@intel.com \
--cc=amadeuszx.slawinski@linux.intel.com \
--cc=broonie@kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox