All of lore.kernel.org
 help / color / mirror / Atom feed
* pcm_multi poll timeout error
@ 2005-12-08 19:13 John Rigg
  2005-12-09 11:40 ` Takashi Iwai
  0 siblings, 1 reply; 12+ messages in thread
From: John Rigg @ 2005-12-08 19:13 UTC (permalink / raw)
  To: alsa-devel

On Sat, Dec 03, 2005 at 03:23:18PM +0000, John Rigg wrote:
> The pcm_multi plugin doesn't work currently with jackd in duplex mode. 
> It's OK for either capture or playback with multi cards, but a poll time out
> occurs in duplex mode. Several users have experienced this problem with
> multiple ice1712 and RME cards.
> After some testing I found the following:
> 
> alsa-lib-1.0.8 works
> alsa-lib-1.0.9rc1 onwards gives poll time out

I got my two Delta 1010s working with jackd and pcm_multi in duplex mode by
removing three functions that were added in pcm_multi.c rev 1.89:
snd_pcm_multi_link_fd_failed()
snd_pcm_multi_link_fd()
snd_pcm_multi_unlink()
along with two associated members of snd_pcm_multi_fast_ops structure:
.link_fd = snd_pcm_multi_link_fd
.unlink = snd_pcm_multi_unlink

I then started trying to debug the code causing the problem. Adding extra
printf's showed that none of the extra functions executed unless jackd was
started with both -C and -P devices (ie. duplex), and then only
snd_pcm_multi_link_fd(). This executed twice (once for capture and once for
playback presumably). Neither of the two other new functions was used when the
poll time out occurred.

Unfortunately I'm now getting a little out of my depth. I've been studying the
docs and the source code, but the source is a little sparse on comments and
hard to follow for someone of my limited programming experience.
Does anyone have any pointers for a dumb sound engineer/musician trying to
understand what this extra linking code in pcm_multi.c is supposed to be doing?

John


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click

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

* Re: pcm_multi poll timeout error
  2005-12-08 19:13 pcm_multi poll timeout error John Rigg
@ 2005-12-09 11:40 ` Takashi Iwai
  2005-12-09 17:16   ` John Rigg
  0 siblings, 1 reply; 12+ messages in thread
From: Takashi Iwai @ 2005-12-09 11:40 UTC (permalink / raw)
  To: John Rigg; +Cc: alsa-devel

At Thu, 08 Dec 2005 19:13:40 +0000,
John Rigg wrote:
> 
> On Sat, Dec 03, 2005 at 03:23:18PM +0000, John Rigg wrote:
> > The pcm_multi plugin doesn't work currently with jackd in duplex mode. 
> > It's OK for either capture or playback with multi cards, but a poll time out
> > occurs in duplex mode. Several users have experienced this problem with
> > multiple ice1712 and RME cards.
> > After some testing I found the following:
> > 
> > alsa-lib-1.0.8 works
> > alsa-lib-1.0.9rc1 onwards gives poll time out
> 
> I got my two Delta 1010s working with jackd and pcm_multi in duplex mode by
> removing three functions that were added in pcm_multi.c rev 1.89:
> snd_pcm_multi_link_fd_failed()
> snd_pcm_multi_link_fd()
> snd_pcm_multi_unlink()
> along with two associated members of snd_pcm_multi_fast_ops structure:
> .link_fd = snd_pcm_multi_link_fd
> .unlink = snd_pcm_multi_unlink
> 
> I then started trying to debug the code causing the problem. Adding extra
> printf's showed that none of the extra functions executed unless jackd was
> started with both -C and -P devices (ie. duplex), and then only
> snd_pcm_multi_link_fd(). This executed twice (once for capture and once for
> playback presumably). Neither of the two other new functions was used when the
> poll time out occurred.
> 
> Unfortunately I'm now getting a little out of my depth. I've been studying the
> docs and the source code, but the source is a little sparse on comments and
> hard to follow for someone of my limited programming experience.
> Does anyone have any pointers for a dumb sound engineer/musician trying to
> understand what this extra linking code in pcm_multi.c is supposed to be doing?

The link_fd returns the file descriptor for linking multiple PCM
streams.  If you comment it out, it means that no link is possible.
It means that snd_pcm_link() didn't do anything in fact after your
patch.

The recent version of multi plugin returns only one pollfd of the
master, and this seems breaking the stuff in JACK.  And, I think
checking only the master is a bad solution.


Takashi


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click

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

* Re: pcm_multi poll timeout error
  2005-12-09 11:40 ` Takashi Iwai
