jack 0.118.0: Add patch to that changes the jackd defaults for the ALSA driver to...
authorRichard <richarda@x520.(none)>
Wed, 28 Jul 2010 11:43:48 +0000 (21:43 +1000)
committerKoen Kooi <koen@openembedded.org>
Sun, 1 Aug 2010 15:01:01 +0000 (17:01 +0200)
recipes/jack/files/jack_fix_TWL4030_alsa_capture.patch [new file with mode: 0644]
recipes/jack/jack_0.118.0.bb

diff --git a/recipes/jack/files/jack_fix_TWL4030_alsa_capture.patch b/recipes/jack/files/jack_fix_TWL4030_alsa_capture.patch
new file mode 100644 (file)
index 0000000..77337ff
--- /dev/null
@@ -0,0 +1,31 @@
+--- a/drivers/alsa/alsa_driver.c       2009-05-06 06:36:08.000000000 +1000
++++ b/drivers/alsa/alsa_driver.c       2010-07-28 21:02:57.238101024 +1000
+@@ -2388,7 +2388,7 @@
+       strcpy (params[i].name, "period");
+       params[i].character  = 'p';
+       params[i].type       = JackDriverParamUInt;
+-      params[i].value.ui   = 1024U;
++      params[i].value.ui   = 256U;            /* TWL4030 capture. */
+       strcpy (params[i].short_desc, "Frames per period");
+       strcpy (params[i].long_desc, params[i].short_desc);
+@@ -2396,7 +2396,7 @@
+       strcpy (params[i].name, "nperiods");
+       params[i].character  = 'n';
+       params[i].type       = JackDriverParamUInt;
+-      params[i].value.ui   = 2U;
++      params[i].value.ui   = 4U;              /* TWL4030 capture. */
+       strcpy (params[i].short_desc, "Number of periods of playback latency");
+       strcpy (params[i].long_desc, params[i].short_desc);
+@@ -2518,8 +2518,8 @@
+ driver_initialize (jack_client_t *client, const JSList * params)
+ {
+         jack_nframes_t srate = 48000;
+-      jack_nframes_t frames_per_interrupt = 1024;
+-      unsigned long user_nperiods = 2;
++      jack_nframes_t frames_per_interrupt = 256;      /* TWL4030 needs small number of frames here. */
++      unsigned long user_nperiods = 4;                /* TWL4030 needs 4 periods to avoid XRuns. */
+       char *playback_pcm_name = "hw:0";
+       char *capture_pcm_name = "hw:0";
+       int hw_monitoring = FALSE;
index b1a01e4..6752c8b 100644 (file)
@@ -8,7 +8,10 @@ LICENSE = "GPLv2 LGPLv2.1"
 
 DEPENDS = "alsa-lib"
 
-SRC_URI = "http://jackaudio.org/downloads/jack-audio-connection-kit-${PV}.tar.gz"
+PR = "r1"
+
+SRC_URI = "http://jackaudio.org/downloads/jack-audio-connection-kit-${PV}.tar.gz \
+           file://jack_fix_TWL4030_alsa_capture.patch"
 SRC_URI[md5sum] = "d58e29a55f285d54e75134cec8e02a10"
 SRC_URI[sha256sum] = "6aadf38ca98104772fd675bba7adecf72d2a600e17cccfc5d1f7c50f19b722c2"