All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] ASoC: soundwire: SDCA device quirk and cleanups
@ 2020-11-11 21:43 Pierre-Louis Bossart
  2020-11-11 21:43 ` [PATCH 1/4] ASoC: Intel: sof_sdw: add quirk for new TigerLake-SDCA device Pierre-Louis Bossart
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Pierre-Louis Bossart @ 2020-11-11 21:43 UTC (permalink / raw
  To: alsa-devel; +Cc: tiwai, broonie, Pierre-Louis Bossart

Add one quirk to handle new TigerLake-SDCA device and cleanup code.

Pierre-Louis Bossart (4):
  ASoC: Intel: sof_sdw: add quirk for new TigerLake-SDCA device
  ASoC: codecs: rt*.c: remove useless pointer cast
  ASoC: rt711: remove warnings
  ASoC: codecs: max98373-sdw: align regmap use with other codecs

 sound/soc/codecs/max98373-sdw.c  |  2 +-
 sound/soc/codecs/rt1308-sdw.c    |  2 +-
 sound/soc/codecs/rt5682-sdw.c    |  2 +-
 sound/soc/codecs/rt700.c         |  2 +-
 sound/soc/codecs/rt711-sdw.c     | 15 ++++++++-------
 sound/soc/codecs/rt711.c         |  2 +-
 sound/soc/codecs/rt715.c         |  2 +-
 sound/soc/intel/boards/sof_sdw.c | 10 ++++++++++
 8 files changed, 24 insertions(+), 13 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/4] ASoC: Intel: sof_sdw: add quirk for new TigerLake-SDCA device
  2020-11-11 21:43 [PATCH 0/4] ASoC: soundwire: SDCA device quirk and cleanups Pierre-Louis Bossart
@ 2020-11-11 21:43 ` Pierre-Louis Bossart
  2020-11-11 21:43 ` [PATCH 2/4] ASoC: codecs: rt*.c: remove useless pointer cast Pierre-Louis Bossart
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Pierre-Louis Bossart @ 2020-11-11 21:43 UTC (permalink / raw
  To: alsa-devel; +Cc: tiwai, broonie, Pierre-Louis Bossart, Rander Wang

Add quirks for jack detection, rt715 DAI and number of speakers.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@linux.intel.com>
---
 sound/soc/intel/boards/sof_sdw.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c
index b29946eb4355..ca968901ac96 100644
--- a/sound/soc/intel/boards/sof_sdw.c
+++ b/sound/soc/intel/boards/sof_sdw.c
@@ -48,6 +48,16 @@ static int sof_sdw_quirk_cb(const struct dmi_system_id *id)
 }
 
 static const struct dmi_system_id sof_sdw_quirk_table[] = {
+	{
+		.callback = sof_sdw_quirk_cb,
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
+			DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0A32")
+		},
+		.driver_data = (void *)(SOF_RT711_JD_SRC_JD2 |
+					SOF_RT715_DAI_ID_FIX |
+					SOF_SDW_FOUR_SPK),
+	},
 	{
 		.callback = sof_sdw_quirk_cb,
 		.matches = {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/4] ASoC: codecs: rt*.c: remove useless pointer cast
  2020-11-11 21:43 [PATCH 0/4] ASoC: soundwire: SDCA device quirk and cleanups Pierre-Louis Bossart
  2020-11-11 21:43 ` [PATCH 1/4] ASoC: Intel: sof_sdw: add quirk for new TigerLake-SDCA device Pierre-Louis Bossart
