All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH 0/3] Fixes for avs driver
  2023-01-13 19:03 [PATCH 0/3] Fixes for avs driver Amadeusz Sławiński
@ 2023-01-13 11:19 ` Cezary Rojewski
  2023-01-13 15:14 ` Mark Brown
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Cezary Rojewski @ 2023-01-13 11:19 UTC (permalink / raw)
  To: Amadeusz Sławiński, Mark Brown
  Cc: alsa-devel, Pierre-Louis Bossart, Takashi Iwai

On 2023-01-13 8:03 PM, Amadeusz Sławiński wrote:
> First patch fixes problems reported when performing shutdown. Second one
> is for a problem reported by LKP. Last one fixes problem reported by
> checkpatch.
> 
> Amadeusz Sławiński (3):
>    ASoC: Intel: avs: Implement PCI shutdown
>    ASoC: Intel: avs: Correctly access topology fiels
>    ASoC: Intel: avs: Use min_t instead of min with cast
> 
>   sound/soc/intel/avs/core.c     | 24 ++++++++++++++++++++++++
>   sound/soc/intel/avs/topology.c |  2 +-
>   sound/soc/intel/avs/trace.c    |  2 +-
>   3 files changed, 26 insertions(+), 2 deletions(-)
> 

Series has been reviewed by me internally before sending, so:

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>

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

* Re: [PATCH 0/3] Fixes for avs driver
  2023-01-13 19:03 [PATCH 0/3] Fixes for avs driver Amadeusz Sławiński
  2023-01-13 11:19 ` Cezary Rojewski
@ 2023-01-13 15:14 ` Mark Brown
  2023-01-13 19:03 ` [PATCH 1/3] ASoC: Intel: avs: Implement PCI shutdown Amadeusz Sławiński
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2023-01-13 15:14 UTC (permalink / raw)
  To: Amadeusz Sławiński
  Cc: Pierre-Louis Bossart, Cezary Rojewski, alsa-devel, Takashi Iwai

On Fri, 13 Jan 2023 20:03:07 +0100, Amadeusz Sławiński wrote:
> First patch fixes problems reported when performing shutdown. Second one
> is for a problem reported by LKP. Last one fixes problem reported by
> checkpatch.
> 
> Amadeusz Sławiński (3):
>   ASoC: Intel: avs: Implement PCI shutdown
>   ASoC: Intel: avs: Correctly access topology fiels
>   ASoC: Intel: avs: Use min_t instead of min with cast
> 
> [...]

Applied to

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

Thanks!

[1/3] ASoC: Intel: avs: Implement PCI shutdown
      commit: f89d783d68dcc6b2ce4fe3bda972ae0f84df0dca
[2/3] ASoC: Intel: avs: Correctly access topology fiels
      (no commit info)
[3/3] ASoC: Intel: avs: Use min_t instead of min with cast
      (no commit info)

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

* [PATCH 0/3] Fixes for avs driver
@ 2023-01-13 19:03 Amadeusz Sławiński
  2023-01-13 11:19 ` Cezary Rojewski
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Amadeusz Sławiński @ 2023-01-13 19:03 UTC (permalink / raw)
  To: Mark Brown
  Cc: Cezary Rojewski, alsa-devel, Takashi Iwai, Pierre-Louis Bossart,
	Amadeusz Sławiński

First patch fixes problems reported when performing shutdown. Second one
is for a problem reported by LKP. Last one fixes problem reported by
checkpatch.

Amadeusz Sławiński (3):
  ASoC: Intel: avs: Implement PCI shutdown
  ASoC: Intel: avs: Correctly access topology fiels
  ASoC: Intel: avs: Use min_t instead of min with cast

 sound/soc/intel/avs/core.c     | 24 ++++++++++++++++++++++++
 sound/soc/intel/avs/topology.c |  2 +-
 sound/soc/intel/avs/trace.c    |  2 +-
 3 files changed, 26 insertions(+), 2 deletions(-)

-- 
2.25.1


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

* [PATCH 1/3] ASoC: Intel: avs: Implement PCI shutdown
  2023-01-13 19:03 [PATCH 0/3] Fixes for avs driver Amadeusz Sławiński
  2023-01-13 11:19 ` Cezary Rojewski
  2023-01-13 15:14 ` Mark Brown