@ 2005-12-09 17:16   ` John Rigg
  2005-12-09 17:55     ` Jeremy Hall
  0 siblings, 1 reply; 12+ messages in thread
From: John Rigg @ 2005-12-09 17:16 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

On Fri, Dec 09, 2005 at 12:40:05PM +0100, Takashi Iwai wrote:
> The link_fd returns the file descriptor for linking multiple PCM
> streams.  If you comment it out, it means that no link is possible.
> It means that snd_pcm_link() didn't do anything in fact after your
> patch.

Hi Takashi

Thanks for the information. Now I'm puzzled. I assumed that pcm_multi
was working from the messages from jackd -v, but didn't actually try
recording and playing back simultaneously (haven't got that far setting
up my system). However, I just received the following info from another
user who tried my makeshift patch:

>> On Fri, Dec 09, 2005 at 02:10:49PM +0100, Achim_Kuntz wrote:
>> 
>>>I can confirm your results with my 2 x hdsp 9652 setup.
>>>With your patch applied jackd works in duplex mode using the multi device.
.... 
>> Can you actually record and play back simultaneously?
....
>Yes, I can record and play back simultaneously with the patch applied.
>I tested playback for all 2*24=48 channels of the multi device while 
>recording audio from the first channel of the first hdsp card, i.e. I 
>tested all playback channels but not all recording channels. Everything 
>seemed to work as intended.

I can't understand why this works after my patch broke snd_pcm_link .

John


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click

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

* Re: pcm_multi poll timeout error
  2005-12-09 17:16   ` John Rigg
@ 2005-12-09 17:55     ` Jeremy Hall
  2005-12-09 20:15       ` John Rigg
  0 siblings, 1 reply; 12+ messages in thread
From: Jeremy Hall @ 2005-12-09 17:55 UTC (permalink / raw)
  To: John Rigg; +Cc: Takashi Iwai, alsa-devel

It probably works because the rme cards are synced by an external means 
such as word clock or the entity they are connected to has master sync

_J

In the new year, John Rigg wrote:
> On Fri, Dec 09, 2005 at 12:40:05PM +0100, Takashi Iwai wrote:
> > The link_fd returns the file descriptor for linking multiple PCM
> > streams.  If you comment it out, it means that no link is possible.
> > It means that snd_pcm_link() didn't do anything in fact after your
> > patch.
> 
> Hi Takashi
> 
> Thanks for the information. Now I'm puzzled. I assumed that pcm_multi
> was working from the messages from jackd -v, but didn't actually try
> recording and playing back simultaneously (haven't got that far setting
> up my system). However, I just received the following info from another
> user who tried my makeshift patch:
> 
> >> On Fri, Dec 09, 2005 at 02:10:49PM +0100, Achim_Kuntz wrote:
> >> 
> >>>I can confirm your results with my 2 x hdsp 9652 setup.
> >>>With your patch applied jackd works in duplex mode using the multi device.
> .... 
> >> Can you actually record and play back simultaneously?
> ....
> >Yes, I can record and play back simultaneously with the patch applied.
> >I tested playback for all 2*24=48 channels of the multi device while 
> >recording audio from the first channel of the first hdsp card, i.e. I 
> >tested all playback channels but not all recording channels. Everything 
> >seemed to work as intended.
> 
> I can't understand why this works after my patch broke snd_pcm_link .
> 
> John
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/alsa-devel
> 



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click

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

* Re: pcm_multi poll timeout error
  2005-12-09 17:55     ` Jeremy Hall
@ 2005-12-09 20:15       ` John Rigg
  2005-12-12 11:31         ` Takashi Iwai
  0 siblings, 1 reply; 12+ messages in thread
From: John Rigg @ 2005-12-09 20:15 UTC (permalink / raw)
  To: Jeremy Hall; +Cc: Takashi Iwai, alsa-devel

