All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jaroslav Kysela <perex@perex.cz>
To: ALSA development <alsa-devel@alsa-project.org>
Cc: Takashi Iwai <tiwai@suse.de>, Craig McLure <craig@mclure.net>
Subject: Re: [PATCH] ALSA: usb-audio: Configure sync endpoints before data
Date: Tue, 24 May 2022 08:38:18 +0200	[thread overview]
Message-ID: <34911ddf-62c5-b692-0237-a6d44b1fe7a3@perex.cz> (raw)
In-Reply-To: <20220524062115.25968-1-tiwai@suse.de>

On 24. 05. 22 8:21, Takashi Iwai wrote:
> From: Craig McLure <craig@mclure.net>
> 
> Devices such as the TC-Helicon GoXLR require the sync endpoint to be
> configured in advance of the data endpoint in order for sound output
> to work.
> 
> This patch simply changes the ordering of EP configuration to resolve
> this.
> 
> Fixes: bf6313a0ff76 ("ALSA: usb-audio: Refactor endpoint management")
> BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=215079
> Signed-off-by: Craig McLure <craig@mclure.net>
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Takashi Iwai <tiwai@suse.de>

Reviewed-by: Jaroslav Kysela <perex@perex.cz>

> ---
>   sound/usb/pcm.c | 17 +++++++++++------
>   1 file changed, 11 insertions(+), 6 deletions(-)
> 
> diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c
> index 6d699065e81a..b470404a5376 100644
> --- a/sound/usb/pcm.c
> +++ b/sound/usb/pcm.c
> @@ -439,16 +439,21 @@ static int configure_endpoints(struct snd_usb_audio *chip,
>   		/* stop any running stream beforehand */
>   		if (stop_endpoints(subs, false))
>   			sync_pending_stops(subs);
> +		if (subs->sync_endpoint) {
> +			err = snd_usb_endpoint_configure(chip, subs->sync_endpoint);
> +			if (err < 0)
> +				return err;
> +		}
>   		err = snd_usb_endpoint_configure(chip, subs->data_endpoint);
>   		if (err < 0)
>   			return err;
>   		snd_usb_set_format_quirk(subs, subs->cur_audiofmt);
> -	}
> -
> -	if (subs->sync_endpoint) {
> -		err = snd_usb_endpoint_configure(chip, subs->sync_endpoint);
> -		if (err < 0)
> -			return err;
> +	} else {
> +		if (subs->sync_endpoint) {
> +			err = snd_usb_endpoint_configure(chip, subs->sync_endpoint);
> +			if (err < 0)
> +				return err;
> +		}
>   	}
>   
>   	return 0;


-- 
Jaroslav Kysela <perex@perex.cz>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.

      reply	other threads:[~2022-05-24  6:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-24  6:21 [PATCH] ALSA: usb-audio: Configure sync endpoints before data Takashi Iwai
2022-05-24  6:38 ` Jaroslav Kysela [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=34911ddf-62c5-b692-0237-a6d44b1fe7a3@perex.cz \
    --to=perex@perex.cz \
    --cc=alsa-devel@alsa-project.org \
    --cc=craig@mclure.net \
    --cc=tiwai@suse.de \
    /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.