Browse Source

Fix FFADO and Freebob drivers

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2296 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/1.90
sletz 17 years ago
parent
commit
17a6c17cc5
6 changed files with 10 additions and 27 deletions
  1. +2
    -1
      linux/alsa/JackAlsaDriver.cpp
  2. +1
    -4
      linux/alsa/JackAlsaDriver.h
  3. +4
    -11
      linux/firewire/JackFFADODriver.cpp
  4. +0
    -1
      linux/firewire/JackFFADODriver.h
  5. +3
    -9
      linux/freebob/JackFreebobDriver.cpp
  6. +0
    -1
      linux/freebob/JackFreebobDriver.h

+ 2
- 1
linux/alsa/JackAlsaDriver.cpp View File

@@ -2268,8 +2268,9 @@ int JackAlsaDriver::Stop()
int JackAlsaDriver::Read()
{
/* Taken from alsa_driver_run_cycle */
int wait_status;
int wait_status;
jack_nframes_t nframes;
fDelayedUsecs = 0.f;

nframes = alsa_driver_wait((alsa_driver_t *)fDriver, -1, &wait_status, &fDelayedUsecs);


+ 1
- 4
linux/alsa/JackAlsaDriver.h View File

@@ -40,8 +40,7 @@ class JackAlsaDriver : public JackAudioDriver
private:

jack_driver_t* fDriver;
jack_time_t fDelayedUst;

void alsa_driver_release_channel_dependent_memory(alsa_driver_t *driver);
int alsa_driver_check_capabilities(alsa_driver_t *driver);
int alsa_driver_check_card_type(alsa_driver_t *driver);
@@ -153,9 +152,7 @@ class JackAlsaDriver : public JackAudioDriver

int SetBufferSize(jack_nframes_t nframes);


// jack api emulation for the midi driver

int is_realtime() const;
int create_thread(pthread_t *thread, int prio, int rt, void *(*start_func)(void*), void *arg);



+ 4
- 11
linux/firewire/JackFFADODriver.cpp View File

@@ -724,10 +724,10 @@ int JackFFADODriver::Read()
/* Taken from ffado_driver_run_cycle */
ffado_driver_t* driver = (ffado_driver_t*)fDriver;
int wait_status = 0;
float delayed_usecs = 0.0;
fDelayedUsecs = 0.f;

jack_nframes_t nframes = ffado_driver_wait(driver, -1, &wait_status,
&delayed_usecs);
&fDelayedUsecs);

if ((wait_status < 0)) {
printError( "wait status < 0! (= %d)", wait_status);
@@ -735,24 +735,17 @@ int JackFFADODriver::Read()
}

if (nframes == 0) {

/* we detected an xrun and restarted: notify
* clients about the delay.
*/
//engine->delay (engine, delayed_usecs);
jack_log("FFADO XRun ");
//NotifyXRun(jack_get_microseconds());
NotifyXRun(fLastWaitUst);
//return 0;
jack_log("FFADO XRun");
NotifyXRun(fLastWaitUst, fDelayedUsecs);
return -1;
}

//fLastWaitUst = GetMicroSeconds(); // Take callback date here
if (nframes != fEngineControl->fBufferSize)
jack_log("JackFFADODriver::Read nframes = %ld", nframes);

//return engine->run_cycle (engine, nframes, delayed_usecs);
fDelayedUst = (jack_time_t)delayed_usecs;
printExit();
return ffado_driver_read((ffado_driver_t *)fDriver, fEngineControl->fBufferSize);
}


+ 0
- 1
linux/firewire/JackFFADODriver.h View File

@@ -44,7 +44,6 @@ class JackFFADODriver : public JackAudioDriver
int g_verbose;

jack_driver_t* fDriver;
jack_time_t fDelayedUst;
int ffado_driver_attach (ffado_driver_t *driver);
int ffado_driver_detach (ffado_driver_t *driver);
int ffado_driver_read (ffado_driver_t * driver, jack_nframes_t nframes);


+ 3
- 9
linux/freebob/JackFreebobDriver.cpp View File

@@ -856,10 +856,10 @@ int JackFreebobDriver::Read()
/* Taken from freebob_driver_run_cycle */
freebob_driver_t* driver = (freebob_driver_t*)fDriver;
int wait_status = 0;
float delayed_usecs = 0.0;
fDelayedUsecs = 0.f;

jack_nframes_t nframes = freebob_driver_wait (driver, -1, &wait_status,
&delayed_usecs);
&fDelayedUsecs);

if ((wait_status < 0)) {
printError( "wait status < 0! (= %d)", wait_status);
@@ -867,24 +867,18 @@ int JackFreebobDriver::Read()
}

if (nframes == 0) {

/* we detected an xrun and restarted: notify
* clients about the delay.
*/
//engine->delay (engine, delayed_usecs);
jack_log("FreeBoB XRun ");
//NotifyXRun(jack_get_microseconds());
NotifyXRun(fLastWaitUst);
//return 0;
NotifyXRun(fLastWaitUst, fDelayedUsecs);
return -1;
}

//fLastWaitUst = GetMicroSeconds(); // Take callback date here
if (nframes != fEngineControl->fBufferSize)
jack_log("JackFreebobDriver::Read nframes = %ld", nframes);

//return engine->run_cycle (engine, nframes, delayed_usecs);
fDelayedUst = (jack_time_t)delayed_usecs;
printExit();
return freebob_driver_read((freebob_driver_t *)fDriver, fEngineControl->fBufferSize);
}


+ 0
- 1
linux/freebob/JackFreebobDriver.h View File

@@ -44,7 +44,6 @@ class JackFreebobDriver : public JackAudioDriver
int g_verbose;

jack_driver_t* fDriver;
jack_time_t fDelayedUst;
int freebob_driver_attach (freebob_driver_t *driver);
int freebob_driver_detach (freebob_driver_t *driver);
int freebob_driver_read (freebob_driver_t * driver, jack_nframes_t nframes);


Loading…
Cancel
Save