All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai-l3A5Bk7waGM@public.gmane.org>
To: alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org
Cc: Lee Jones <lee-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Pierre-Louis Bossart
	<pierre-louis.bossart-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
	Jaikrishna Nemallapudi
	<jaikrishnax.nemallapudi-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	"Subhransu S . Prusty"
	<subhransu.s.prusty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: [PATCH 2/7] ALSA: mips: Deliver indirect-PCM transfer error
Date: Sun, 21 May 2017 21:02:53 +0200	[thread overview]
Message-ID: <20170521190258.1178-3-tiwai@suse.de> (raw)
In-Reply-To: <20170521190258.1178-1-tiwai-l3A5Bk7waGM@public.gmane.org>

Now that the indirect-PCM transfer helper gives back an error, we
should return the error from ack callbacks.

Signed-off-by: Takashi Iwai <tiwai-l3A5Bk7waGM@public.gmane.org>
---
 sound/mips/hal2.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/sound/mips/hal2.c b/sound/mips/hal2.c
index 00fc9241d266..684dc4ddef41 100644
--- a/sound/mips/hal2.c
+++ b/sound/mips/hal2.c
@@ -616,10 +616,9 @@ static int hal2_playback_ack(struct snd_pcm_substream *substream)
 	struct hal2_codec *dac = &hal2->dac;
 
 	dac->pcm_indirect.hw_queue_size = H2_BUF_SIZE / 2;
-	snd_pcm_indirect_playback_transfer(substream,
-					   &dac->pcm_indirect,
-					   hal2_playback_transfer);
-	return 0;
+	return snd_pcm_indirect_playback_transfer(substream,
+						  &dac->pcm_indirect,
+						  hal2_playback_transfer);
 }
 
 static int hal2_capture_open(struct snd_pcm_substream *substream)
@@ -707,10 +706,9 @@ static int hal2_capture_ack(struct snd_pcm_substream *substream)
 	struct snd_hal2 *hal2 = snd_pcm_substream_chip(substream);
 	struct hal2_codec *adc = &hal2->adc;
 
-	snd_pcm_indirect_capture_transfer(substream,
-					  &adc->pcm_indirect,
-					  hal2_capture_transfer);
-	return 0;
+	return snd_pcm_indirect_capture_transfer(substream,
+						 &adc->pcm_indirect,
+						 hal2_capture_transfer);
 }
 
 static struct snd_pcm_ops hal2_playback_ops = {
-- 
2.13.0

WARNING: multiple messages have this Message-ID (diff)
From: tiwai@suse.de (Takashi Iwai)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/7] ALSA: mips: Deliver indirect-PCM transfer error
Date: Sun, 21 May 2017 21:02:53 +0200	[thread overview]
Message-ID: <20170521190258.1178-3-tiwai@suse.de> (raw)
In-Reply-To: <20170521190258.1178-1-tiwai@suse.de>

Now that the indirect-PCM transfer helper gives back an error, we
should return the error from ack callbacks.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/mips/hal2.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/sound/mips/hal2.c b/sound/mips/hal2.c
index 00fc9241d266..684dc4ddef41 100644
--- a/sound/mips/hal2.c
+++ b/sound/mips/hal2.c
@@ -616,10 +616,9 @@ static int hal2_playback_ack(struct snd_pcm_substream *substream)
 	struct hal2_codec *dac = &hal2->dac;
 
 	dac->pcm_indirect.hw_queue_size = H2_BUF_SIZE / 2;
-	snd_pcm_indirect_playback_transfer(substream,
-					   &dac->pcm_indirect,
-					   hal2_playback_transfer);
-	return 0;
+	return snd_pcm_indirect_playback_transfer(substream,
+						  &dac->pcm_indirect,
+						  hal2_playback_transfer);
 }
 
 static int hal2_capture_open(struct snd_pcm_substream *substream)
@@ -707,10 +706,9 @@ static int hal2_capture_ack(struct snd_pcm_substream *substream)
 	struct snd_hal2 *hal2 = snd_pcm_substream_chip(substream);
 	struct hal2_codec *adc = &hal2->adc;
 
-	snd_pcm_indirect_capture_transfer(substream,
-					  &adc->pcm_indirect,
-					  hal2_capture_transfer);
-	return 0;
+	return snd_pcm_indirect_capture_transfer(substream,
+						 &adc->pcm_indirect,
+						 hal2_capture_transfer);
 }
 
 static struct snd_pcm_ops hal2_playback_ops = {
-- 
2.13.0

  parent reply	other threads:[~2017-05-21 19:02 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-21 19:02 [PATCH 0/7] ALSA: Fix/improve PCM ack callback Takashi Iwai
2017-05-21 19:02 ` Takashi Iwai
2017-05-21 19:02 ` [PATCH 1/7] ALSA: pcm: Fix negative appl_ptr handling in pcm-indirect helpers Takashi Iwai
2017-05-21 19:02   ` Takashi Iwai
     [not found] ` <20170521190258.1178-1-tiwai-l3A5Bk7waGM@public.gmane.org>
2017-05-21 19:02   ` Takashi Iwai [this message]
2017-05-21 19:02     ` [PATCH 2/7] ALSA: mips: Deliver indirect-PCM transfer error Takashi Iwai
2017-05-21 19:02 ` [PATCH 3/7] ALSA: cs46xx: " Takashi Iwai
2017-05-21 19:02   ` Takashi Iwai
2017-05-21 19:02 ` [PATCH 4/7] ALSA: emu10k1: " Takashi Iwai
2017-05-21 19:02   ` Takashi Iwai
2017-05-21 19:02 ` [PATCH 5/7] ALSA: rme32: " Takashi Iwai
2017-05-21 19:02   ` Takashi Iwai
2017-05-21 19:02 ` [PATCH 6/7] staging: bcm2835-audio: " Takashi Iwai
2017-05-21 19:02   ` Takashi Iwai
2017-05-22 16:33   ` Eric Anholt
2017-05-22 16:33     ` Eric Anholt
2017-05-21 19:02 ` [PATCH 7/7] ALSA: pcm: Call ack() whenever appl_ptr is updated Takashi Iwai
2017-05-21 19:02   ` Takashi Iwai
2017-05-22  3:49 ` [PATCH 0/7] ALSA: Fix/improve PCM ack callback Takashi Sakamoto
2017-05-22  3:49   ` Takashi Sakamoto
2017-05-22  5:27   ` Takashi Iwai
2017-05-22  5:27     ` Takashi Iwai
2017-05-22  6:31     ` Takashi Sakamoto
2017-05-22  6:31       ` Takashi Sakamoto
2017-05-22  6:46       ` Takashi Iwai
2017-05-22  6:46         ` Takashi Iwai
2017-05-22  7:07         ` Takashi Iwai
2017-05-22  7:07           ` Takashi Iwai
2017-05-25 21:39 ` Takashi Iwai

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=20170521190258.1178-3-tiwai@suse.de \
    --to=tiwai-l3a5bk7wagm@public.gmane.org \
    --cc=alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org \
    --cc=jaikrishnax.nemallapudi-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=lee-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=pierre-louis.bossart-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
    --cc=subhransu.s.prusty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    /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 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.