@ 2020-11-11 21:43 ` Pierre-Louis Bossart
  2020-11-11 21:43 ` [PATCH 3/4] ASoC: rt711: remove warnings Pierre-Louis Bossart
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Pierre-Louis Bossart @ 2020-11-11 21:43 UTC (permalink / raw
  To: alsa-devel
  Cc: tiwai, broonie, Pierre-Louis Bossart, Kai Vehmanen, Rander Wang

Pointer cast is not necessary, remove.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@linux.intel.com>
---
 sound/soc/codecs/rt1308-sdw.c | 2 +-
 sound/soc/codecs/rt5682-sdw.c | 2 +-
 sound/soc/codecs/rt700.c      | 2 +-
 sound/soc/codecs/rt711.c      | 2 +-
 sound/soc/codecs/rt715.c      | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/sound/soc/codecs/rt1308-sdw.c b/sound/soc/codecs/rt1308-sdw.c
index c2621b0afe6c..ec5564f780e8 100644
--- a/sound/soc/codecs/rt1308-sdw.c
+++ b/sound/soc/codecs/rt1308-sdw.c
@@ -475,7 +475,7 @@ static int rt1308_set_sdw_stream(struct snd_soc_dai *dai, void *sdw_stream,
 	if (!stream)
 		return -ENOMEM;
 
-	stream->sdw_stream = (struct sdw_stream_runtime *)sdw_stream;
+	stream->sdw_stream = sdw_stream;
 
 	/* Use tx_mask or rx_mask to configure stream tag and set dma_data */
 	if (direction == SNDRV_PCM_STREAM_PLAYBACK)
diff --git a/sound/soc/codecs/rt5682-sdw.c b/sound/soc/codecs/rt5682-sdw.c
index 58fb13132602..4d707e854875 100644
--- a/sound/soc/codecs/rt5682-sdw.c
+++ b/sound/soc/codecs/rt5682-sdw.c
@@ -103,7 +103,7 @@ static int rt5682_set_sdw_stream(struct snd_soc_dai *dai, void *sdw_stream,
 	if (!stream)
 		return -ENOMEM;
 
-	stream->sdw_stream = (struct sdw_stream_runtime *)sdw_stream;
+	stream->sdw_stream = sdw_stream;
 
 	/* Use tx_mask or rx_mask to configure stream tag and set dma_data */
 	if (direction == SNDRV_PCM_STREAM_PLAYBACK)
diff --git a/sound/soc/codecs/rt700.c b/sound/soc/codecs/rt700.c
index 687ac2153666..66ec395dbbcd 100644
--- a/sound/soc/codecs/rt700.c
+++ b/sound/soc/codecs/rt700.c
@@ -867,7 +867,7 @@ static int rt700_set_sdw_stream(struct snd_soc_dai *dai, void *sdw_stream,
 	if (!stream)
 		return -ENOMEM;
 
-	stream->sdw_stream = (struct sdw_stream_runtime *)sdw_stream;
+	stream->sdw_stream = sdw_stream;
 
 	/* Use tx_mask or rx_mask to configure stream tag and set dma_data */
 	if (direction == SNDRV_PCM_STREAM_PLAYBACK)
diff --git a/sound/soc/codecs/rt711.c b/sound/soc/codecs/rt711.c
index 65b59dbfb43c..5771c02c3459 100644
--- a/sound/soc/codecs/rt711.c
+++ b/sound/soc/codecs/rt711.c
@@ -913,7 +913,7 @@ static int rt711_set_sdw_stream(struct snd_soc_dai *dai, void *sdw_stream,
 	if (!stream)
 		return -ENOMEM;
 
-	stream->sdw_stream = (struct sdw_stream_runtime *)sdw_stream;
+	stream->sdw_stream = sdw_stream;
 
 	/* Use tx_mask or rx_mask to configure stream tag and set dma_data */
 	if (direction == SNDRV_PCM_STREAM_PLAYBACK)
diff --git a/sound/soc/codecs/rt715.c b/sound/soc/codecs/rt715.c
index 532c5303e7ab..9a7d393d424a 100644
--- a/sound/soc/codecs/rt715.c
+++ b/sound/soc/codecs/rt715.c
@@ -537,7 +537,7 @@ static int rt715_set_sdw_stream(struct snd_soc_dai *dai, void *sdw_stream,
 	if (!stream)
 		return -ENOMEM;
 
-	stream->sdw_stream = (struct sdw_stream_runtime *)sdw_stream;
+	stream->sdw_stream = sdw_stream;
 
 	/* Use tx_mask or rx_mask to configure stream tag and set dma_data */
 	if (direction == SNDRV_PCM_STREAM_PLAYBACK)
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/4] ASoC: rt711: remove warnings
  2020-11-11 21:43 [PATCH 0/4] ASoC: soundwire: SDCA device quirk and cleanups Pierre-Louis Bossart
  2020-11-11 21:43 ` [PATCH 1/4] ASoC: Intel: sof_sdw: add quirk for new TigerLake-SDCA device Pierre-Louis Bossart
  2020-11-11 21:43 ` [PATCH 2/4] ASoC: codecs: rt*.c: remove useless pointer cast Pierre-Louis Bossart
@ 2020-11-11 21:43 ` Pierre-Louis Bossart
  2020-11-11 21:43 ` [PATCH 4/4] ASoC: codecs: max98373-sdw: align regmap use with other codecs Pierre-Louis Bossart
  2020-11-12 19:38 ` [PATCH 0/4] ASoC: soundwire: SDCA device quirk and cleanups Mark Brown
  4 siblings, 0 replies; 6+ messages in thread
From: Pierre-Louis Bossart @ 2020-11-11 21:43 UTC (permalink / raw
  To: alsa-devel
  Cc: tiwai, broonie, Pierre-Louis Bossart, Kai Vehmanen, Rander Wang

cppcheck complains, use separate loop variable for sink and source ports

sound/soc/codecs/rt711-sdw.c:382:4: style: Variable 'i' is reassigned
a value before the old one has been used. [redundantAssignment]
 i = 0;
   ^
sound/soc/codecs/rt711-sdw.c:371:4: note: i is assigned
  i++;
   ^
sound/soc/codecs/rt711-sdw.c:382:4: note: i is overwritten
 i = 0;
   ^

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@linux.intel.com>
---
 sound/soc/codecs/rt711-sdw.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/sound/soc/codecs/rt711-sdw.c b/sound/soc/codecs/rt711-sdw.c
index f0a0691bd31c..fc7df79c3b91 100644
--- a/sound/soc/codecs/rt711-sdw.c
+++ b/sound/soc/codecs/rt711-sdw.c
@@ -338,7 +338,8 @@ static int rt711_update_status(struct sdw_slave *slave,
 static int rt711_read_prop(struct sdw_slave *slave)
 {
 	struct sdw_slave_prop *prop = &slave->prop;
-	int nval, i;
+	int nval;
+	int i, j;
 	u32 bit;
 	unsigned long addr;
 	struct sdw_dpn_prop *dpn;
@@ -379,15 +380,15 @@ static int rt711_read_prop(struct sdw_slave *slave)
 	if (!prop->sink_dpn_prop)
 		return -ENOMEM;
 
-	i = 0;
+	j = 0;
 	dpn = prop->sink_dpn_prop;
 	addr = prop->sink_ports;
 	for_each_set_bit(bit, &addr, 32) {
-		dpn[i].num = bit;
-		dpn[i].type = SDW_DPN_FULL;
-		dpn[i].simple_ch_prep_sm = true;
-		dpn[i].ch_prep_timeout = 10;
-		i++;
+		dpn[j].num = bit;
+		dpn[j].type = SDW_DPN_FULL;
+		dpn[j].simple_ch_prep_sm = true;
+		dpn[j].ch_prep_timeout = 10;
+		j++;
 	}
 
 	/* set the timeout values */
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 4/4] ASoC: codecs: max98373-sdw: align regmap use with other codecs
  2020-11-11 21:43 [PATCH 0/4] ASoC: soundwire: SDCA device quirk and cleanups Pierre-Louis Bossart
                   ` (2 preceding siblings ...)
  2020-11-11 21:43 ` [PATCH 3/4] ASoC: rt711: remove warnings Pierre-Louis Bossart
@ 2020-11-11 21:43 ` Pierre-Louis Bossart
  2020-11-12 19:38 ` [PATCH 0/4] ASoC: soundwire: SDCA device quirk and cleanups Mark Brown
  4 siblings, 0 replies; 6+ messages in thread
From: Pierre-Louis Bossart @ 2020-11-11 21:43 UTC (permalink / raw
  To: alsa-devel
  Cc: Kai Vehmanen, tiwai, Pierre-Louis Bossart, broonie, Bard Liao,
	Rander Wang

It's not clear why this driver has an additional call to
regmap_mark_dirty(), remove to align with others.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
---
 sound/soc/codecs/max98373-sdw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/max98373-sdw.c b/sound/soc/codecs/max98373-sdw.c
index fa589d834f9a..ec2e79c57357 100644
--- a/sound/soc/codecs/max98373-sdw.c
+++ b/sound/soc/codecs/max98373-sdw.c
@@ -247,7 +247,7 @@ static __maybe_unused int max98373_suspend(struct device *dev)
 	struct max98373_priv *max98373 = dev_get_drvdata(dev);
 
 	regcache_cache_only(max98373->regmap, true);
-	regcache_mark_dirty(max98373->regmap);
+
 	return 0;
 }
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/4] ASoC: soundwire: SDCA device quirk and cleanups
  2020-11-11 21:43 [PATCH 0/4] ASoC: soundwire: SDCA device quirk and cleanups Pierre-Louis Bossart
                   ` (3 preceding siblings ...)
  2020-11-11 21:43 ` [PATCH 4/4] ASoC: codecs: max98373-sdw: align regmap use with other codecs Pierre-Louis Bossart
@ 2020-11-12 19:38 ` Mark Brown
  4 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2020-11-12 19:38 UTC (permalink / raw
  To: alsa-devel, Pierre-Louis Bossart; +Cc: tiwai

On Wed, 11 Nov 2020 15:43:14 -0600, Pierre-Louis Bossart wrote:
> Add one quirk to handle new TigerLake-SDCA device and cleanup code.
> 
> Pierre-Louis Bossart (4):
>   ASoC: Intel: sof_sdw: add quirk for new TigerLake-SDCA device
>   ASoC: codecs: rt*.c: remove useless pointer cast
>   ASoC: rt711: remove warnings
>   ASoC: codecs: max98373-sdw: align regmap use with other codecs
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/4] ASoC: Intel: sof_sdw: add quirk for new TigerLake-SDCA device
      commit: 488cdbd8931fe4bc7f374a8b429e81d0e4b7ac76
[2/4] ASoC: codecs: rt*.c: remove useless pointer cast
      commit: 4a55000722d74e4ad1ea4700a423e21fab0d53ba
[3/4] ASoC: rt711: remove warnings
      commit: 17f6433192d858e49a40d1fa939bf61cc493a3b7
[4/4] ASoC: codecs: max98373-sdw: align regmap use with other codecs
      commit: f184892613dddcc12a1880c3b406314ec81498c7

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-11-12 19:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-11 21:43 [PATCH 0/4] ASoC: soundwire: SDCA device quirk and cleanups Pierre-Louis Bossart
2020-11-11 21:43 ` [PATCH 1/4] ASoC: Intel: sof_sdw: add quirk for new TigerLake-SDCA device Pierre-Louis Bossart
2020-11-11 21:43 ` [PATCH 2/4] ASoC: codecs: rt*.c: remove useless pointer cast Pierre-Louis Bossart
2020-11-11 21:43 ` [PATCH 3/4] ASoC: rt711: remove warnings Pierre-Louis Bossart
2020-11-11 21:43 ` [PATCH 4/4] ASoC: codecs: max98373-sdw: align regmap use with other codecs Pierre-Louis Bossart
2020-11-12 19:38 ` [PATCH 0/4] ASoC: soundwire: SDCA device quirk and cleanups Mark Brown

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.