[Jack-Devel] issue with capturing

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Jack-Devel] issue with capturing

Pieter De Gendt
Hi all,

I am developing a driver for a TI audio chip and have got the playback part working, but when I enable capturing ports I am unable to create clients. Some output:

Playback only:
# jackd -d alsa -d hw:0 -P &
# jackdmp 1.9.10
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2014 Grame.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK server starting in realtime mode with priority 10
self-connect-mode is "Don't restrict self connect requests"
creating alsa driver ... hw:0|-|1024|2|48000|0|0|nomon|swmeter|-|32bit
configuring for 48000Hz, period = 1024 frames (21.3 ms), buffer = 2 periods
ALSA: final selected sample format for playback: 32bit integer little-endian
ALSA: use 2 periods for playback

# jack_lsp
system:playback_1
system:playback_2

======

Both capturing and playback:
# jackd -d alsa -d hw:0 &
# jackdmp 1.9.10
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2014 Grame.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK server starting in realtime mode with priority 10
self-connect-mode is "Don't restrict self connect requests"
creating alsa driver ... hw:0|hw:0|1024|2|48000|0|0|nomon|swmeter|-|32bit
configuring for 48000Hz, period = 1024 frames (21.3 ms), buffer = 2 periods
ALSA: final selected sample format for capture: 32bit integer little-endian
ALSA: use 2 periods for capture
ALSA: final selected sample format for playback: 32bit integer little-endian
ALSA: use 2 periods for playback

# jack_lsp
JackPosixProcessSync::LockedTimedWait error usec = 5000000 err = Connection timed out
Driver is not running
Cannot create new client
Cannot open lsp client
Cannot read socket fd = 5 err = Success
CheckRes error
JackSocketClientChannel read fail
jack_client_open() failed, status = 0x21
CheckSize error size = 32 Size() = 12
CheckRead error
CheckSize error size = -1 Size() = 4
CheckRead error
CheckSize error size = 0 Size() = 12
CheckRead error

Any ideas why the lock can't be acquired? Jack is always capturing, how to get clients to work with the captured data?

Thanks in advance,
With kind regards,

Pieter

_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: issue with capturing

Stéphane Letz
Show us the code.

Stéphane

Le 1 sept. 2014 à 13:52, Pieter De Gendt <[hidden email]> a écrit :

> Hi all,
>
> I am developing a driver for a TI audio chip and have got the playback part working, but when I enable capturing ports I am unable to create clients. Some output:
>
> Playback only:
> # jackd -d alsa -d hw:0 -P &
> # jackdmp 1.9.10
> Copyright 2001-2005 Paul Davis and others.
> Copyright 2004-2014 Grame.
> jackdmp comes with ABSOLUTELY NO WARRANTY
> This is free software, and you are welcome to redistribute it
> under certain conditions; see the file COPYING for details
> JACK server starting in realtime mode with priority 10
> self-connect-mode is "Don't restrict self connect requests"
> creating alsa driver ... hw:0|-|1024|2|48000|0|0|nomon|swmeter|-|32bit
> configuring for 48000Hz, period = 1024 frames (21.3 ms), buffer = 2 periods
> ALSA: final selected sample format for playback: 32bit integer little-endian
> ALSA: use 2 periods for playback
>
> # jack_lsp
> system:playback_1
> system:playback_2
>
> ======
>
> Both capturing and playback:
> # jackd -d alsa -d hw:0 &
> # jackdmp 1.9.10
> Copyright 2001-2005 Paul Davis and others.
> Copyright 2004-2014 Grame.
> jackdmp comes with ABSOLUTELY NO WARRANTY
> This is free software, and you are welcome to redistribute it
> under certain conditions; see the file COPYING for details
> JACK server starting in realtime mode with priority 10
> self-connect-mode is "Don't restrict self connect requests"
> creating alsa driver ... hw:0|hw:0|1024|2|48000|0|0|nomon|swmeter|-|32bit
> configuring for 48000Hz, period = 1024 frames (21.3 ms), buffer = 2 periods
> ALSA: final selected sample format for capture: 32bit integer little-endian
> ALSA: use 2 periods for capture
> ALSA: final selected sample format for playback: 32bit integer little-endian
> ALSA: use 2 periods for playback
>
> # jack_lsp
> JackPosixProcessSync::LockedTimedWait error usec = 5000000 err = Connection timed out
> Driver is not running
> Cannot create new client
> Cannot open lsp client
> Cannot read socket fd = 5 err = Success
> CheckRes error
> JackSocketClientChannel read fail
> jack_client_open() failed, status = 0x21
> CheckSize error size = 32 Size() = 12
> CheckRead error
> CheckSize error size = -1 Size() = 4
> CheckRead error
> CheckSize error size = 0 Size() = 12
> CheckRead error
>
> Any ideas why the lock can't be acquired? Jack is always capturing, how to get clients to work with the captured data?
>
> Thanks in advance,
> With kind regards,
>
> Pieter
> _______________________________________________
> Jack-Devel mailing list
> [hidden email]
> http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org

