[meego-commits] 6048: Changes to Trunk:Testing/alsa-plugins

Lisa Yue ling.yue at intel.com
Wed Jul 28 10:05:55 UTC 2010


Hi,
I have made the following changes to alsa-plugins in project Trunk:Testing. Please review and accept ASAP.

Thank You,
Lisa Yue

[This message was auto-generated]

---

Request #6048:

  submit:   home:lisayue:branches:Trunk:Testing/alsa-plugins(r7)(cleanup) -> Trunk:Testing/alsa-plugins


Message:
    * Mon Jul 26 2010 Ling Yue <ling.yue at intel.com> - 1.0.23
- Upgrade to 1.0.23
- Use spectacle

State:   new          2010-07-27T21:59:04 lisayue
Comment: None



changes files:
--------------
--- alsa-plugins.changes
+++ alsa-plugins.changes
@@ -0,0 +1,4 @@
+* Mon Jul 26 2010 Ling Yue <ling.yue at intel.com> - 1.0.23
+- Upgrade to 1.0.23
+- Use spectacle
+

old:
----
  alsa-plugins-1.0.22.tar.bz2
  jack.conf
  pcm-oss.conf

new:
----
  alsa-plugins-1.0.23.tar.bz2
  alsa-plugins.yaml

spec files:
-----------
--- alsa-plugins.spec
+++ alsa-plugins.spec
@@ -1,21 +1,27 @@
-#define		prever		rc3
-#define		prever_dot	.%{prever}
+# 
+# Do not Edit! Generated by:
+# spectacle version 0.18
+# 
+# >> macros
+# << macros
 
 Name:           alsa-plugins
-Version:        1.0.22
-Release:        1%{?prever_dot}
 Summary:        The Advanced Linux Sound Architecture (ALSA) Plugins
-License:        GPLv2+ and LGPLv2+
+Version:    1.0.23
+Release:    1
 Group:          System/Libraries
+License:    GPLv2+ and LGPLv2+
 URL:            http://www.alsa-project.org/
-Source0:        ftp://ftp.alsa-project.org/pub/plugins/%{name}-%{version}%{?prever}.tar.bz2
-Source4:        samplerate.conf
-Source5:        upmix.conf
-Source6:        vdownmix.conf
-Source7:        pulse-default.conf
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Source0:    ftp://ftp.alsa-project.org/pub/plugins/%{name}-%{version}.tar.bz2
+Source1:    samplerate.conf
+Source2:    upmix.conf
+Source3:    vdownmix.conf
+Source4:    pulse-default.conf
+Source100:  alsa-plugins.yaml
+BuildRequires:  pkgconfig(alsa)
+BuildRequires:  pkgconfig(libpulse)
+BuildRequires:  pkgconfig(samplerate)
 
-BuildRequires:  alsa-lib-devel
 
 %description
 The Advanced Linux Sound Architecture (ALSA) provides audio and MIDI
@@ -23,97 +29,146 @@
 This package includes plugins for ALSA.
 
 
+
 %package pulseaudio
-BuildRequires:  pkgconfig(libpulse)
-Requires:       pulseaudio
 Summary:        Alsa to PulseAudio backend
-Group:          System/Libraries
 License:        LGPLv2+
+Group:      System/Libraries
+Requires:   pulseaudio
+
 %description pulseaudio
 This plugin allows any program that uses the ALSA API to access a PulseAudio
 sound daemon. In other words, native ALSA applications can play and record
 sound across a network. There are two plugins in the suite, one for PCM and
 one for mixer control.
 
+
 %package samplerate
-BuildRequires:  libsamplerate-devel
 Summary:        External rate converter plugin for ALSA
-Group:          System/Libraries
 License:        GPLv2+
+Group:      System/Libraries
+
 %description samplerate
 This plugin is an external rate converter using libsamplerate by Erik de
 Castro Lopo.
 
+
 %package upmix
-BuildRequires:  libsamplerate-devel
 Summary:        Upmixer channel expander plugin for ALSA
-Group:          System/Libraries
 License:        LGPLv2+
+Group:      System/Libraries
+
 %description upmix
 The upmix plugin is an easy-to-use plugin for upmixing to 4 or
 6-channel stream.  The number of channels to be expanded is determined
 by the slave PCM or explicitly via channel option.
 
+
 %package vdownmix
-BuildRequires:  libsamplerate-devel
 Summary:        Downmixer to stereo plugin for ALSA
-Group:          System/Libraries
 License:        LGPLv2+
+Group:      System/Libraries
+
 %description vdownmix
 The vdownmix plugin is a downmixer from 4-6 channels to 2-channel
 stereo headphone output.  This plugin processes the input signals with
 a simple spacialization, so the output sounds like a kind of "virtual
 surround".
 