@ 2023-01-13 19:03 ` Amadeusz Sławiński
  2023-01-13 19:03 ` [PATCH 2/3] ASoC: Intel: avs: Correctly access topology fiels Amadeusz Sławiński
  2023-01-13 19:03 ` [PATCH 3/3] ASoC: Intel: avs: Use min_t instead of min with cast Amadeusz Sławiński
  4 siblings, 0 replies; 6+ messages in thread
From: Amadeusz Sławiński @ 2023-01-13 19:03 UTC (permalink / raw)
  To: Mark Brown
  Cc: Cezary Rojewski, Kornel Dulęba, alsa-devel, Takashi Iwai,
	Pierre-Louis Bossart, Amadeusz Sławiński

On shutdown reference to i915 driver needs to be released to not spam
logs with unnecessary warnings. While at it do some additional cleanup
to make sure DSP is powered down and interrupts from device are
disabled.

Fixes: 1affc44ea5dd ("ASoC: Intel: avs: PCI driver implementation")
Reported-by: Kornel Dulęba <korneld@google.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
---
 sound/soc/intel/avs/core.c | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/sound/soc/intel/avs/core.c b/sound/soc/intel/avs/core.c
index 2ca24273c491..637501850728 100644
--- a/sound/soc/intel/avs/core.c
+++ b/sound/soc/intel/avs/core.c
@@ -481,6 +481,29 @@ static int avs_pci_probe(struct pci_dev *pci, const struct pci_device_id *id)
 	return ret;
 }
 
+static void avs_pci_shutdown(struct pci_dev *pci)
+{
+	struct hdac_bus *bus = pci_get_drvdata(pci);
+	struct avs_dev *adev = hdac_to_avs(bus);
+
+	cancel_work_sync(&adev->probe_work);
+	avs_ipc_block(adev->ipc);
+
+	snd_hdac_stop_streams(bus);
+	avs_dsp_op(adev, int_control, false);
+	snd_hdac_ext_bus_ppcap_int_enable(bus, false);
+	snd_hdac_ext_bus_link_power_down_all(bus);
+
+	snd_hdac_bus_stop_chip(bus);
+	snd_hdac_display_power(bus, HDA_CODEC_IDX_CONTROLLER, false);
+
+	if (avs_platattr_test(adev, CLDMA))
+		pci_free_irq(pci, 0, &code_loader);
+	pci_free_irq(pci, 0, adev);
+	pci_free_irq(pci, 0, bus);
+	pci_free_irq_vectors(pci);
+}
+
 static void avs_pci_remove(struct pci_dev *pci)
 {
 	struct hdac_device *hdev, *save;
@@ -739,6 +762,7 @@ static struct pci_driver avs_pci_driver = {
 	.id_table = avs_ids,
 	.probe = avs_pci_probe,
 	.remove = avs_pci_remove,
+	.shutdown = avs_pci_shutdown,
 	.driver = {
 		.pm = &avs_dev_pm,
 	},
-- 
2.25.1


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

* [PATCH 2/3] ASoC: Intel: avs: Correctly access topology fiels
  2023-01-13 19:03 [PATCH 0/3] Fixes for avs driver Amadeusz Sławiński
                   ` (2 preceding siblings ...)
  2023-01-13 19:03 ` [PATCH 1/3] ASoC: Intel: avs: Implement PCI shutdown Amadeusz Sławiński
@ 2023-01-13 19:03 ` Amadeusz Sławiński
  2023-01-13 19:03 ` [PATCH 3/3] ASoC: Intel: avs: Use min_t instead of min with cast Amadeusz Sławiński
  4 siblings, 0 replies; 6+ messages in thread
From: Amadeusz Sławiński @ 2023-01-13 19:03 UTC (permalink / raw)
  To: Mark Brown
  Cc: Cezary Rojewski, kernel test robot, alsa-devel, Takashi Iwai,
	Pierre-Louis Bossart, Amadeusz Sławiński

Fixes following warning:
sound/soc/intel/avs/topology.c:1636:20: sparse: sparse: restricted __le32 degrades to integer

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
---
 sound/soc/intel/avs/topology.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/intel/avs/topology.c b/sound/soc/intel/avs/topology.c
index 5fee7a8ec06a..cdb4ec500261 100644
--- a/sound/soc/intel/avs/topology.c
+++ b/sound/soc/intel/avs/topology.c
@@ -1633,7 +1633,7 @@ avs_control_load(struct snd_soc_component *comp, int index, struct snd_kcontrol_
 	size_t block_size;
 	int ret;
 
-	switch (hdr->type) {
+	switch (le32_to_cpu(hdr->type)) {
 	case SND_SOC_TPLG_TYPE_MIXER:
 		tmc = container_of(hdr, typeof(*tmc), hdr);
 		tuples = tmc->priv.array;
-- 
2.25.1


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

* [PATCH 3/3] ASoC: Intel: avs: Use min_t instead of min with cast
  2023-01-13 19:03 [PATCH 0/3] Fixes for avs driver Amadeusz Sławiński
                   ` (3 preceding siblings ...)
  2023-01-13 19:03 ` [PATCH 2/3] ASoC: Intel: avs: Correctly access topology fiels Amadeusz Sławiński
@ 2023-01-13 19:03 ` Amadeusz Sławiński
  4 siblings, 0 replies; 6+ messages in thread
From: Amadeusz Sławiński @ 2023-01-13 19:03 UTC (permalink / raw)
  To: Mark Brown
  Cc: Cezary Rojewski, alsa-devel, Takashi Iwai, Pierre-Louis Bossart,
	Amadeusz Sławiński

Checkpatch script recommends using min_t instead of min with the cast.

Fixes: 69b23b3937a1 ("ASoC: Intel: avs: Event tracing")
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
---
 sound/soc/intel/avs/trace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/intel/avs/trace.c b/sound/soc/intel/avs/trace.c
index fcb7cfc823d6..c63eea909b5e 100644
--- a/sound/soc/intel/avs/trace.c
+++ b/sound/soc/intel/avs/trace.c
@@ -24,7 +24,7 @@ void trace_avs_msg_payload(const void *data, size_t size)
 	while (remaining > 0) {
 		u32 chunk;
 
-		chunk = min(remaining, (size_t)MAX_CHUNK_SIZE);
+		chunk = min_t(size_t, remaining, MAX_CHUNK_SIZE);
 		trace_avs_ipc_msg_payload(data, chunk, offset, size);
 
 		remaining -= chunk;
-- 
2.25.1


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

end of thread, other threads:[~2023-01-13 15:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-13 19:03 [PATCH 0/3] Fixes for avs driver Amadeusz Sławiński
2023-01-13 11:19 ` Cezary Rojewski
2023-01-13 15:14 ` Mark Brown
2023-01-13 19:03 ` [PATCH 1/3] ASoC: Intel: avs: Implement PCI shutdown Amadeusz Sławiński
2023-01-13 19:03 ` [PATCH 2/3] ASoC: Intel: avs: Correctly access topology fiels Amadeusz Sławiński
2023-01-13 19:03 ` [PATCH 3/3] ASoC: Intel: avs: Use min_t instead of min with cast Amadeusz Sławiński

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.