On Fri, Dec 09, 2005 at 12:55:27PM -0500, Jeremy Hall wrote:
> In the new year, John Rigg wrote:
> > On Fri, Dec 09, 2005 at 12:40:05PM +0100, Takashi Iwai wrote:
> > > The link_fd returns the file descriptor for linking multiple PCM
> > > streams.  If you comment it out, it means that no link is possible.
> > > It means that snd_pcm_link() didn't do anything in fact after your
> > > patch.
> > 
> > I can't understand why this works after my patch broke snd_pcm_link .
>
> It probably works because the rme cards are synced by an external means 
> such as word clock or the entity they are connected to has master sync

Makes sense. So, the situation appears to be:
1 - The link code is unnecessary for duplex operation of multiple
clock-synchronised sound cards with jackd.
2 - It breaks the above when present.

John


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click

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

* Re: pcm_multi poll timeout error
  2005-12-09 20:15       ` John Rigg
@ 2005-12-12 11:31         ` Takashi Iwai
  2006-08-01  2:04           ` Lee Revell
  0 siblings, 1 reply; 12+ messages in thread
From: Takashi Iwai @ 2005-12-12 11:31 UTC (permalink / raw)
  To: John Rigg; +Cc: Jeremy Hall, alsa-devel

At Fri, 9 Dec 2005 20:15:02 +0000,
John Rigg wrote:
> 
> On Fri, Dec 09, 2005 at 12:55:27PM -0500, Jeremy Hall wrote:
> > In the new year, John Rigg wrote:
> > > On Fri, Dec 09, 2005 at 12:40:05PM +0100, Takashi Iwai wrote:
> > > > The link_fd returns the file descriptor for linking multiple PCM
> > > > streams.  If you comment it out, it means that no link is possible.
> > > > It means that snd_pcm_link() didn't do anything in fact after your
> > > > patch.
> > > 
> > > I can't understand why this works after my patch broke snd_pcm_link .
> >
> > It probably works because the rme cards are synced by an external means 
> > such as word clock or the entity they are connected to has master sync
> 
> Makes sense. So, the situation appears to be:
> 1 - The link code is unnecessary for duplex operation of multiple
> clock-synchronised sound cards with jackd.
> 2 - It breaks the above when present.

Hm, the question is what the cable-sync really does.  Basically the
linked PCM streams in ALSA are just for trigger actions,
i.e. start/stop streams.  The others are not really related.

However, the recent changes of multi pcm tries to use only one pollfd
as a master, and this seems broken in your case.  Or, it's really the
matter of linked streams.

Will come back to this issue later...


Takashi


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click

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

* Re: pcm_multi poll timeout error
  2005-12-12 11:31         ` Takashi Iwai
@ 2006-08-01  2:04           ` Lee Revell
  2006-08-01 10:43             ` Takashi Iwai
  0 siblings, 1 reply; 12+ messages in thread
From: Lee Revell @ 2006-08-01  2:04 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: John Rigg, alsa-devel, Paul Davis, Jeremy Hall

On Mon, 2005-12-12 at 12:31 +0100, Takashi Iwai wrote:
> At Fri, 9 Dec 2005 20:15:02 +0000,
> John Rigg wrote:
> > 
> > On Fri, Dec 09, 2005 at 12:55:27PM -0500, Jeremy Hall wrote:
> > > In the new year, John Rigg wrote:
> > > > On Fri, Dec 09, 2005 at 12:40:05PM +0100, Takashi Iwai wrote:
> > > > > The link_fd returns the file descriptor for linking multiple PCM
> > > > > streams.  If you comment it out, it means that no link is possible.
> > > > > It means that snd_pcm_link() didn't do anything in fact after your
> > > > > patch.
> > > > 
> > > > I can't understand why this works after my patch broke snd_pcm_link .
> > >
> > > It probably works because the rme cards are synced by an external means 
> > > such as word clock or the entity they are connected to has master sync
> > 
> > Makes sense. So, the situation appears to be:
> > 1 - The link code is unnecessary for duplex operation of multiple
> > clock-synchronised sound cards with jackd.
> > 2 - It breaks the above when present.
> 
> Hm, the question is what the cable-sync really does.  Basically the
> linked PCM streams in ALSA are just for trigger actions,
> i.e. start/stop streams.  The others are not really related.
> 
> However, the recent changes of multi pcm tries to use only one pollfd
> as a master, and this seems broken in your case.  Or, it's really the
> matter of linked streams.
> 
> Will come back to this issue later...
> 

Takashi-san,

I'm not sure I fully understand - are you saying JACK is broken or that
it's an ALSA bug?

Lee


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

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

* Re: pcm_multi poll timeout error
  2006-08-01  2:04           ` Lee Revell
@ 2006-08-01 10:43             ` Takashi Iwai
  2006-08-01 22:58               ` John Rigg
  2006-08-06 15:03               ` John Rigg
  0 siblings, 2 replies; 12+ messages in thread
From: Takashi Iwai @ 2006-08-01 10:43 UTC (permalink / raw)
  To: Lee Revell; +Cc: John Rigg, alsa-devel, Paul Davis, Jeremy Hall

At Mon, 31 Jul 2006 22:04:26 -0400,
Lee Revell wrote:
> 
> On Mon, 2005-12-12 at 12:31 +0100, Takashi Iwai wrote:
> > At Fri, 9 Dec 2005 20:15:02 +0000,
> > John Rigg wrote:
> > > 
> > > On Fri, Dec 09, 2005 at 12:55:27PM -0500, Jeremy Hall wrote:
> > > > In the new year, John Rigg wrote:
> > > > > On Fri, Dec 09, 2005 at 12:40:05PM +0100, Takashi Iwai wrote:
> > > > > > The link_fd returns the file descriptor for linking multiple PCM
> > > > > > streams.  If you comment it out, it means that no link is possible.
> > > > > > It means that snd_pcm_link() didn't do anything in fact after your
> > > > > > patch.
> > > > > 
> > > > > I can't understand why this works after my patch broke snd_pcm_link .
> > > >
> > > > It probably works because the rme cards are synced by an external means 
> > > > such as word clock or the entity they are connected to has master sync
> > > 
> > > Makes sense. So, the situation appears to be:
> > > 1 - The link code is unnecessary for duplex operation of multiple
> > > clock-synchronised sound cards with jackd.
> > > 2 - It breaks the above when present.
> > 
> > Hm, the question is what the cable-sync really does.  Basically the
> > linked PCM streams in ALSA are just for trigger actions,
> > i.e. start/stop streams.  The others are not really related.
> > 
> > However, the recent changes of multi pcm tries to use only one pollfd
> > as a master, and this seems broken in your case.  Or, it's really the
> > matter of linked streams.
> > 
> > Will come back to this issue later...
> > 
> 
> Takashi-san,
> 
> I'm not sure I fully understand - are you saying JACK is broken or that
> it's an ALSA bug?

It's an "undefined behavior".
I suppose that software-linked PCM streams do right thing, but we need
to investigate the detail.

John, could you check whether the problem still appears with the
latest ALSA HG version, especially with alsa-lib?  I remember that
some fixes have been done on multi plugin.


Takashi

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

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

* Re: pcm_multi poll timeout error
  2006-08-01 10:43             ` Takashi Iwai
@ 2006-08-01 22:58               ` John Rigg
  2006-08-06 15:03               ` John Rigg
  1 sibling, 0 replies; 12+ messages in thread
From: John Rigg @ 2006-08-01 22:58 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: John Rigg, Lee Revell, alsa-devel, Paul Davis, Jeremy Hall

On Tue, Aug 01, 2006 at 12:43:44PM +0200, Takashi Iwai wrote:
> It's an "undefined behavior".
> I suppose that software-linked PCM streams do right thing, but we need
> to investigate the detail.
> 
> John, could you check whether the problem still appears with the
> latest ALSA HG version, especially with alsa-lib?  I remember that
> some fixes have been done on multi plugin.

Yes, I'll check it. Might be a few days before I get time though.

John

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

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

* Re: pcm_multi poll timeout error
  2006-08-01 10:43             ` Takashi Iwai
  2006-08-01 22:58               ` John Rigg
@ 2006-08-06 15:03               ` John Rigg
  2006-08-07  9:38                 ` Takashi Iwai
  2006-08-08  6:35                 ` Clemens Ladisch
  1 sibling, 2 replies; 12+ messages in thread
From: John Rigg @ 2006-08-06 15:03 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

On Tue, Aug 01, 2006 at 12:43:44PM +0200, Takashi Iwai wrote:
> At Mon, 31 Jul 2006 22:04:26 -0400,
> Lee Revell wrote:
> > 
> > On Mon, 2005-12-12 at 12:31 +0100, Takashi Iwai wrote:
> > > At Fri, 9 Dec 2005 20:15:02 +0000,
> > > John Rigg wrote:
> > > > 
> > > > On Fri, Dec 09, 2005 at 12:55:27PM -0500, Jeremy Hall wrote:
> > > > > In the new year, John Rigg wrote:
> > > > > > On Fri, Dec 09, 2005 at 12:40:05PM +0100, Takashi Iwai wrote:
> > > > > > > The link_fd returns the file descriptor for linking multiple PCM
> > > > > > > streams.  If you comment it out, it means that no link is possible.
> > > > > > > It means that snd_pcm_link() didn't do anything in fact after your
> > > > > > > patch.
> > > > > > 
> > > > > > I can't understand why this works after my patch broke snd_pcm_link .
> > > > >
> > > > > It probably works because the rme cards are synced by an external means 
> > > > > such as word clock or the entity they are connected to has master sync
> > > > 
> > > > Makes sense. So, the situation appears to be:
> > > > 1 - The link code is unnecessary for duplex operation of multiple
> > > > clock-synchronised sound cards with jackd.
> > > > 2 - It breaks the above when present.
> > > 
> > > Hm, the question is what the cable-sync really does.  Basically the
> > > linked PCM streams in ALSA are just for trigger actions,
> > > i.e. start/stop streams.  The others are not really related.
> > > 
> > > However, the recent changes of multi pcm tries to use only one pollfd
> > > as a master, and this seems broken in your case.  Or, it's really the
> > > matter of linked streams.
> > > 
> > > Will come back to this issue later...
> > > 
> > 
> > Takashi-san,
> > 
> > I'm not sure I fully understand - are you saying JACK is broken or that
> > it's an ALSA bug?
> 
> It's an "undefined behavior".
> I suppose that software-linked PCM streams do right thing, but we need
> to investigate the detail.
> 
> John, could you check whether the problem still appears with the
> latest ALSA HG version, especially with alsa-lib?  I remember that
> some fixes have been done on multi plugin.

The problem still appears with alsa-lib-1.0.12rc2 version. There are
no changes in pcm_multi since 1.0.11.

Is there an easy way to view changes in the hg repository, ie. an
equivalent to the old cvs viewer on Sourceforge?
I'm testing this on my production system, which is a little disruptive,
so it would be convenient to be able to check for changes in the code before
trying it.

John

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

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

* Re: pcm_multi poll timeout error
  2006-08-06 15:03               ` John Rigg
@ 2006-08-07  9:38                 ` Takashi Iwai
  2006-08-08  6:35                 ` Clemens Ladisch
  1 sibling, 0 replies; 12+ messages in thread
From: Takashi Iwai @ 2006-08-07  9:38 UTC (permalink / raw)
  To: John Rigg; +Cc: alsa-devel

At Sun, 6 Aug 2006 16:03:49 +0100,
John Rigg wrote:
> 
> On Tue, Aug 01, 2006 at 12:43:44PM +0200, Takashi Iwai wrote:
> > At Mon, 31 Jul 2006 22:04:26 -0400,
> > Lee Revell wrote:
> > > 
> > > On Mon, 2005-12-12 at 12:31 +0100, Takashi Iwai wrote:
> > > > At Fri, 9 Dec 2005 20:15:02 +0000,
> > > > John Rigg wrote:
> > > > > 
> > > > > On Fri, Dec 09, 2005 at 12:55:27PM -0500, Jeremy Hall wrote:
> > > > > > In the new year, John Rigg wrote:
> > > > > > > On Fri, Dec 09, 2005 at 12:40:05PM +0100, Takashi Iwai wrote:
> > > > > > > > The link_fd returns the file descriptor for linking multiple PCM
> > > > > > > > streams.  If you comment it out, it means that no link is possible.
> > > > > > > > It means that snd_pcm_link() didn't do anything in fact after your
> > > > > > > > patch.
> > > > > > > 
> > > > > > > I can't understand why this works after my patch broke snd_pcm_link .
> > > > > >
> > > > > > It probably works because the rme cards are synced by an external means 
> > > > > > such as word clock or the entity they are connected to has master sync
> > > > > 
> > > > > Makes sense. So, the situation appears to be:
> > > > > 1 - The link code is unnecessary for duplex operation of multiple
> > > > > clock-synchronised sound cards with jackd.
> > > > > 2 - It breaks the above when present.
> > > > 
> > > > Hm, the question is what the cable-sync really does.  Basically the
> > > > linked PCM streams in ALSA are just for trigger actions,
> > > > i.e. start/stop streams.  The others are not really related.
> > > > 
> > > > However, the recent changes of multi pcm tries to use only one pollfd
> > > > as a master, and this seems broken in your case.  Or, it's really the
> > > > matter of linked streams.
> > > > 
> > > > Will come back to this issue later...
> > > > 
> > > 
> > > Takashi-san,
> > > 
> > > I'm not sure I fully understand - are you saying JACK is broken or that
> > > it's an ALSA bug?
> > 
> > It's an "undefined behavior".
> > I suppose that software-linked PCM streams do right thing, but we need
> > to investigate the detail.
> > 
> > John, could you check whether the problem still appears with the
> > latest ALSA HG version, especially with alsa-lib?  I remember that
> > some fixes have been done on multi plugin.
> 
> The problem still appears with alsa-lib-1.0.12rc2 version. There are
> no changes in pcm_multi since 1.0.11.

The change was not in pcm_multi.c but in pcm_hw.c.
But anyway this seems irrelevant.

> Is there an easy way to view changes in the hg repository, ie. an
> equivalent to the old cvs viewer on Sourceforge?
> I'm testing this on my production system, which is a little disruptive,
> so it would be convenient to be able to check for changes in the code before
> trying it.

Try access to http://hg-mirror.alsa-project.org from your browser.


Takashi

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

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

* Re: pcm_multi poll timeout error
  2006-08-06 15:03               ` John Rigg
  2006-08-07  9:38                 ` Takashi Iwai
@ 2006-08-08  6:35                 ` Clemens Ladisch
  1 sibling, 0 replies; 12+ messages in thread
From: Clemens Ladisch @ 2006-08-08  6:35 UTC (permalink / raw)
  To: John Rigg, Takashi Iwai; +Cc: alsa-devel

John Rigg wrote:
> On Tue, Aug 01, 2006 at 12:43:44PM +0200, Takashi Iwai wrote:
> > John, could you check whether the problem still appears with the
> > latest ALSA HG version, especially with alsa-lib?  I remember that
> > some fixes have been done on multi plugin.
> 
> The problem still appears with alsa-lib-1.0.12rc2 version. There are
> no changes in pcm_multi since 1.0.11.

I can reproduce this problem.  It seems to be a bug in the multi plugin.

snd_pcm_multi_start() does not call snd_pcm_start() for any of its slave
PCMs that are linked to another, i.e., for slaves where the 'linked'
field in the slaves array is set.

snd_pcm_multi_hw_params() sets 'linked' for all but one of the slaves.
snd_pcm_multi_link_fd(), however, sets 'linked' for all its slaves, and
gets called for both the playback and capture PCMs in the full duplex
case.

This means that none of the slave PCMs ever gets started.  After jackd's
snd_pcm_start() call, the state is still PREPARED.


Regards,
Clemens
-- 
  Clemens Ladisch
  cladisch@fastmail.net


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

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

end of thread, other threads:[~2006-08-08  6:35 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-08 19:13 pcm_multi poll timeout error John Rigg
2005-12-09 11:40 ` Takashi Iwai
2005-12-09 17:16   ` John Rigg
2005-12-09 17:55     ` Jeremy Hall
2005-12-09 20:15       ` John Rigg
2005-12-12 11:31         ` Takashi Iwai
2006-08-01  2:04           ` Lee Revell
2006-08-01 10:43             ` Takashi Iwai
2006-08-01 22:58               ` John Rigg
2006-08-06 15:03               ` John Rigg
2006-08-07  9:38                 ` Takashi Iwai
2006-08-08  6:35                 ` Clemens Ladisch

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.