+
 %package usbstream
 Summary:        USB stream plugin for ALSA
-Group:          System/Libraries
 License:        LGPLv2+
+Group:      System/Libraries
+
 %description usbstream
 The usbstream plugin is for snd-usb-us122l driver. It converts PCM
 stream to USB specific stream.
 
+
+
 %prep
-%setup -q -n %{name}-%{version}%{?prever}
+%setup -q -n %{name}-%{version}
+
+# >> setup
+# << setup
 
 %build
-%configure --disable-static --without-speex
-make %{?_smp_mflags}
+# >> build pre
+# << build pre
 
+%configure --disable-static \
+    --without-speex
+
+make %{?jobs:-j%jobs}
+
+# >> build post
+# << build post
 %install
+rm -rf %{buildroot}
+# >> install pre
+# << install pre
 %make_install
 
+# >> install post
+
 install -d ${RPM_BUILD_ROOT}%{_sysconfdir}/alsa/pcm
-install -m 644 %SOURCE7 \
-                   ${RPM_BUILD_ROOT}%{_sysconfdir}/alsa
-install -m 644  %SOURCE4 %SOURCE5 %SOURCE6 \
-                   ${RPM_BUILD_ROOT}%{_sysconfdir}/alsa/pcm
+install -m 644 %SOURCE4 \
+${RPM_BUILD_ROOT}%{_sysconfdir}/alsa
+install -m 644  %SOURCE1 %SOURCE2 %SOURCE3 \
+${RPM_BUILD_ROOT}%{_sysconfdir}/alsa/pcm
 
 
 # Removing the maemo plugins
 find $RPM_BUILD_ROOT \( -name libasound_module_ctl_dsp_ctl.so -o \
-                        -name *_oss.so -o \
-                        -name libasound_module_pcm_alsa_dsp.so \) -exec rm {} \;
+-name *_oss.so -o \
+-name libasound_module_pcm_alsa_dsp.so \) -exec rm {} \;
+
+# << install post
+
+
+
+%post
+# >> post
+/sbin/ldconfig
+# << post
+
+%postun
+# >> postun
+/sbin/ldconfig
+# << postun
+
+
+
+
+
+
+
+
+
+
+
+
+
 
-%clean
-rm -rf $RPM_BUILD_ROOT
 
-%post -p /sbin/ldconfig
 
-%postun -p /sbin/ldconfig
 
 
 
 %files pulseaudio
 %defattr(-,root,root,-)
+# >> files pulseaudio
 %doc COPYING COPYING.GPL doc/README-pulse
 %config(noreplace) %{_sysconfdir}/alsa/pulse-default.conf
 %{_libdir}/alsa-lib/libasound_module_pcm_pulse.so
 %{_libdir}/alsa-lib/libasound_module_ctl_pulse.so
 %{_libdir}/alsa-lib/libasound_module_conf_pulse.so
+# << files pulseaudio
 
 %files samplerate
 %defattr(-,root,root,-)
+# >> files samplerate
 %doc COPYING COPYING.GPL doc/samplerate.txt
 %config(noreplace) %{_sysconfdir}/alsa/pcm/samplerate.conf
 %{_libdir}/alsa-lib/libasound_module_ctl_arcam_av.so
@@ -122,21 +177,28 @@
 %{_libdir}/alsa-lib/libasound_module_rate_samplerate_linear.so
 %{_libdir}/alsa-lib/libasound_module_rate_samplerate_medium.so
 %{_libdir}/alsa-lib/libasound_module_rate_samplerate_order.so
+# << files samplerate
 
 %files upmix
 %defattr(-,root,root,-)
+# >> files upmix
 %doc COPYING COPYING.GPL doc/upmix.txt
 %config(noreplace) %{_sysconfdir}/alsa/pcm/upmix.conf
 %{_libdir}/alsa-lib/libasound_module_pcm_upmix.so
+# << files upmix
 
 %files vdownmix
 %defattr(-,root,root,-)
+# >> files vdownmix
 %doc COPYING COPYING.GPL doc/vdownmix.txt
 %config(noreplace) %{_sysconfdir}/alsa/pcm/vdownmix.conf
 %{_libdir}/alsa-lib/libasound_module_pcm_vdownmix.so
+# << files vdownmix
 
 %files usbstream
 %defattr(-,root,root,-)
+# >> files usbstream
 %doc COPYING COPYING.GPL
 %{_libdir}/alsa-lib/libasound_module_pcm_usb_stream.so
+# << files usbstream
 

other changes:
--------------

++++++ alsa-plugins-1.0.22.tar.bz2 -> alsa-plugins-1.0.23.tar.bz2
--- configure
+++ configure
@@ -2302,7 +2302,7 @@
 
 # Define the identity of the package.
  PACKAGE=alsa-plugins
- VERSION=1.0.22
+ VERSION=1.0.23
 
 
 cat >>confdefs.h <<_ACEOF
--- configure.in
+++ configure.in
@@ -1,6 +1,6 @@
 AC_PREREQ(2.59)
 AC_INIT(oss/pcm_oss.c)
-AM_INIT_AUTOMAKE(alsa-plugins, 1.0.22)
+AM_INIT_AUTOMAKE(alsa-plugins, 1.0.23)
 AC_PREFIX_DEFAULT(/usr)
 
 AC_CONFIG_HEADERS(config.h)
--- usb_stream/pcm_usb_stream.c
+++ usb_stream/pcm_usb_stream.c
@@ -1,7 +1,7 @@
 /*
  *  PCM - USB_STREAM plugin
  *
- *  Copyright (c) 2008 by Karsten Wiese <fzu at wemgehoertderstaat.de>
+ *  Copyright (c) 2008, 2010 by Karsten Wiese <fzu at wemgehoertderstaat.de>
  *
  * This library is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as
@@ -48,6 +48,8 @@
 #define VDBG(f, ...)
 #endif
 
+#define FRAME_SIZE 6
+
 #define LCARD 32
 struct user_usb_stream {
 	char			card[LCARD];
@@ -70,6 +72,8 @@
 	unsigned		periods_done;
 
 	unsigned 		channels;
+	snd_pcm_uframes_t	period_size;
+	unsigned int		rate;
 } snd_pcm_us_t;
 
 static struct user_usb_stream *uus;
@@ -177,7 +181,7 @@
 	VDBG("");
 
 	us_cfg.version = USB_STREAM_INTERFACE_VERSION;
-	us_cfg.frame_size = 6;
+	us_cfg.frame_size = FRAME_SIZE;
 	us_cfg.sample_rate = io->rate;
 	us_cfg.period_frames = io->period_size;
 
@@ -256,8 +260,11 @@
 static int snd_pcm_us_stop(snd_pcm_ioplug_t *io)
 {
 	snd_pcm_us_t *us = io->private_data;
-	VDBG("%u", us->uus->s->periods_done);
 
+	if (!us->uus->s)
+	  return 0;
+
+	VDBG("%u", us->uus->s->periods_done);
 	if (io->stream == SND_PCM_STREAM_PLAYBACK)
 		memset(us->uus->write_area, 0, us->uus->s->write_size);
 
@@ -370,6 +377,10 @@
 	};
 
 	int err;
+	unsigned int rate_min = us->rate ? us->rate : 44100,
+		rate_max = us->rate ? us->rate : 96000,
+		period_bytes_min = us->period_size ? FRAME_SIZE * us->period_size : 128,
+		period_bytes_max = us->period_size ? FRAME_SIZE * us->period_size : 64*4096;
 
 	if ((err = snd_pcm_ioplug_set_param_list(&us->io, SND_PCM_IOPLUG_HW_ACCESS,
 						 ARRAY_SIZE(access_list), access_list)) < 0 ||
@@ -378,9 +389,9 @@
 	    (err = snd_pcm_ioplug_set_param_minmax(&us->io, SND_PCM_IOPLUG_HW_CHANNELS,
 						   us->channels, us->channels)) < 0 ||
 	    (err = snd_pcm_ioplug_set_param_minmax(&us->io, SND_PCM_IOPLUG_HW_RATE,
-						   44100, 96000)) < 0 ||
+						   rate_min, rate_max)) < 0 ||
 	    (err = snd_pcm_ioplug_set_param_minmax(&us->io, SND_PCM_IOPLUG_HW_PERIOD_BYTES,
-						   128, 64*4096)) < 0 ||
+						   period_bytes_min, period_bytes_max)) < 0 ||
 	    (err = snd_pcm_ioplug_set_param_minmax(&us->io, SND_PCM_IOPLUG_HW_PERIODS,
 						   2, 2)) < 0)
 		return err;
@@ -390,7 +401,9 @@
 
 static int snd_pcm_us_open(snd_pcm_t **pcmp, const char *name,
 				   const char *card,
-				   snd_pcm_stream_t stream, int mode)
+				   snd_pcm_stream_t stream, int mode,
+				   snd_pcm_uframes_t period_size,
+				   unsigned int rate)
 {
 	snd_pcm_us_t *us;
 	int err;
@@ -421,6 +434,8 @@
 	snd_hwdep_poll_descriptors(us->hwdep, &us->pfd, 1);
 
 	us->channels = 2;
+	us->period_size = period_size;
+	us->rate = rate;
 
 	us->io.version = SND_PCM_IOPLUG_VERSION;
 	us->io.name = "ALSA <-> USB_STREAM PCM I/O Plugin";
@@ -455,6 +470,7 @@
 	snd_config_iterator_t i, next;
 	const char *card;
 	int err;
+	long period_size = 0, rate = 0;
 	
 	snd_config_for_each(i, next, conf) {
 		snd_config_t *n = snd_config_iterator_entry(i);
@@ -472,11 +488,27 @@
 			snd_config_get_string(n, &card);
 			continue;
 		}
+		if (strcmp(id, "period_size") == 0) {
+			if (snd_config_get_type(n) != SND_CONFIG_TYPE_INTEGER) {
+				SNDERR("Invalid type for %s", id);
+				return -EINVAL;
+			}
+			snd_config_get_integer(n, &period_size);
+			continue;
+		}
+		if (strcmp(id, "rate") == 0) {
+			if (snd_config_get_type(n) != SND_CONFIG_TYPE_INTEGER) {
+				SNDERR("Invalid type for %s", id);
+				return -EINVAL;
+			}
+			snd_config_get_integer(n, &rate);
+			continue;
+		}
 		SNDERR("Unknown field %s", id);
 		return -EINVAL;
 	}
 
-	err = snd_pcm_us_open(pcmp, name, card, stream, mode);
+	err = snd_pcm_us_open(pcmp, name, card, stream, mode, period_size, rate);
 
 	return err;
 }
--- version
+++ version
@@ -1 +1 @@
-1.0.22
+1.0.23

++++++ alsa-plugins.yaml (new)
--- alsa-plugins.yaml
+++ alsa-plugins.yaml
+Name: alsa-plugins
+Summary: The Advanced Linux Sound Architecture (ALSA) Plugins
+Version: 1.0.23
+Release: 1
+Group: System/Libraries
+License: GPLv2+ and LGPLv2+
+URL: http://www.alsa-project.org/
+Sources:
+    - ftp://ftp.alsa-project.org/pub/plugins/%{name}-%{version}.tar.bz2
+    - samplerate.conf
+    - upmix.conf
+    - vdownmix.conf
+    - pulse-default.conf
+Description: |
+    The Advanced Linux Sound Architecture (ALSA) provides audio and MIDI
+    functionality to the Linux operating system.
+    This package includes plugins for ALSA.
+
+PkgConfigBR:
+    - alsa
+    - libpulse
+    - samplerate
+Configure: configure
+ConfigOptions:
+    - --without-speex
+Builder: make
+NoFiles: Yes
+SubPackages:
+
+    - Name: pulseaudio
+      Summary: Alsa to PulseAudio backend
+      Group: System/Libraries
+      License: LGPLv2+
+      Description: |
+          This plugin allows any program that uses the ALSA API to access a PulseAudio
+          sound daemon. In other words, native ALSA applications can play and record
+          sound across a network. There are two plugins in the suite, one for PCM and
+          one for mixer control.
+      Requires:
+          - pulseaudio
+
+    - Name: samplerate
+      Summary: External rate converter plugin for ALSA
+      Group: System/Libraries
+      License: GPLv2+
+      Description: |
+          This plugin is an external rate converter using libsamplerate by Erik de
+          Castro Lopo.
+
+
+    - Name: upmix
+      Summary: Upmixer channel expander plugin for ALSA
+      Group: System/Libraries
+      License: LGPLv2+
+      Description: |
+          The upmix plugin is an easy-to-use plugin for upmixing to 4 or
+          6-channel stream.  The number of channels to be expanded is determined
+          by the slave PCM or explicitly via channel option.
+
+    - Name: vdownmix
+      Summary: Downmixer to stereo plugin for ALSA
+      Group: System/Libraries
+      License: LGPLv2+
+      Description: |
+          The vdownmix plugin is a downmixer from 4-6 channels to 2-channel
+          stereo headphone output.  This plugin processes the input signals with
+          a simple spacialization, so the output sounds like a kind of "virtual
+          surround".
+    - Name: usbstream
+      Summary: USB stream plugin for ALSA
+      Group: System/Libraries
+      License: LGPLv2+
+      Description: |
+          The usbstream plugin is for snd-usb-us122l driver. It converts PCM
+          stream to USB specific stream.
+

++++++ deleted files:
--- jack.conf
--- pcm-oss.conf



More information about the MeeGo-commits mailing list