_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: issue with capturing

Pieter De Gendt
In reply to this post by Pieter De Gendt
When running with -v it keeps spamming (see below), do you want to see the code for the driver?

jackdmp 1.9.10
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2014 Grame.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK server starting in realtime mode with priority 10
self-connect-mode is "Don't restrict self connect requests"
Jack: JackPosixThread::StartImp : create non RT thread
Jack: JackPosixThread::ThreadHandler : start
Jack: playback device hw:0
Jack: capture device hw:0
Jack: apparent rate = 48000
Jack: JackDriver::Open capture_driver_name = hw:0
Jack: JackDriver::Open playback_driver_name = hw:0
Jack: Check protocol client = 8 server = 8
Jack: JackEngine::ClientInternalOpen: name = system
Jack: JackEngine::AllocateRefNum ref = 0
Jack: JackPosixSemaphore::Allocate name = jack_sem.0_default_system val = 0
Jack: JackEngine::NotifyAddClient: name = system
Jack: JackGraphManager::SetBufferSize size = 1024
Jack: JackConnectionManager::DirectConnect first: ref1 = 0 ref2 = 0
Jack: JackGraphManager::ConnectRefNum cur_index = 0 ref1 = 0 ref2 = 0
Jack: JackDriver::SetupDriverSync driver sem in flush mode
creating alsa driver ... hw:0|hw:0|1024|2|48000|0|0|nomon|swmeter|-|32bit
configuring for 48000Hz, period = 1024 frames (21.3 ms), buffer = 2 periods
ALSA: final selected sample format for capture: 32bit integer little-endian
ALSA: use 2 periods for capture
ALSA: final selected sample format for playback: 32bit integer little-endian
ALSA: use 2 periods for playback
Jack: JackSocketServerChannel::Open
Jack: JackServerSocket::Bind : addr.sun_path /dev/shm/jack_default_0_0
Jack: JackSocketServerChannel::BuildPoolTable size = 1
Jack: JackEngine::Open
Jack: JackClientSocket::Connect : addr.sun_path /dev/shm/jack_default_0_0
Jack: JackEngine::ClientInternalOpen: name = freewheel
Jack: JackEngine::AllocateRefNum ref = 1
Jack: JackPosixSemaphore::Allocate name = jack_sem.0_default_freewheel val = 0
Jack: JackEngine::NotifyAddClient: name = freewheel
Jack: JackDriver::ClientNotify ref = 1 driver = system name = freewheel notify = 0
Jack: JackDriver::ClientNotify ref = 0 driver = freewheel name = system notify = 0
Jack: JackConnectionManager::DirectConnect first: ref1 = 1 ref2 = 1
Jack: JackGraphManager::ConnectRefNum cur_index = 0 ref1 = 1 ref2 = 1
Jack: JackDriver::SetupDriverSync driver sem in flush mode
Jack: JackGraphManager::SetBufferSize size = 1024
Jack: JackAlsaDriver::Attach fBufferSize 1024 fSampleRate 48000
Jack: JackEngine::PortRegister ref = 0 name = system:capture_1 type = 32 bit float mono audio flags = 22 buffer_size = 1024
Jack: JackGraphManager::AllocatePortAux port_index = 1 name = system:capture_1 type = 32 bit float mono audio
Jack: JackConnectionManager::AddOutputPort ref = 0 port = 1
Jack: JackEngine::ClientNotify: no callback for notification = 9
Jack: JackEngine::ClientNotify: no callback for notification = 9
Jack: JackAlsaDriver::Attach fCapturePortList[i] 1 
Jack: JackEngine::PortRegister ref = 0 name = system:capture_2 type = 32 bit float mono audio flags = 22 buffer_size = 1024
Jack: JackGraphManager::AllocatePortAux port_index = 2 name = system:capture_2 type = 32 bit float mono audio
Jack: JackConnectionManager::AddOutputPort ref = 0 port = 2
Jack: JackEngine::ClientNotify: no callback for notification = 9
Jack: JackEngine::ClientNotify: no callback for notification = 9
Jack: JackAlsaDriver::Attach fCapturePortList[i] 2 
Jack: JackEngine::PortRegister ref = 0 name = system:capture_3 type = 32 bit float mono audio flags = 22 buffer_size = 1024
Jack: JackGraphManager::AllocatePortAux port_index = 3 name = system:capture_3 type = 32 bit float mono audio
Jack: JackConnectionManager::AddOutputPort ref = 0 port = 3
Jack: JackEngine::ClientNotify: no callback for notification = 9
Jack: JackEngine::ClientNotify: no callback for notification = 9
Jack: JackAlsaDriver::Attach fCapturePortList[i] 3 
Jack: JackEngine::PortRegister ref = 0 name = system:capture_4 type = 32 bit float mono audio flags = 22 buffer_size = 1024
Jack: JackGraphManager::AllocatePortAux port_index = 4 name = system:capture_4 type = 32 bit float mono audio
Jack: JackConnectionManager::AddOutputPort ref = 0 port = 4
Jack: JackEngine::ClientNotify: no callback for notification = 9
Jack: JackEngine::ClientNotify: no callback for notification = 9
Jack: JackAlsaDriver::Attach fCapturePortList[i] 4 
Jack: JackEngine::PortRegister ref = 0 name = system:playback_1 type = 32 bit float mono audio flags = 21 buffer_size = 1024
Jack: JackGraphManager::AllocatePortAux port_index = 5 name = system:playback_1 type = 32 bit float mono audio
Jack: JackConnectionManager::AddInputPort ref = 0 port = 5
Jack: JackEngine::ClientNotify: no callback for notification = 9
Jack: JackEngine::ClientNotify: no callback for notification = 9
Jack: JackAlsaDriver::Attach fPlaybackPortList[i] 5 
Jack: JackEngine::PortRegister ref = 0 name = system:playback_2 type = 32 bit float mono audio flags = 21 buffer_size = 1024
Jack: JackGraphManager::AllocatePortAux port_index = 6 name = system:playback_2 type = 32 bit float mono audio
Jack: JackConnectionManager::AddInputPort ref = 0 port = 6
Jack: JackEngine::ClientNotify: no callback for notification = 9
Jack: JackEngine::ClientNotify: no callback for notification = 9
Jack: JackAlsaDriver::Attach fPlaybackPortList[i] 6 
Jack: JackEngine::PortRegister ref = 0 name = system:playback_3 type = 32 bit float mono audio flags = 21 buffer_size = 1024
Jack: JackGraphManager::AllocatePortAux port_index = 7 name = system:playback_3 type = 32 bit float mono audio
Jack: JackConnectionManager::AddInputPort ref = 0 port = 7
Jack: JackEngine::ClientNotify: no callback for notification = 9
Jack: JackEngine::ClientNotify: no callback for notification = 9
Jack: JackAlsaDriver::Attach fPlaybackPortList[i] 7 
Jack: JackEngine::PortRegister ref = 0 name = system:playback_4 type = 32 bit float mono audio flags = 21 buffer_size = 1024
Jack: JackGraphManager::AllocatePortAux port_index = 8 name = system:playback_4 type = 32 bit float mono audio
Jack: JackConnectionManager::AddInputPort ref = 0 port = 8
Jack: JackEngine::ClientNotify: no callback for notification = 9
Jack: JackEngine::ClientNotify: no callback for notification = 9
Jack: JackAlsaDriver::Attach fPlaybackPortList[i] 8 
Jack: JackEngine::PortRegister ref = 0 name = system:playback_5 type = 32 bit float mono audio flags = 21 buffer_size = 1024
Jack: JackGraphManager::AllocatePortAux port_index = 9 name = system:playback_5 type = 32 bit float mono audio
Jack: JackConnectionManager::AddInputPort ref = 0 port = 9
Jack: JackEngine::ClientNotify: no callback for notification = 9
Jack: JackEngine::ClientNotify: no callback for notification = 9
Jack: JackAlsaDriver::Attach fPlaybackPortList[i] 9 
Jack: JackEngine::PortRegister ref = 0 name = system:playback_6 type = 32 bit float mono audio flags = 21 buffer_size = 1024
Jack: JackGraphManager::AllocatePortAux port_index = 10 name = system:playback_6 type = 32 bit float mono audio
Jack: JackConnectionManager::AddInputPort ref = 0 port = 10
Jack: JackEngine::ClientNotify: no callback for notification = 9
Jack: JackEngine::ClientNotify: no callback for notification = 9
Jack: JackAlsaDriver::Attach fPlaybackPortList[i] 10 
Jack: JackEngine::PortRegister ref = 0 name = system:playback_7 type = 32 bit float mono audio flags = 21 buffer_size = 1024
Jack: JackGraphManager::AllocatePortAux port_index = 11 name = system:playback_7 type = 32 bit float mono audio
Jack: JackConnectionManager::AddInputPort ref = 0 port = 11
Jack: JackEngine::ClientNotify: no callback for notification = 9
Jack: JackEngine::ClientNotify: no callback for notification = 9
Jack: JackAlsaDriver::Attach fPlaybackPortList[i] 11 
Jack: JackEngine::PortRegister ref = 0 name = system:playback_8 type = 32 bit float mono audio flags = 21 buffer_size = 1024
Jack: JackGraphManager::AllocatePortAux port_index = 12 name = system:playback_8 type = 32 bit float mono audio
Jack: JackConnectionManager::AddInputPort ref = 0 port = 12
Jack: JackEngine::ClientNotify: no callback for notification = 9
Jack: JackEngine::ClientNotify: no callback for notification = 9
Jack: JackAlsaDriver::Attach fPlaybackPortList[i] 12 
Jack: Clock source : system clock via clock_gettime
Jack: JackServer::Start
Jack: JackThreadedDriver::Start
Jack: JackPosixThread::StartImp : create non RT thread
Jack: JackPosixThread::ThreadHandler : start
Jack: JackThreadedDriver::Init real-time
Jack: JackPosixThread::AcquireRealTimeImp priority = 10
Jack: JackPosixThread::StartImp : create non RT thread
Jack: JackPosixThread::ThreadHandler : start
Jack: JackSocketServerChannel::ClientCreate socket
Jack: JackSocketServerChannel::BuildPoolTable size = 2
Jack: JackSocketServerChannel::BuildPoolTable fSocketTable i = 1 fd = 8
Jack: JackSocketServerChannel::Execute : fPollTable i = 1 fd = 8
Jack: JackRequest::Notification
Jack: JackDriver::ClientNotify ref = 1 driver = freewheel name = freewheel notify = 18
Jack: JackDriver::ClientNotify ref = 1 driver = freewheel name = freewheel notify = 18
Jack: JackDriver::ClientNotify ref = 1 driver = freewheel name = freewheel notify = 18
Jack: JackDriver::ClientNotify ref = 1 driver = freewheel name = freewheel notify = 18
Jack: JackEngine::ClientNotify: no callback for notification = 4
Jack: JackEngine::ClientNotify: no callback for notification = 4
Jack: **** alsa_pcm: xrun of at least 0.030 msecs
Jack: ALSA XRun wait_status = 0
Jack: JackSocketServerChannel::Execute : fPollTable i = 1 fd = 8
Jack: JackRequest::Notification
Jack: JackEngine::ClientNotify: no callback for notification = 3
Jack: JackEngine::ClientNotify: no callback for notification = 3
Jack: ALSA XRun wait_status = 0
Jack: JackSocketServerChannel::Execute : fPollTable i = 1 fd = 8
Jack: JackRequest::Notification
Jack: JackEngine::ClientNotify: no callback for notification = 3
Jack: JackEngine::ClientNotify: no callback for notification = 3
Jack: **** alsa_pcm: xrun of at least 0.031 msecs
Jack: ALSA XRun wait_status = 0
Jack: JackSocketServerChannel::Execute : fPollTable i = 1 fd = 8
Jack: JackRequest::Notification
Jack: JackEngine::ClientNotify: no callback for notification = 3
Jack: JackEngine::ClientNotify: no callback for notification = 3
Jack: **** alsa_pcm: xrun of at least 0.031 msecs
Jack: ALSA XRun wait_status = 0
Jack: JackSocketServerChannel::Execute : fPollTable i = 1 fd = 8
Jack: JackRequest::Notification
Jack: JackEngine::ClientNotify: no callback for notification = 3
Jack: JackEngine::ClientNotify: no callback for notification = 3
Jack: **** alsa_pcm: xrun of at least 0.000 msecs
Jack: ALSA XRun wait_status = 0
Jack: JackSocketServerChannel::Execute : fPollTable i = 1 fd = 8
Jack: JackRequest::Notification
Jack: JackEngine::ClientNotify: no callback for notification = 3
Jack: JackEngine::ClientNotify: no callback for notification = 3
Jack: **** alsa_pcm: xrun of at least 0.000 msecs
Jack: ALSA XRun wait_status = 0
Jack: JackSocketServerChannel::Execute : fPollTable i = 1 fd = 8
Jack: JackRequest::Notification
Jack: JackEngine::ClientNotify: no callback for notification = 3
Jack: JackEngine::ClientNotify: no callback for notification = 3
Jack: **** alsa_pcm: xrun of at least 0.000 msecs
Jack: ALSA XRun wait_status = 0
Jack: JackSocketServerChannel::Execute : fPollTable i = 1 fd = 8
Jack: JackRequest::Notification
Jack: JackEngine::ClientNotify: no callback for notification = 3
Jack: JackEngine::ClientNotify: no callback for notification = 3
Jack: **** alsa_pcm: xrun of at least 0.031 msecs
Jack: ALSA XRun wait_status = 0
Jack: JackSocketServerChannel::Execute : fPollTable i = 1 fd = 8
Jack: JackRequest::Notification
Jack: JackEngine::ClientNotify: no callback for notification = 3
Jack: JackEngine::ClientNotify: no callback for notification = 3
Jack: **** alsa_pcm: xrun of at least 0.000 msecs
Jack: ALSA XRun wait_status = 0
Jack: JackSocketServerChannel::Execute : fPollTable i = 1 fd = 8
Jack: JackRequest::Notification
Jack: JackEngine::ClientNotify: no callback for notification = 3
Jack: JackEngine::ClientNotify: no callback for notification = 3
Jack: **** alsa_pcm: xrun of at least 0.030 msecs
.
.
.
Killed


On Mon, Sep 1, 2014 at 2:04 PM, Stéphane LETZ <[hidden email]> wrote:
1) you can use "verbose" (-v) mode to get more info

2) the error message is explicit "Driver is not running" , so server cannot start, so the question is : why isn't the driver running in this "capture only" case?

Stéphane

>
> # jack_lsp
> JackPosixProcessSync::LockedTimedWait error usec = 5000000 err = Connection timed out
> Driver is not running
> Cannot create new client
> Cannot open lsp client
> Cannot read socket fd = 5 err = Success
> CheckRes error
> JackSocketClientChannel read fail
> jack_client_open() failed, status = 0x21
> CheckSize error size = 32 Size() = 12
> CheckRead error
> CheckSize error size = -1 Size() = 4
> CheckRead error
> CheckSize error size = 0 Size() = 12
> CheckRead error
>
> Any ideas why the lock can't be acquired? Jack is always capturing, how to get clients to work with the captured data?
>
> Thanks in advance,
> With kind regards,
>
> Pieter
> _______________________________________________
> Jack-Devel mailing list
> [hidden email]
> http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org



_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org