All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: snd-usb: properly initialize the sync endpoint
@ 2012-11-22 19:27 Daniel Mack
  2012-11-22 20:23 ` Takashi Iwai
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Mack @ 2012-11-22 19:27 UTC (permalink / raw)
  To: alsa-devel; +Cc: tiwai, stable, "[3.5+]", jeff_barish, Daniel Mack

Jeffrey Barish reported an obvious bug in the pcm part of the usb-audio
driver which causes the code to not initialize the sync endpoint from
configure_endpoint().

Reported-by: Jeffrey Barish <jeff_barish@earthlink.net>
Signed-off-by: Daniel Mack <zonque@gmail.com>
Cc: stable@kernel.org [3.5+]
---
 sound/usb/pcm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c
index bc3c9ac..e919c2e 100644
--- a/sound/usb/pcm.c
+++ b/sound/usb/pcm.c
@@ -458,7 +458,7 @@ static int configure_endpoint(struct snd_usb_substream *subs)
 		return ret;
 
 	if (subs->sync_endpoint)
-		ret = snd_usb_endpoint_set_params(subs->data_endpoint,
+		ret = snd_usb_endpoint_set_params(subs->sync_endpoint,
 						  subs->pcm_format,
 						  subs->channels,
 						  subs->period_bytes,
-- 
1.7.11.7

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

* Re: [PATCH] ALSA: snd-usb: properly initialize the sync endpoint
  2012-11-22 19:27 [PATCH] ALSA: snd-usb: properly initialize the sync endpoint Daniel Mack
@ 2012-11-22 20:23 ` Takashi Iwai
  2012-11-28 16:02   ` Eldad Zack
  0 siblings, 1 reply; 4+ messages in thread
From: Takashi Iwai @ 2012-11-22 20:23 UTC (permalink / raw)
  To: Daniel Mack; +Cc: "[3.5+]", alsa-devel, jeff_barish, stable

At Thu, 22 Nov 2012 20:27:59 +0100,
Daniel Mack wrote:
> 
> Jeffrey Barish reported an obvious bug in the pcm part of the usb-audio
> driver which causes the code to not initialize the sync endpoint from
> configure_endpoint().
> 
> Reported-by: Jeffrey Barish <jeff_barish@earthlink.net>
> Signed-off-by: Daniel Mack <zonque@gmail.com>
> Cc: stable@kernel.org [3.5+]

Thanks, applied.


Takashi

> ---
>  sound/usb/pcm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c
> index bc3c9ac..e919c2e 100644
> --- a/sound/usb/pcm.c
> +++ b/sound/usb/pcm.c
> @@ -458,7 +458,7 @@ static int configure_endpoint(struct snd_usb_substream *subs)
>  		return ret;
>  
>  	if (subs->sync_endpoint)
> -		ret = snd_usb_endpoint_set_params(subs->data_endpoint,
> +		ret = snd_usb_endpoint_set_params(subs->sync_endpoint,
>  						  subs->pcm_format,
>  						  subs->channels,
>  						  subs->period_bytes,
> -- 
> 1.7.11.7
> 

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

* Re: [PATCH] ALSA: snd-usb: properly initialize the sync endpoint
  2012-11-22 20:23 ` Takashi Iwai
@ 2012-11-28 16:02   ` Eldad Zack
  2012-11-28 21:17     ` Eldad Zack
  0 siblings, 1 reply; 4+ messages in thread
From: Eldad Zack @ 2012-11-28 16:02 UTC (permalink / raw)
  To: Takashi Iwai, Daniel Mack; +Cc: alsa-devel


Hi Daniel, Takashi,

On Thu, 22 Nov 2012, Takashi Iwai wrote:

> At Thu, 22 Nov 2012 20:27:59 +0100,
> Daniel Mack wrote:
> > 
> > Jeffrey Barish reported an obvious bug in the pcm part of the usb-audio
> > driver which causes the code to not initialize the sync endpoint from
> > configure_endpoint().
> > 
> > Reported-by: Jeffrey Barish <jeff_barish at earthlink.net>
> > Signed-off-by: Daniel Mack <zonque at gmail.com>
> > Cc: stable at kernel.org [3.5+]
> 
> Thanks, applied.

This breaks the pcm init for the FT C400 - the reason is once 
again the mismatch between sync and data in terms of channels and period
bytes.
I didn't notice it, since I was always opening capture and playback at 
the same time.

After reverting it works as expected (for capture + playback) - however, 
the revert is not a fix:
If I open only the playback stream from userspace (using jack with -P),
it will error out and then it will refuse to open pcm even for capture.
But if I first open the device for capture (using jackd with -C), stop 
it, then open just the playback, it works. Not surprising, since the sync
ep was already set up.

Any suggestions on how to initialize the sync ep with its specific
channel and period bytes paramaters?

Cheers,
Eldad

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

* Re: [PATCH] ALSA: snd-usb: properly initialize the sync endpoint
  2012-11-28 16:02   ` Eldad Zack
@ 2012-11-28 21:17     ` Eldad Zack
  0 siblings, 0 replies; 4+ messages in thread
From: Eldad Zack @ 2012-11-28 21:17 UTC (permalink / raw)
  To: Takashi Iwai, Daniel Mack; +Cc: alsa-devel


On Wed, 28 Nov 2012, Eldad Zack wrote:
> On Thu, 22 Nov 2012, Takashi Iwai wrote:
> > At Thu, 22 Nov 2012 20:27:59 +0100,
> > Daniel Mack wrote:
> > > 
> > > Jeffrey Barish reported an obvious bug in the pcm part of the usb-audio
> > > driver which causes the code to not initialize the sync endpoint from
> > > configure_endpoint().
> > > 
> > > Reported-by: Jeffrey Barish <jeff_barish at earthlink.net>
> > > Signed-off-by: Daniel Mack <zonque at gmail.com>
> > > Cc: stable at kernel.org [3.5+]
> > 
> > Thanks, applied.
> 
> This breaks the pcm init for the FT C400 - the reason is once 
> again the mismatch between sync and data in terms of channels and period
> bytes.
> I didn't notice it, since I was always opening capture and playback at 
> the same time.
> 
> After reverting it works as expected (for capture + playback) - however, 
> the revert is not a fix:
> If I open only the playback stream from userspace (using jack with -P),
> it will error out and then it will refuse to open pcm even for capture.
> But if I first open the device for capture (using jackd with -C), stop 
> it, then open just the playback, it works. Not surprising, since the sync
> ep was already set up.
> 
> Any suggestions on how to initialize the sync ep with its specific
> channel and period bytes paramaters?

Update: I found a solution for this - I'll post it with the C400 v4 
(today or tomorrow).

Cheers,
Eldad

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

end of thread, other threads:[~2012-11-28 21:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-22 19:27 [PATCH] ALSA: snd-usb: properly initialize the sync endpoint Daniel Mack
2012-11-22 20:23 ` Takashi Iwai
2012-11-28 16:02   ` Eldad Zack
2012-11-28 21:17     ` Eldad Zack

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.