[meego-packaging] [meego-commits] 16255: Changes to Trunk:Testing/pulseaudio
Zhu, Peter J
peter.j.zhu at intel.com
Fri Apr 15 04:35:02 PDT 2011
This patch resulted two IVI regression issue:
[Trunk:Testing][REG]Russellville:alsa_input source is muted by default 16188
[Trunk:Testing][REG]Russellville: failed to record sounds via pulseaudio 16190
Please fix it otherwise we can't promote to Trunk
Peter
> -----Original Message-----
> From: meego-commits-bounces at meego.com
> [mailto:meego-commits-bounces at meego.com] On Behalf Of Vivian Zhang
> Sent: Thursday, April 14, 2011 10:42 PM
> To: meego-commits at meego.com
> Subject: [meego-commits] 16255: Changes to Trunk:Testing/pulseaudio
>
> Hi,
> I have made the following changes to pulseaudio in project Trunk:Testing.
> Please review and accept ASAP.
>
> Thank You,
> Vivian Zhang
>
> [This message was auto-generated]
>
> ---
>
> Request #16255:
>
> submit: devel:multimedia/pulseaudio(r55) -> Trunk:Testing/pulseaudio
>
>
> Message:
> Added patch for merging alsa-sink-old and alsa-source-old modules for
> n900 (BMC #16057)
>
> State: new 2011-04-14T07:42:18 vivian
> Comment: None
>
>
>
> changes files:
> --------------
> --- pulseaudio.changes
> +++ pulseaudio.changes
> @@ -0,0 +1,3 @@
> +* Tue Apr 14 2011 Sami Sirkia <sami.sirkia at cybercom.com> - 0.9.22
> +- Added alsa-sink-old and alsa-source-old by patch. Fixes: BMC#16057.
> +
>
> new:
> ----
> pa-0.9.22-add-old-sink-and-source.patch
>
> spec files:
> -----------
> --- pulseaudio.spec
> +++ pulseaudio.spec
> @@ -277,6 +277,7 @@
> Patch254: pa-0.9.22-desktop.patch
> Patch255: use-a2dp-profile-for-non-mfld.patch
> Patch256: fix-9972-auto-route-audio-to-bt-sink.patch
> +Patch257: pa-0.9.22-add-old-sink-and-source.patch
> Requires: udev >= 145-3
> Requires: xcb-util
> Requires(post): /sbin/ldconfig
> @@ -857,6 +858,8 @@
> %patch255 -p1
> # fix-9972-auto-route-audio-to-bt-sink.patch
> %patch256 -p1
> +# pa-0.9.22-add-old-sink-and-source.patch
> +%patch257 -p1
> # >> setup
> # << setup
>
> @@ -895,6 +898,7 @@
> %fdupes %{buildroot}/%{_includedir}
>
>
> +
> %post -p /sbin/ldconfig
>
> %postun -p /sbin/ldconfig
> @@ -968,6 +972,8 @@
> %{_libdir}/pulse-%{pulseversion}/modules/module-alsa-sink.so
> %{_libdir}/pulse-%{pulseversion}/modules/module-alsa-source.so
> %{_libdir}/pulse-%{pulseversion}/modules/module-alsa-card.so
> +%{_libdir}/pulse-%{pulseversion}/modules/module-alsa-sink-old.so
> +%{_libdir}/pulse-%{pulseversion}/modules/module-alsa-source-old.so
> %{_libdir}/pulse-%{pulseversion}/modules/module-always-sink.so
> %{_libdir}/pulse-%{pulseversion}/modules/module-augment-properties.so
> %{_libdir}/pulse-%{pulseversion}/modules/module-bluetooth-device.so
>
> other changes:
> --------------
>
> ++++++ pa-0.9.22-add-old-sink-and-source.patch (new)
> --- pa-0.9.22-add-old-sink-and-source.patch
> +++ pa-0.9.22-add-old-sink-and-source.patch
> +diff -ruN b/src/Makefile.am c/src/Makefile.am
> +--- b/src/Makefile.am 2011-04-11 20:35:17.383078001 +0300
> ++++ c/src/Makefile.am 2011-04-12 15:34:38.291077944 +0300
> +@@ -1114,7 +1114,9 @@
> + libalsa-util.la \
> + module-alsa-sink.la \
> + module-alsa-source.la \
> +- module-alsa-card.la
> ++ module-alsa-card.la \
> ++ module-alsa-sink-old.la \
> ++ module-alsa-source-old.la
> +
> + dist_alsaprofilesets_DATA = \
> + modules/alsa/mixer/profile-sets/default.conf \
> +@@ -1303,6 +1305,8 @@
> + module-alsa-sink-symdef.h \
> + module-alsa-source-symdef.h \
> + module-alsa-card-symdef.h \
> ++ modules/alsa/module-alsa-sink-old-symdef.h \
> ++ modules/alsa/module-alsa-source-old-symdef.h \
> + module-coreaudio-detect-symdef.h \
> + module-coreaudio-device-symdef.h \
> + module-solaris-symdef.h \
> +@@ -1570,10 +1574,13 @@
> +
> + libalsa_util_la_SOURCES = \
> + modules/alsa/alsa-util.c modules/alsa/alsa-util.h \
> ++ modules/alsa/alsa-util-old.c modules/alsa/alsa-util-old.h \
> + modules/alsa/alsa-mixer.c modules/alsa/alsa-mixer.h \
> + modules/alsa/alsa-sink.c modules/alsa/alsa-sink.h \
> + modules/alsa/alsa-source.c modules/alsa/alsa-source.h \
> +- modules/reserve-wrap.c modules/reserve-wrap.h
> ++ modules/reserve-wrap.c modules/reserve-wrap.h \
> ++ modules/alsa/alsa-sink-old.c modules/alsa/alsa-sink-old.h \
> ++ modules/alsa/alsa-source-old.c modules/alsa/alsa-source-old.h
> + libalsa_util_la_LDFLAGS = -avoid-version
> + libalsa_util_la_LIBADD = $(MODULE_LIBADD) $(ASOUNDLIB_LIBS)
> + libalsa_util_la_CFLAGS = $(AM_CFLAGS) $(ASOUNDLIB_CFLAGS)
> +@@ -1611,6 +1618,16 @@
> + module_alsa_card_la_LIBADD = $(MODULE_LIBADD) $(ASOUNDLIB_LIBS)
> libalsa-util.la
> + module_alsa_card_la_CFLAGS = $(AM_CFLAGS) $(ASOUNDLIB_CFLAGS)
> +
> ++module_alsa_sink_old_la_SOURCES = modules/alsa/module-alsa-sink-old.c
> ++module_alsa_sink_old_la_LDFLAGS = $(MODULE_LDFLAGS)
> ++module_alsa_sink_old_la_LIBADD = $(AM_LIBADD) $(ASOUNDLIB_LIBS)
> libalsa-util.la libpulsecore- at PA_MAJORMINOR@.la
> libpulsecommon- at PA_MAJORMINOR@.la libpulse.la
> ++module_alsa_sink_old_la_CFLAGS = $(AM_CFLAGS) $(ASOUNDLIB_CFLAGS)
> ++
> ++module_alsa_source_old_la_SOURCES =
> modules/alsa/module-alsa-source-old.c
> ++module_alsa_source_old_la_LDFLAGS = $(MODULE_LDFLAGS)
> ++module_alsa_source_old_la_LIBADD = $(AM_LIBADD) $(ASOUNDLIB_LIBS)
> libalsa-util.la libpulsecore- at PA_MAJORMINOR@.la
> libpulsecommon- at PA_MAJORMINOR@.la libpulse.la
> ++module_alsa_source_old_la_CFLAGS = $(AM_CFLAGS)
> $(ASOUNDLIB_CFLAGS)
> ++
> + # Solaris
> +
> + module_solaris_la_SOURCES = modules/module-solaris.c
> +diff -ruN b/src/modules/alsa/alsa-mixer.c c/src/modules/alsa/alsa-mixer.c
> +--- b/src/modules/alsa/alsa-mixer.c 2011-04-11 20:35:17.385078001 +0300
> ++++ c/src/modules/alsa/alsa-mixer.c 2011-04-12 14:11:47.420078000 +0300
> +@@ -849,6 +849,37 @@
> + return i + db_fix->min_step;
> + }
> +
> ++/* Finds the closest (rounded up) item in db_fix->db_values and returns the
> ++ * corresponding register value. *db_value is replaced with the value from
> the
> ++ * db_values table. */
> ++static long decibel_fix_get_register_value(pa_alsa_decibel_fix *db_fix, long
> *db_value) {
> ++
> ++ /* Use binary search. */
> ++
> ++ unsigned l; /* "left" */
> ++ unsigned r; /* "right" */
> ++ unsigned p; /* "probe" */
> ++
> ++ pa_assert(db_fix);
> ++ pa_assert(db_value);
> ++
> ++ l = 0;
> ++ r = db_fix->max_register_value - db_fix->min_register_value;
> ++
> ++ while ((p = (r - l) / 2 + l) != r) {
> ++ if (db_fix->db_values[p] < *db_value)
> ++ l = p + 1;
> ++ else if (db_fix->db_values[p] > *db_value)
> ++ r = p;
> ++ else
> ++ break;
> ++ }
> ++
> ++ *db_value = db_fix->db_values[p];
> ++
> ++ return p + db_fix->min_register_value;
> ++}
> ++
> + static int element_set_volume(pa_alsa_element *e, snd_mixer_t *m, const
> pa_channel_map *cm, pa_cvolume *v, pa_bool_t write_to_hw) {
> +
> + snd_mixer_selem_id_t *sid;
> +@@ -3767,6 +3798,128 @@
> + pa_xfree(db_values);
> + }
> +
> ++pa_alsa_decibel_fix *pa_alsa_decibel_fix_parse(
> ++ const char *str,
> ++ pa_alsa_profile_set *ps,
> ++ const char *name,
> ++ const char *filename,
> ++ unsigned line) {
> ++
> ++ pa_alsa_decibel_fix *db_fix;
> ++ char **items;
> ++ char *item;
> ++ long *db_values;
> ++ unsigned n = 8; /* Current size of db_values (db_values is reallocated if
> the size gets too small). */
> ++ unsigned min_reg = 0;
> ++ unsigned max_reg = 0;
> ++ unsigned i = 0;
> ++ unsigned prev_reg = 0;
> ++ double prev_db = 0;
> ++
> ++ pa_assert(str);
> ++ pa_assert(ps);
> ++ pa_assert(name);
> ++
> ++ if (!(items = pa_split_spaces_strv(str))) {
> ++ pa_log("[%s:%u] Value missing", pa_strnull(filename), line);
> ++ return NULL;
> ++ }
> ++
> ++ db_values = pa_xnew(long, n);
> ++
> ++ while ((item = items[i++])) {
> ++ char *r = item; /* Register value string. */
> ++ char *d = item; /* dB value string. */
> ++ uint32_t reg;
> ++ double db;
> ++
> ++ /* Move d forward until it points to a colon or to the end of item. */
> ++ for (; *d && *d != ':'; ++d);
> ++
> ++ if (d == r) {
> ++ /* item started with colon. */
> ++ pa_log("[%s:%u] No register value found in %s",
> pa_strnull(filename), line, item);
> ++ goto fail;
> ++ }
> ++
> ++ if (!*d || !*(d + 1)) {
> ++ /* No colon found, or it was the last character in item. */
> ++ pa_log("[%s:%u] No dB value found in %s",
> pa_strnull(filename), line, item);
> ++ goto fail;
> ++ }
> ++
> ++ /* pa_atou() needs a null-terminating string. Let's replace the
> colon
> ++ * with a zero byte. */
> ++ *d++ = '\0';
> ++
> ++ if (pa_atou(r, ®) < 0) {
> ++ pa_log("[%s:%u] Invalid register value: %s",
> pa_strnull(filename), line, r);
> ++ goto fail;
> ++ }
> ++
> ++ if (pa_atod(d, &db) < 0) {
> ++ pa_log("[%s:%u] Invalid dB value: %s", pa_strnull(filename),
> line, d);
> ++ goto fail;
> ++ }
> ++
> ++ if (reg <= prev_reg && i != 1) {
> ++ pa_log("[%s:%u] Register value %u not greater than the
> previous value %u", pa_strnull(filename), line, reg, prev_reg);
> ++ goto fail;
> ++ }
> ++
> ++ if (db < prev_db && i != 1) {
> ++ pa_log("[%s:%u] Decibel value %0.2f less than the previous
> value %0.2f", pa_strnull(filename), line, db, prev_db);
> ++ goto fail;
> ++ }
> ++
> ++ if (i == 1) {
> ++ min_reg = reg;
> ++ db_values[0] = (long) (db * 100.0);
> ++ prev_reg = reg;
> ++ prev_db = db;
> ++ } else {
> ++ /* Interpolate linearly. */
> ++ double step = (db - prev_db) / (reg - prev_reg);
> ++
> ++ for (; prev_reg < reg; ++prev_reg, prev_db += step) {
> ++ if (prev_reg + 1 - min_reg == n) {
> ++ n *= 2;
> ++ db_values = pa_xrenew(long, db_values, n);
> ++ }
> ++
> ++ db_values[prev_reg + 1 - min_reg] = (long) ((prev_db +
> step) * 100.0);
> ++ }
> ++ }
> ++
> ++ max_reg = reg;
> ++ }
> ++
> ++ pa_assert(i > 1);
> ++
> (3852 more lines skipped)
>
> ++++++ pulseaudio.yaml
> --- pulseaudio.yaml
> +++ pulseaudio.yaml
> @@ -273,7 +273,7 @@
> - pa-0.9.22-desktop.patch
> - use-a2dp-profile-for-non-mfld.patch
> - fix-9972-auto-route-audio-to-bt-sink.patch
> -
> + - pa-0.9.22-add-old-sink-and-source.patch
>
> Description: |
> PulseAudio is a sound server for Linux and other Unix like operating
>
> _______________________________________________
> MeeGo-commits mailing list
> MeeGo-commits at meego.com
> http://lists.meego.com/listinfo/meego-commits
More information about the MeeGo-packaging
mailing list