Linux bluetooth development
 help / color / mirror / Atom feed
From: Szymon Janc <szymon.janc@gmail.com>
To: Andrzej Kaczmarek <andrzej.kaczmarek@tieto.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] android/a2dp: Fix audio resume on started stream
Date: Fri, 24 Jan 2014 23:00:51 +0100	[thread overview]
Message-ID: <2586637.blSzzQcaJy@athlon> (raw)
In-Reply-To: <1390496392-22826-1-git-send-email-andrzej.kaczmarek@tieto.com>

Hi Andrzej,

On Thursday 23 January 2014 17:59:52 Andrzej Kaczmarek wrote:
> In case stream is started from remote we'll receive Resume Stream IPC
> when audio is already considered as started (i.e. on first write from
> AudioFlinger). In such case we should not try to send AVDTP_START since
> this will fail but just reply success over IPC instead.
> ---
>  android/a2dp.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/android/a2dp.c b/android/a2dp.c
> index 572e0d1..10e43b1 100644
> --- a/android/a2dp.c
> +++ b/android/a2dp.c
> @@ -1376,10 +1376,12 @@ static void bt_stream_resume(const void *buf,
> uint16_t len) goto failed;
>  	}
> 
> -	err = avdtp_start(setup->dev->session, setup->stream);
> -	if (err < 0) {
> -		error("avdtp_start: %s", strerror(-err));
> -		goto failed;
> +	if (setup->state != HAL_AUDIO_STARTED) {
> +		err = avdtp_start(setup->dev->session, setup->stream);
> +		if (err < 0) {
> +			error("avdtp_start: %s", strerror(-err));
> +			goto failed;
> +		}
>  	}
> 
>  	audio_ipc_send_rsp(AUDIO_OP_RESUME_STREAM, AUDIO_STATUS_SUCCESS);

Applied, thanks.

-- 
Szymon K. Janc
szymon.janc@gmail.com

      reply	other threads:[~2014-01-24 22:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-23 16:59 [PATCH] android/a2dp: Fix audio resume on started stream Andrzej Kaczmarek
2014-01-24 22:00 ` Szymon Janc [this message]

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=2586637.blSzzQcaJy@athlon \
    --to=szymon.janc@gmail.com \
    --cc=andrzej.kaczmarek@tieto.com \
    --cc=linux-bluetooth@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox