Re: [Jack-Devel] How to get mplayer and firefox/flash to play

PrevNext  Index
DateTue, 20 Dec 2011 18:00:40 +0100
From Robin Gareus <[hidden] at gareus dot org>
To"Robert M. Riches Jr." <[hidden] at jacob21819 dot net>
Cc[hidden] at lists dot jackaudio dot org
In-Reply-ToRobert M. Riches Jr. Re: [Jack-Devel] How to get mplayer and firefox/flash to play
Follow-UpRobert M. Riches Jr. Re: [Jack-Devel] How to get mplayer and firefox/flash to play
On 12/20/2011 05:30 PM, Robert M. Riches Jr. wrote:
>> Date: Tue, 20 Dec 2011 10:03:52 -0600
>> From: "Chris Caudle" <[hidden]>
>> To: [hidden]
>>
>> On Mon, December 19, 2011 9:37 pm, Paul Davis wrote:
>>> why are you using netjack rather than just playing directly from
>>> mplayer or firefox to JACK on the same host?
>>
>> Sounds like an X terminal kind of setup.
>>
>>> Robert M. Riches Jr. wrote:
>>>> In setting up a zero-client arrangement
>>
>> I took that to be a setup where the client was very lightweight, and all
>> the apps were running on a remote server but displayed on the client. JACK
>> master would run on the display, and JACK running net backend would run on
>> the server where the applications were running.
>> You know these young ones are always coming up with new terms for
>> reinventing X terminals.
> 
> Thanks.  I'll have to remember "young ones" next time I receive
> yet another AARP invitation.  :-)
> 
> Yes, zero-client is essentially an X terminal--plus sound, remote
> USB, etc.  JACK master runs on the display.  JACK slave with the
> 'net' backend runs on the server where the applications run.  I
> can run aplay (on the server, aka JACK slave) perfectly as far as
> I can tell.  However, with mplayer, at 8.9 seconds into a file,
> the sound becomes akin to a motorboat, and the JACK master
> reports rapid-fire XRUNs.  Firefox, probably playing flash, never
> produces audio.
> 
> Regarding the error messages I see with Firefox and flash, I
> mis-wrote in the original posting.  It's stdout/stderr from
> Firefox where I see this:
> 
> jack_client_new: deprecated
> Jack: JackClient::SetupDriverSync driver sem in flush mode
> Jack: JackPosixSemaphore::Connect jack_sem.1501_default_alsa-jack.rawjackP.3061.
> 0
> Jack: Already connected name = alsa-jack.rawjackP.3061.0
> Jack: Clock source : system clock via clock_gettime
> Jack: JackLibClient::Open name = alsa-jack.rawjackP.3061.0 refnum = 2
> Jack: JackClient::PortRegister ref = 2 name = alsa-jack.rawjackP.3061.0:out_000 
> type = 32 bit float mono audio port_index = 5
> Jack: JackClient::PortRegister ref = 2 name = alsa-jack.rawjackP.3061.0:out_001 
> type = 32 bit float mono audio port_index = 6
> Jack: JackClient::Activate
> Jack: JackClient::StartThread : period = -2147483648 computation = 21333 constra
> int = 500
> Jack: Create non RT thread
> Jack: ThreadHandler: start
> Jack: JackClient::kActivateClient name = alsa-jack.rawjackP.3061.0 ref = 2 
> Jack: JackClient::Connect src =  dst = system:playback_1
> Jack: JackClient::Connect src =  dst = system:playback_2
> Jack: JackGraphManager::GetBuffer : port = 5 is released state
> Jack: JackGraphManager::GetBuffer : port = 6 is released state
> Jack: JackGraphManager::GetBuffer : port = 5 is released state
> Jack: JackGraphManager::GetBuffer : port = 6 is released state
> ...
> 
> The last pairs of lines repeat at high speed forever.  It appears
> to my untrained eye that 'src' is set to the empty string, which
> would seem to be potentially significant.
> 
> At the moment, my uneducated guess is I need some "ctl" entries
> in the server's .asoundrc.  Currently, it has this:
> 
> pcm.rawjack {
>     type jack
>     playback_ports {
>         0 system:playback_1
>         1 system:playback_2
>     }
>     capture_ports {
>         0 system:capture_1
>         1 system:capture_2
>     }
> }
> 
> pcm.jackplug {
>     type plug
>     slave { pcm "rawjack" }
> }
> 
> pcm.!default {
>     type plug
>     slave { pcm "rawjack" }
> }
> 
> However, that's essentially what I believe I have seen in
> documentation, with no 'ctl' entries.
> 
> Suggestions?

I never managed to get a satisfactory system with alsa-jack, jack plug,
and variants. No matter what, at least one client (skype, flash,
ekiga,..) always failed. Torben's patch
http://lalists.stanford.edu/lau/2010/10/0504.html was closest.


http://alsa.opensrc.org/Jack_and_Loopback_device_as_Alsa-to-Jack_bridge

just works, and I have not looked back.

Well, it's a tiny bit more CPU intense (alsa_out, alsa_in are running
all the time) and it has one quirk: I need to kill/restarted those on
each suspend/resume cycle (done in /etc/pm/sleep.d/) leaving them
connected would otherwise freeze jackd on resume.

ciao,
robin
PrevNext  Index

1324400473.13769_0.ltw:2,a <4EF0BF38.2020701 at gareus dot org>