From fc18ca229e6d10a9debc19dfc8ae17faaeadeb08c694ec0b4144968049582098 Mon Sep 17 00:00:00 2001 From: OBS User buildservice-autocommit Date: Thu, 10 Sep 2009 12:30:23 +0000 Subject: [PATCH] Updating link to change in openSUSE:Factory/alsa revision 78.0 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa?expand=0&rev=0f3d230817e4a1e8da3dfe4c45aa96af --- alsa-lib-git-fixes.diff | 149 ++++++++++++++++++++++++++++++++++++++++ alsa.changes | 4 +- alsa.spec | 9 ++- 3 files changed, 157 insertions(+), 5 deletions(-) create mode 100644 alsa-lib-git-fixes.diff diff --git a/alsa-lib-git-fixes.diff b/alsa-lib-git-fixes.diff new file mode 100644 index 0000000..79b3976 --- /dev/null +++ b/alsa-lib-git-fixes.diff @@ -0,0 +1,149 @@ +diff --git a/configure.in b/configure.in +index e96058b..3cd6366 100644 +--- a/configure.in ++++ b/configure.in +@@ -12,7 +12,7 @@ dnl add API = c+1:0:a+1 + dnl remove API = c+1:0:0 + dnl ************************************************* + AC_CANONICAL_HOST +-AM_INIT_AUTOMAKE(alsa-lib, 1.0.21) ++AM_INIT_AUTOMAKE(alsa-lib, 1.0.21a) + eval LIBTOOL_VERSION_INFO="2:0:0" + dnl ************************************************* + AM_CONDITIONAL(INSTALL_M4, test -n "${ACLOCAL}") +diff --git a/src/conf.c b/src/conf.c +index 3f0dfe1..570c90f 100644 +--- a/src/conf.c ++++ b/src/conf.c +@@ -3477,8 +3477,9 @@ int snd_config_hook_load_for_all_cards(snd_config_t *root, snd_config_t *config, + err = snd_determine_driver(card, &fdriver); + if (err < 0) + return err; +- if (snd_config_search(root, fdriver, &n) >= 0 && +- snd_config_get_string(n, &driver) >= 0) { ++ if (snd_config_search(root, fdriver, &n) >= 0) { ++ if (snd_config_get_string(n, &driver) < 0) ++ goto __err; + assert(driver); + while (1) { + char *s = strchr(driver, '.'); +diff --git a/src/conf/pcm/dmix.conf b/src/conf/pcm/dmix.conf +index 4108ddb..e62cb29 100644 +--- a/src/conf/pcm/dmix.conf ++++ b/src/conf/pcm/dmix.conf +@@ -63,12 +63,12 @@ pcm.!dmix { + name { + @func concat + strings [ +- "cards." ++ "defaults.dmix." + { + @func card_driver + card $CARD + } +- ".pcm.dmix.period_size" ++ ".period_size" + ] + } + default 1024 +@@ -78,12 +78,12 @@ pcm.!dmix { + name { + @func concat + strings [ +- "cards." ++ "defaults.dmix." + { + @func card_driver + card $CARD + } +- ".pcm.dmix.period_time" ++ ".period_time" + ] + } + default -1 +@@ -93,12 +93,12 @@ pcm.!dmix { + name { + @func concat + strings [ +- "cards." ++ "defaults.dmix." + { + @func card_driver + card $CARD + } +- ".pcm.dmix.periods" ++ ".periods" + ] + } + default 16 +diff --git a/src/mixer/simple_none.c b/src/mixer/simple_none.c +index 4802200..9259a08 100644 +--- a/src/mixer/simple_none.c ++++ b/src/mixer/simple_none.c +@@ -134,6 +134,7 @@ static int get_compare_weight(const char *name, unsigned int idx) + static const char *const names[] = { + "Master", + "Headphone", ++ "Speaker", + "Tone", + "Bass", + "Treble", +@@ -158,6 +159,7 @@ static int get_compare_weight(const char *name, unsigned int idx) + "I2S", + "IEC958", + "PC Speaker", ++ "Beep", + "Aux", + "Mono", + "Playback", +diff --git a/src/pcm/pcm_params.c b/src/pcm/pcm_params.c +index 80b3fd2..0e1c3fc 100644 +--- a/src/pcm/pcm_params.c ++++ b/src/pcm/pcm_params.c +@@ -1081,6 +1081,7 @@ int snd_pcm_hw_param_never_eq(const snd_pcm_hw_params_t *params, + static int snd_pcm_hw_params_choose(snd_pcm_t *pcm, snd_pcm_hw_params_t *params) + { + int err; ++ const char *compat = getenv("LIBASOUND_COMPAT"); + #ifdef CHOOSE_DEBUG + snd_output_t *log; + snd_output_stdio_attach(&log, stderr, 0); +@@ -1103,15 +1104,29 @@ static int snd_pcm_hw_params_choose(snd_pcm_t *pcm, snd_pcm_hw_params_t *params) + err = snd_pcm_hw_param_set_first(pcm, params, SND_PCM_HW_PARAM_RATE, NULL, 0); + if (err < 0) + return err; +- err = snd_pcm_hw_param_set_first(pcm, params, SND_PCM_HW_PARAM_PERIOD_TIME, NULL, 0); +- if (err < 0) +- return err; +- err = snd_pcm_hw_param_set_first(pcm, params, SND_PCM_HW_PARAM_PERIOD_SIZE, NULL, 0); +- if (err < 0) +- return err; +- err = snd_pcm_hw_param_set_last(pcm, params, SND_PCM_HW_PARAM_BUFFER_SIZE, NULL, 0); +- if (err < 0) +- return err; ++ if (compat && *compat) { ++ /* old mode */ ++ err = snd_pcm_hw_param_set_first(pcm, params, SND_PCM_HW_PARAM_PERIOD_TIME, NULL, 0); ++ if (err < 0) ++ return err; ++ err = snd_pcm_hw_param_set_first(pcm, params, SND_PCM_HW_PARAM_PERIOD_SIZE, NULL, 0); ++ if (err < 0) ++ return err; ++ err = snd_pcm_hw_param_set_last(pcm, params, SND_PCM_HW_PARAM_BUFFER_SIZE, NULL, 0); ++ if (err < 0) ++ return err; ++ } else { ++ /* determine buffer size first */ ++ err = snd_pcm_hw_param_set_last(pcm, params, SND_PCM_HW_PARAM_BUFFER_SIZE, NULL, 0); ++ if (err < 0) ++ return err; ++ err = snd_pcm_hw_param_set_first(pcm, params, SND_PCM_HW_PARAM_PERIOD_SIZE, NULL, 0); ++ if (err < 0) ++ return err; ++ err = snd_pcm_hw_param_set_first(pcm, params, SND_PCM_HW_PARAM_PERIOD_TIME, NULL, 0); ++ if (err < 0) ++ return err; ++ } + err = snd_pcm_hw_param_set_first(pcm, params, SND_PCM_HW_PARAM_TICK_TIME, NULL, 0); + if (err < 0) + return err; diff --git a/alsa.changes b/alsa.changes index 2130130..3aaa63c 100644 --- a/alsa.changes +++ b/alsa.changes @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8e2b04d3e53157d93e95f7f77a13c9d45a9e55ffdbd271d8d29cf878ca4b5c77 -size 136207 +oid sha256:c1b504ce35a278888c0a2b77bcaa34f3d20e9d5c08892d4c19612222647ca100 +size 136695 diff --git a/alsa.spec b/alsa.spec index a88b225..bc5c1c3 100644 --- a/alsa.spec +++ b/alsa.spec @@ -34,7 +34,7 @@ Obsoletes: alsa-64bit # Summary: Advanced Linux Sound Architecture Version: 1.0.21 -Release: 1 +Release: 2 Source: ftp://ftp.alsa-project.org/pub/lib/alsa-lib-%{package_version}.tar.bz2 Source8: 40-alsa.rules Source11: alsasound @@ -50,7 +50,7 @@ Source31: all_notes_off.bin Source32: all_notes_off.mid Source33: alsa-info.sh Source34: alsa-init.sh -# Patch: alsa-lib-git-fixes.diff +Patch: alsa-lib-git-fixes.diff Url: http://www.alsa-project.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -91,6 +91,9 @@ Authors: Summary: Additional Package Documentation Group: Documentation/Other License: GPL v2 or later +%if %suse_version > 1110 +BuildArch: noarch +%endif %description docs This package contains optional documentation provided in addition to @@ -122,7 +125,7 @@ Authors: %prep %setup -q -n alsa-lib-%{package_version} -# %patch -p1 +%patch -p1 # hack to fix build on older distros %if %suse_version < 1100 %ifarch %ix86