Commit 752d4de4 authored by Bard Liao's avatar Bard Liao Committed by Mark Brown

ASoC: Intel: sof_sdw: rename SOF_RT711_JDSRC to SOF_JACK_JDSRC

Jack Detection source can be applied to all jacks, not only rt711.
No function changes.
Signed-off-by: default avatarBard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230602202225.249209-9-pierre-louis.bossart@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 526a1876
...@@ -24,9 +24,9 @@ MODULE_PARM_DESC(quirk, "Board-specific quirk override"); ...@@ -24,9 +24,9 @@ MODULE_PARM_DESC(quirk, "Board-specific quirk override");
static void log_quirks(struct device *dev) static void log_quirks(struct device *dev)
{ {
if (SOF_RT711_JDSRC(sof_sdw_quirk)) if (SOF_JACK_JDSRC(sof_sdw_quirk))
dev_dbg(dev, "quirk realtek,jack-detect-source %ld\n", dev_dbg(dev, "quirk realtek,jack-detect-source %ld\n",
SOF_RT711_JDSRC(sof_sdw_quirk)); SOF_JACK_JDSRC(sof_sdw_quirk));
if (sof_sdw_quirk & SOF_SDW_FOUR_SPK) if (sof_sdw_quirk & SOF_SDW_FOUR_SPK)
dev_dbg(dev, "quirk SOF_SDW_FOUR_SPK enabled\n"); dev_dbg(dev, "quirk SOF_SDW_FOUR_SPK enabled\n");
if (sof_sdw_quirk & SOF_SDW_TGL_HDMI) if (sof_sdw_quirk & SOF_SDW_TGL_HDMI)
......
...@@ -41,7 +41,7 @@ enum { ...@@ -41,7 +41,7 @@ enum {
SOF_I2S_SSP5 = BIT(5), SOF_I2S_SSP5 = BIT(5),
}; };
#define SOF_RT711_JDSRC(quirk) ((quirk) & GENMASK(3, 0)) #define SOF_JACK_JDSRC(quirk) ((quirk) & GENMASK(3, 0))
#define SOF_SDW_FOUR_SPK BIT(4) #define SOF_SDW_FOUR_SPK BIT(4)
#define SOF_SDW_TGL_HDMI BIT(5) #define SOF_SDW_TGL_HDMI BIT(5)
#define SOF_SDW_PCH_DMIC BIT(6) #define SOF_SDW_PCH_DMIC BIT(6)
......
...@@ -27,9 +27,9 @@ static int rt711_add_codec_device_props(struct device *sdw_dev) ...@@ -27,9 +27,9 @@ static int rt711_add_codec_device_props(struct device *sdw_dev)
struct fwnode_handle *fwnode; struct fwnode_handle *fwnode;
int ret; int ret;
if (!SOF_RT711_JDSRC(sof_sdw_quirk)) if (!SOF_JACK_JDSRC(sof_sdw_quirk))
return 0; return 0;
props[0] = PROPERTY_ENTRY_U32("realtek,jd-src", SOF_RT711_JDSRC(sof_sdw_quirk)); props[0] = PROPERTY_ENTRY_U32("realtek,jd-src", SOF_JACK_JDSRC(sof_sdw_quirk));
fwnode = fwnode_create_software_node(props, NULL); fwnode = fwnode_create_software_node(props, NULL);
if (IS_ERR(fwnode)) if (IS_ERR(fwnode))
......
...@@ -27,10 +27,10 @@ static int rt711_sdca_add_codec_device_props(struct device *sdw_dev) ...@@ -27,10 +27,10 @@ static int rt711_sdca_add_codec_device_props(struct device *sdw_dev)
struct fwnode_handle *fwnode; struct fwnode_handle *fwnode;
int ret; int ret;
if (!SOF_RT711_JDSRC(sof_sdw_quirk)) if (!SOF_JACK_JDSRC(sof_sdw_quirk))
return 0; return 0;
props[0] = PROPERTY_ENTRY_U32("realtek,jd-src", SOF_RT711_JDSRC(sof_sdw_quirk)); props[0] = PROPERTY_ENTRY_U32("realtek,jd-src", SOF_JACK_JDSRC(sof_sdw_quirk));
fwnode = fwnode_create_software_node(props, NULL); fwnode = fwnode_create_software_node(props, NULL);
if (IS_ERR(fwnode)) if (IS_ERR(fwnode))
...@@ -143,7 +143,7 @@ int sof_sdw_rt711_sdca_exit(struct snd_soc_card *card, struct snd_soc_dai_link * ...@@ -143,7 +143,7 @@ int sof_sdw_rt711_sdca_exit(struct snd_soc_card *card, struct snd_soc_dai_link *
if (!ctx->headset_codec_dev) if (!ctx->headset_codec_dev)
return 0; return 0;
if (!SOF_RT711_JDSRC(sof_sdw_quirk)) if (!SOF_JACK_JDSRC(sof_sdw_quirk))
return 0; return 0;
device_remove_software_node(ctx->headset_codec_dev); device_remove_software_node(ctx->headset_codec_dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment