Mark Edwards | 2 Jan 2007 14:03
Picon

[Jackit-devel] no sound problem...


I wonder if there is anyone out there who might be able to help get me on the right track.
 
Basic symptoms of the problem are that there is no audio played when using jackd.
 
The following has been done to confirm operation:
 
1. audio has been played using aplay through the correct alsa device (I am using an hda-intel ALC883) which is hw:0,1. My computer is connected to my amp using a TOS optic fibre link. This works fine, however...
 
I have tried using xmms with the jack output plugin. No sound. I have checked jack connectivity with qjackctl and this all seems fine. XMMS output is connected to all alsa_pcm writable client inputs.(NB my hda_intel seems to expose 8 possibly playback inputs. Have tried with all).
 
No error messages appear on the jackd log that indicate a problem.
 
I have also tried with other jack audio generators - no luck either.
 
I'm sure this is just a newbie tripup but I'm running out of hair so I'd appreciate any help I can get before a visit to a trichologist becomes necessary.
 
many thanks,
 
Mark.
 
-------------------------------------------------------------------------
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
_______________________________________________
Jackit-devel mailing list
Jackit-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jackit-devel
John Rigg | 2 Jan 2007 15:55
Picon
Favicon

Re: [Jackit-devel] Divide by zero error

On Sun, Dec 31, 2006 at 11:09:03AM +0000, John Rigg wrote:
> 		/* post xrun-handling */
> 		
> 		jack_nframes_t period_size_guess = 
> 			engine->control->current_time.frame_rate * 
> 			   ((timer->next_wakeup - timer->current_wakeup) / 1000000.0);
> 
> 		timer->frames += 
> 			((engine->driver->last_wait_ust - 
> 			 engine->control->frame_timer.next_wakeup) / 
> 			period_size_guess) * 
> 			period_size_guess;
> 
> Unfortunately period_size_guess always evaluates to zero,
> so timer->frames ends up being (somevalue/0.0)*0.0 . This usually also
> evaluates to zero, so most of the time it doesn't have a visible effect,
> but every once in a while it produces a floating point exception.
> 
> It is caused by the implicit cast to a float when dividing by 1000000.0. 
> The expression only works if the cast is to a double (on both x86_64 and x86).
> This can be done very simply by changing the type declaration of
> period_size_guess from jack_nframes_t (which is uint_32_t) to double

A further note. I believe this has gone unreported for so long (except
by me AFAIK) because the post xrun-handling code doesn't run very often
on the average system. I'm using multiple sound cards with ALSA pcm_multi,
which causes this code to run fairly frequently even though alsa_pcm
doesn't report any xruns and nothing is audibly wrong. On my system
the fp exception occurred frequently enough to be a real problem.

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
Fons Adriaensen | 2 Jan 2007 16:53

Re: [Jackit-devel] Divide by zero error

On Tue, Jan 02, 2007 at 02:55:12PM +0000, John Rigg wrote:
> On Sun, Dec 31, 2006 at 11:09:03AM +0000, John Rigg wrote:
> > 		/* post xrun-handling */
> > 		
> > 		jack_nframes_t period_size_guess = 
> > 			engine->control->current_time.frame_rate * 
> > 			   ((timer->next_wakeup - timer->current_wakeup) / 1000000.0);
> > 
> > 		timer->frames += 
> > 			((engine->driver->last_wait_ust - 
> > 			 engine->control->frame_timer.next_wakeup) / 
> > 			period_size_guess) * 
> > 			period_size_guess;
> > 
> > Unfortunately period_size_guess always evaluates to zero,
> > so timer->frames ends up being (somevalue/0.0)*0.0 . This usually also
> > evaluates to zero, so most of the time it doesn't have a visible effect,
> > but every once in a while it produces a floating point exception.
> > 
> > It is caused by the implicit cast to a float when dividing by 1000000.0. 
> > The expression only works if the cast is to a double (on both x86_64 and x86).
> > This can be done very simply by changing the type declaration of
> > period_size_guess from jack_nframes_t (which is uint_32_t) to double
> 
> A further note. I believe this has gone unreported for so long (except
> by me AFAIK) because the post xrun-handling code doesn't run very often
> on the average system. I'm using multiple sound cards with ALSA pcm_multi,
> which causes this code to run fairly frequently even though alsa_pcm
> doesn't report any xruns and nothing is audibly wrong. On my system
> the fp exception occurred frequently enough to be a real problem.

Two further notes / questions raised :

1. Why is it necessary to "guess" the period size after an xrun ? 
   It shouldn't have changed from what is was before. So either the
   nominal value or a measured one (availble from the DLL state) 
   should do.

2. The second statement increments timer->frames by a multiple of
   period_size_guess. Since we had an xrun in the first place, and
   the alsa driver will have been restarted, is there any reason to
   believe that timer->frames needs to be incremented in this way ?
   The underlying assumption is that the regular sequence of driver
   wakeups continues without a 'phase jump', but is this really the
   case ?

--

-- 
FA

Lascia la spina, cogli la rosa.

-------------------------------------------------------------------------
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
John Rigg | 2 Jan 2007 18:44
Picon
Favicon

Re: [Jackit-devel] Divide by zero error

On Tue, Jan 02, 2007 at 04:02:29PM +0100, Fons Adriaensen wrote:
> 1. Why is it necessary to "guess" the period size after an xrun ? 
>    It shouldn't have changed from what is was before. So either the
>    nominal value or a measured one (availble from the DLL state) 
>    should do.
> 
> 2. The second statement increments timer->frames by a multiple of
>    period_size_guess. Since we had an xrun in the first place, and
>    the alsa driver will have been restarted, is there any reason to
>    believe that timer->frames needs to be incremented in this way ?

Not being a JACK dev I don't know enough to answer that, but I do
note that this code was added to CVS on 2004-12-11. Apart from the
occasional fp exception, nobody seems to have noticed any ill effects
from period_size_guess always being zero and no increment occurring.

John

>    The underlying assumption is that the regular sequence of driver
>    wakeups continues without a 'phase jump', but is this really the
>    case ?

-------------------------------------------------------------------------
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
Nico R. | 4 Jan 2007 14:46
Picon

[Jackit-devel] jackd/jackdmp works better under high load

Hello!

I'm experiencing a strange problem: I am running jackd-0.102.20 or
jackdmp (latest SVN trunk) on an Intel Core Duo (dual core CPU). If the
system is almost idle, I hear many cracks when playing sound. But if the
system is under load, I get smooth sound playback.

This problem occurs with jackd when one of the both cores is not under
load and with jackdmp if both are not under load.

I have tested it under linux-2.6.18-gentoo-r6 (jackd & jackdmp) and
linux-2.6.20-rc2-rt3 (jackd only) with the same results. The JACK daemon
is running with realtime privileges through the realtime/realcap module.

(Sound playback is a bit smoother with the -rt kernel, but as that
kernel seems to be horribly broken, I'll have to send a bugreport to
LKML first and then test again.)

I hope that someone can give me a hint on how to debug the problem.
Always running a make -j3 in parallel for building a large package isn't
that nice if you just want to listen to some music. ;-)
--

-- 
Nico

-------------------------------------------------------------------------
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
_______________________________________________
Jackit-devel mailing list
Jackit-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Dave Cunningham | 4 Jan 2007 15:01

Re: [Jackit-devel] jackd/jackdmp works better under high load

On Thu, Jan 04, 2007 at 02:46:42PM +0100, Nico R. wrote:
>Hello!
>
>I'm experiencing a strange problem: I am running jackd-0.102.20 or
>jackdmp (latest SVN trunk) on an Intel Core Duo (dual core CPU). If the
>system is almost idle, I hear many cracks when playing sound. But if the
>system is under load, I get smooth sound playback.

Maybe the cpu is throttling down to save power, and this is
disturbing jack's timing...

You could try disabling some of the power saving features.
There are probably kernel parameters for that.

-------------------------------------------------------------------------
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
Lars Luthman | 4 Jan 2007 16:21
Picon

[Jackit-devel] Man page patch for period size

The API docs for the JackProcessCallback say that the nframes parameter
is always guaranteed to be a power of 2, but the man page doesn't
mention this restriction for the command line parameter for the period
size. This patch adds some sentences to the man page fixing that.

I'm assuming that it's the man page that omits this constraint and not
the API docs that are wrong.

--

-- 
Lars Luthman - please encrypt any email sent to me if possible
PGP key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x04C77E2E
Fingerprint: FCA7 C790 19B9 322D EB7A E1B3 4371 4650 04C7 7E2E
Attachment (man_period.diff): text/x-patch, 3315 bytes
-------------------------------------------------------------------------
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
_______________________________________________
Jackit-devel mailing list
Jackit-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Marcos Guglielmetti | 4 Jan 2007 19:00
Picon
Gravatar

[Jackit-devel] help with realtime capabilities and 2.6.20 kernels

Hi, 

With Tapsa, a finnish kernel hacker, we are testing some kernels that he is 
building and uploading here for the Musix GNU/Linux distribution:

http://linux.ilmainen.net/musix/temp/

We have problems using these kernels from a non-root user: JACK has no 
realtime capabilities. From a root user, all went ok. But, of course, we need 
to use JACK as non-root user.

"# modprobe realcap
FATAL: Error inserting realcap 
(/lib/modules/2.6.20-rc2-rt3/kernel/security/realcap.ko): Invalid argument"

¿?

"There don't even seem to be any capability module existing any more 
(only following beginning with "cap"):
# modprobe cap
capi     capidrv  capifs   capmode
"

 modprobe capability
FATAL: Module capability not found.
modprobe realtime
FATAL: Module realtime not foun

 ps -C jackd -cmL
  PID   LWP CLS PRI TTY          TIME CMD
 8768     - -     - ?        00:00:00 jackd
    -  8768 TS   19 -        00:00:00 -
    -  8769 TS   24 -        00:00:00 -
    -  8770 TS   24 -        00:00:00 -
    -  8771 TS   24 -        00:00:00 -
    -  8772 TS   24 -        00:00:00 -

As root user:

ps -C jackd -cmL
  PID   LWP CLS PRI TTY          TIME CMD
 8736     - -     - ?        00:00:00 jackd
    -  8736 TS   19 -        00:00:00 -
    -  8737 TS   24 -        00:00:00 -
    -  8738 TS   24 -        00:00:00 -
    -  8739 FF   90 -        00:00:00 -
    -  8740 FF   80 -        00:00:00 -

It can get realtime capabilities (root allways can if the kernel is realtime 
enabled), and it goes ok.

What could be the problem with realtime issue and normal users? The realtime 
module is "obsolete" ok, but it used to work very good. 

It would be useful to build the kernel along with the obsolete realtime-lsm 
module? Or you dont recommend it?

-- 
Marcos Guglielmetti  
* Director del desarrollo de Musix GNU+Linux, 100% Software Libre
* CD Donwload: (http://www.musix.org.ar/en/)
* Videos, programas y otras cosas en: ftp://musix.ourproject.org/pub/musix/
* Reporte de errores a: 
https://www.musix.org.ar/wiki/index.php?title=Problemas-Bugs
*IRC: #musix channel on freenode
* Torrent Download:
https://e.ututo.org.ar/utiles/torrent/MusixGNU-Linux0.59.iso.torrent

-------------------------------------------------------------------------
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
_______________________________________________
Jackit-devel mailing list
Jackit-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Lee Revell | 4 Jan 2007 23:04

Re: [Jackit-devel] help with realtime capabilities and 2.6.20 kernels

On Thu, 2007-01-04 at 19:00 +0100, Marcos Guglielmetti wrote:
> Hi, 
> 
> With Tapsa, a finnish kernel hacker, we are testing some kernels that he is 
> building and uploading here for the Musix GNU/Linux distribution:
> 
> http://linux.ilmainen.net/musix/temp/
> 
> We have problems using these kernels from a non-root user: JACK has no 
> realtime capabilities. From a root user, all went ok. But, of course, we need 
> to use JACK as non-root user.
> 
> "# modprobe realcap
> FATAL: Error inserting realcap 
> (/lib/modules/2.6.20-rc2-rt3/kernel/security/realcap.ko): Invalid argument"
> 
> ¿?
> 
> "There don't even seem to be any capability module existing any more 
> (only following beginning with "cap"):
> # modprobe cap
> capi     capidrv  capifs   capmode

Not sure why you think that capabilities have anything to do with JACK
on a modern system - that went out with 2.4.

Just use a PAM version newer than 0.79 and configure the required limits
in /etc/security/limits.conf.  It's well documented in the archives of
this list, LAD, and LAU.

If you can't use a recent PAM, apply the realtime LSM patch to the
kernel.

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
Marcos Guglielmetti | 4 Jan 2007 21:47
Picon
Gravatar

Re: [Jackit-devel] help with realtime capabilities and 2.6.20 kernels

El Jue 04 Ene 2007 23:04, Lee Revell escribió:
> On Thu, 2007-01-04 at 19:00 +0100, Marcos Guglielmetti wrote:
> > Hi,
> >
> > With Tapsa, a finnish kernel hacker, we are testing some kernels that he
> > is building and uploading here for the Musix GNU/Linux distribution:
> >
> > http://linux.ilmainen.net/musix/temp/
> >
> > We have problems using these kernels from a non-root user: JACK has no
> > realtime capabilities. From a root user, all went ok. But, of course, we
> > need to use JACK as non-root user.
> >
> > "# modprobe realcap
> > FATAL: Error inserting realcap
> > (/lib/modules/2.6.20-rc2-rt3/kernel/security/realcap.ko): Invalid
> > argument"
> >
> > ¿?
> >
> > "There don't even seem to be any capability module existing any more
> > (only following beginning with "cap"):
> > # modprobe cap
> > capi     capidrv  capifs   capmode
>
> Not sure why you think that capabilities have anything to do with JACK
> on a modern system - that went out with 2.4.
>
> Just use a PAM version newer than 0.79 and configure the required limits
> in /etc/security/limits.conf.  It's well documented in the archives of
> this list, LAD, and LAU.
>
> If you can't use a recent PAM, apply the realtime LSM patch to the
> kernel.
>
> Lee

Hi, thanks, I think that my system is ok with PAM:

 /etc/security/limits.conf  

 <at> audio     -    rt_priority   100
 <at> audio     -    nice      -10
 <at> audio     -    memlock     4000000

And my normal user "marcos" is into the audio group

And PAM is installed:

apt-cache policy libpam-modules
libpam-modules:
  Instalados: 0.79-4
  Candidato: 0.79-4
  Tabla de versión:
 *** 0.79-4 0
        500 ftp://ftp.fr.debian.org unstable/main Packages
        990 ftp://ftp.fr.debian.org testing/main Packages
        100 /var/lib/dpkg/status
apt-cache policy libpam-runtime
libpam-runtime:
  Instalados: 0.79-4
  Candidato: 0.79-4
  Tabla de versión:
 *** 0.79-4 0
        500 ftp://ftp.fr.debian.org unstable/main Packages
        990 ftp://ftp.fr.debian.org testing/main Packages
        100 /var/lib/dpkg/status

So: why JACK doesn't get realtime capabilities without the realtime-lsm module 
builded into these (http://linux.ilmainen.net/musix/temp/) kernels?

--

-- 
Marcos Guglielmetti  
* Director del desarrollo de Musix GNU+Linux, 100% Software Libre
* CD Donwload: (http://www.musix.org.ar/en/)
* Videos, programas y otras cosas en: ftp://musix.ourproject.org/pub/musix/
* Reporte de errores a: 
https://www.musix.org.ar/wiki/index.php?title=Problemas-Bugs
*IRC: #musix channel on freenode
* Torrent Download:
https://e.ututo.org.ar/utiles/torrent/MusixGNU-Linux0.59.iso.torrent

-------------------------------------------------------------------------
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

Gmane