]> git.alsa-project.org Git - alsa-plugins.git/log
alsa-plugins.git
7 years agojack: Use boundary as hw_ptr wrap around
Timo Wischer [Fri, 23 Feb 2018 14:18:08 +0000 (15:18 +0100)]
jack: Use boundary as hw_ptr wrap around

instead of using buffer_size as wrap around.

This is required to detect Xruns.

It is also required to allow the JACK thread
to processes the whole ALSA audio buffer at once
without calling snd_pcm_avail_update() in between.

For example when the hw_ptr will be updated with
hw_ptr += buffer_size
and it is using the buffer_size as wrap around
hw_ptr %= buffer_size
would result in the same value as before the add operation.

Due to that the user application would not recognize
that the complete audio buffer was copied.

Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 years agojack: Write only valid values to the internal hw_ptr
Timo Wischer [Mon, 22 Jan 2018 08:37:20 +0000 (09:37 +0100)]
jack: Write only valid values to the internal hw_ptr

Otherwise the ALSA thread could for example read a hw_ptr >
buffer_size

Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
7 years agoChange FSF address (Franklin Street)
Jaroslav Kysela [Tue, 14 Nov 2017 13:40:56 +0000 (14:40 +0100)]
Change FSF address (Franklin Street)

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
7 years agoRelease v1.1.5 v1.1.5
Jaroslav Kysela [Tue, 14 Nov 2017 07:52:10 +0000 (08:52 +0100)]
Release v1.1.5

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
8 years agopulse: prevent double-free when pulse_hw_constraint returns error
Kui Wang [Thu, 13 Jul 2017 19:33:05 +0000 (19:33 +0000)]
pulse: prevent double-free when pulse_hw_constraint returns error

When pulse_hw_constraint returns error, snd_pcm_ioplug_delete() is called.
It will then call pulse_close() where "snd_pcm_pulse_t *pcm" will be free.
Then if goto the "error" label, the "snd_pcm_pulse_t *pcm" will be double-free.

To prevent this, just jump over the code which might cause double-free.

Signed-off-by: Kui Wang <wangkuisuper@hotmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
8 years agoRelease v1.1.4 v1.1.4
Jaroslav Kysela [Fri, 12 May 2017 08:01:45 +0000 (10:01 +0200)]
Release v1.1.4

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
8 years agoconfigure: Fix detection of avcodec.h
Takashi Iwai [Wed, 3 May 2017 10:50:03 +0000 (12:50 +0200)]
configure: Fix detection of avcodec.h

Signed-off-by: Takashi Iwai <tiwai@suse.de>
8 years agoconfigure: enhancing configuration support for alsa plugins
Mounesh Sutar [Fri, 17 Feb 2017 07:24:19 +0000 (12:54 +0530)]
configure: enhancing configuration support for alsa plugins

Following plugins are made configurable in alsa-plugins:
* oss
* mix
* usbstream
* arcamav
* speexdsp

Signed-off-by: Mikhail Durnev <mikhail_durnev@mentor.com>
Signed-off-by: Mounesh Sutar <mounesh_sutar@mentor.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoRelease v1.1.1 v1.1.1
Jaroslav Kysela [Thu, 31 Mar 2016 13:11:29 +0000 (15:11 +0200)]
Release v1.1.1

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
9 years agoa52: Fix usage of obsoleted avcodec_*_frame() functions
Daniel Kirchner [Wed, 9 Mar 2016 08:17:09 +0000 (09:17 +0100)]
a52: Fix usage of obsoleted avcodec_*_frame() functions

pcm_a52.c uses avcodec_alloc_frame and avcodec_free_frame that have
been replaced by av_frame_alloc and av_frame_free in recent versions
of libavcodec.  The following patch should fix this while remaining
backwards compatible.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoa52: Make compatible with ffmpeg 3.0
Anatol Pomozov [Tue, 16 Feb 2016 01:49:22 +0000 (17:49 -0800)]
a52: Make compatible with ffmpeg 3.0

audioconvert.h has been deprecated a while ago and got removed in
ffmpeg 3.0 (commit 2d40968dd3ff17b12f7).

Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agopph: include config.h from rate_speexrate.c
Tanu Kaskinen [Wed, 27 Jan 2016 11:45:51 +0000 (13:45 +0200)]
pph: include config.h from rate_speexrate.c

Fixes compilation against libspeexdsp 1.2rc3.

rate_speexrate.c includes speex_resampler.h, which depends on config.h
by referencing the HAVE_SPEEX_SPEEXDSP_TYPES_H macro. AFAIK it's not
a good idea to include config.h from headers (I don't know/remember
why, though), which is why I include config.h from rate_speexrate.c
instead of speex_resampler.h.

Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoa52: fix reported input channel order
Tom Yan [Tue, 12 Jan 2016 07:57:39 +0000 (15:57 +0800)]
a52: fix reported input channel order

a52 plugin expects the input to be in ALSA order and remaps it to general order when encoding. However it reports that the input it takes should be in general order.

This fix should make programs (e.g. mpv) that is aware of channel layout reported by ALSA remap sources appropriately before sending when necessary.

It should not cause any regression to programs (e.g. mplayer) that does not check the reported channel layout (hence not affected by the issue) and remaps sources anyway.

Signed-off-by: Tom Yan <tom.ty89@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agospeex: Add missing include config.h
Takashi Iwai [Mon, 9 Nov 2015 10:53:22 +0000 (11:53 +0100)]
speex: Add missing include config.h

Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoRelease v1.1.0 v1.1.0
Jaroslav Kysela [Tue, 27 Oct 2015 13:34:06 +0000 (14:34 +0100)]
Release v1.1.0

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
10 years agojack: Fixing a small memory leak
Valentin Corfu [Tue, 11 Aug 2015 06:37:14 +0000 (09:37 +0300)]
jack: Fixing a small memory leak

A small memory leak can be observed when using alsa-plugins (jack).
Check the following valgrind log:
...
==1034== 8 bytes in 1 blocks are definitely lost in loss record 7 of 108
==1034==    at 0x4027E5A: calloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==1034==    by 0x4035102: snd_pcm_jack_prepare (in /usr/lib/alsa-lib/libasound_module_pcm_jack.so)
==1034==    by 0x40D07AB: snd_pcm_ioplug_prepare (pcm_ioplug.c:145)
==1034==    by 0x4084961: snd_pcm_prepare (pcm.c:1052)
==1034==    by 0x409DDB4: snd_pcm_plugin_prepare (pcm_plugin.c:162)
==1034==    by 0x4084961: snd_pcm_prepare (pcm.c:1052)
==1034==    by 0x409DDB4: snd_pcm_plugin_prepare (pcm_plugin.c:162)
==1034==    by 0x4084961: snd_pcm_prepare (pcm.c:1052)
==1034==    by 0x4084A1D: snd_pcm_hw_params (pcm.c:838)
==1034==    by 0x4090013: snd_pcm_set_params (pcm.c:8053)
==1034==    by 0x80486EB: main (in /root/pcm_min_ok)
...
==1034== LEAK SUMMARY:
==1034==    definitely lost: 8 bytes in 1 blocks
==1034==    indirectly lost: 0 bytes in 0 blocks
==1034==      possibly lost: 31,311 bytes in 1,630 blocks
==1034==    still reachable: 5,619 bytes in 24 blocks
==1034==         suppressed: 0 bytes in 0 blocks
...

Signed-off-by: Valentin Corfu <corfuvalentin@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agopph: Fix build with older speex
Takashi Iwai [Thu, 9 Jul 2015 14:08:59 +0000 (16:08 +0200)]
pph: Fix build with older speex

The previous commit fixed the build of the recent speexdsp, but it
also broke the build with the old library.  Actually the only needed
change is the inclusion of speex/speex_types.h instead of
speex/speexdsp_types.h, so it can be easily worked around via the
check in configure script.

Along with this change, make the version check back to 1.2 from
1.2rc2, as 1.2rc1 works fine now again, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agopph: include speexdsp_types.h, not speex_types.h
Tanu Kaskinen [Thu, 9 Jul 2015 09:43:29 +0000 (12:43 +0300)]
pph: include speexdsp_types.h, not speex_types.h

Speexdsp was separated from speex in 1.2rc2. speex_types.h is not
shipped by speexdsp, so alsa-plugins shouldn't use that file. speexdsp
has speexdsp_types.h, which has the same contents as speex_types.h.

speexdsp_types.h is a new file introduced in 1.2rc2, so this change
bumps the minimum supported speexdsp version. The version check in
configure.ac will actually break if speexdsp 1.2 ever gets released,
because pkg-config thinks that "1.2" < "1.2rc2", but I think it's
useful to fail if the installed speexdsp version is 1.2rc1 (which I
believe is very common on current distributions). If a non-rc version
of speexdsp will ever get released, I hope version number 1.2 will be
skipped for this reason. (A non-rc version seems unlikely, since
1.2rc1 was released years ago, so it's pretty likely that the project
is stuck on so called "release candidates" forever...)

Signed-off-by: Tanu Kaskinen <tanu.kaskinen@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoarcam-av: Include sys/select.h for fd_set definition
Khem Raj [Fri, 29 May 2015 22:38:49 +0000 (15:38 -0700)]
arcam-av: Include sys/select.h for fd_set definition

fixes build errors on non-glibc based systems

arcam-av/arcam_av.c:389:2: error: unknown type name 'fd_set'

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agopulse: Add 24 bit data formats to Pulse plugin.
Alex Wiggins [Tue, 12 May 2015 00:09:34 +0000 (01:09 +0100)]
pulse: Add 24 bit data formats to Pulse plugin.

Signed-off-by: Alex Wiggins <alex.d.wiggins@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoa52: Fix ioplug version ifdef checks
Takashi Iwai [Wed, 18 Mar 2015 16:08:57 +0000 (17:08 +0100)]
a52: Fix ioplug version ifdef checks

SND_PCM_IOPLUG_VERSION must be checked with 0x10002, not 0x102.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agomix: Fix extplug version ifdef checks
Takashi Iwai [Wed, 18 Mar 2015 16:05:16 +0000 (17:05 +0100)]
mix: Fix extplug version ifdef checks

SND_PCM_EXTPLUG_VERSION must be checked with 0x10002, not 0x102.

Reported-by: Ethan Grammatikidis <eekee57@fastmail.fm>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agorate: Allow LGPL for libsamplerate commercial licensee
Takashi Iwai [Thu, 12 Mar 2015 08:13:44 +0000 (09:13 +0100)]
rate: Allow LGPL for libsamplerate commercial licensee

alsa-plugins-rate is tagged with GPL just for following the license of
libsamplerate.  However, libsamplerate provides a commercial license
to allow it used with less restrictions.  In that case, we also don't
have to stick with GPL.  Instead, the code follows LGPL like other
plugin codes in this package.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoRelease v1.0.29 v1.0.29
Jaroslav Kysela [Thu, 26 Feb 2015 12:38:07 +0000 (13:38 +0100)]
Release v1.0.29

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
10 years agoa52: Ignore start request if we're already running
David Henningsson [Wed, 12 Nov 2014 14:55:43 +0000 (15:55 +0100)]
a52: Ignore start request if we're already running

When trying to start a PCM that's already running, the result is EBADFD.
We might have implicitly started the buffer by filling it up,
so just ignore this request if we're already running.

Reported-by: Chow Loong Jin <hyperair@ubuntu.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agojack: Restore PID to jack client name when not specified explicitly
Branan Purvine-Riley [Fri, 8 Aug 2014 21:31:06 +0000 (14:31 -0700)]
jack: Restore PID to jack client name when not specified explicitly

Commit 14190cd8 added a facility to explicitly name Jack clients with
a 'name' option, but did so in a way that was not fully
backwards-compatible with older versions of the alsa-plugins. There
were two issues:

1. Re-using the magical "name" variable, which comes preloaded with
the name of the PCM

2. The code assumed snd_config_get_string sets a variable to NULL if
the config entry does not exist. Instead, this function leaves the
variable unchanged.

The result of these two errors meant that the PCM name would be
treated as if it were a user-defined name, and the old code which
embedded the PID would never be run

This code uses a completely new variable to store the explicitly-set
client name, so that the two code paths no longer collide.

[fixed trivial coding style issues by tiwai]

Signed-off-by: Branan Purvine-Riley <branan@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoRelease v1.0.28 v1.0.28
Jaroslav Kysela [Thu, 12 Jun 2014 09:32:45 +0000 (11:32 +0200)]
Release v1.0.28

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
11 years agoModernize configure.ac
Jaroslav Kysela [Thu, 12 Jun 2014 09:32:35 +0000 (11:32 +0200)]
Modernize configure.ac

11 years agojack: fix polling and recovering
Sergey [Mon, 26 May 2014 03:54:05 +0000 (07:54 +0400)]
jack: fix polling and recovering

This patch fixes polling in alsa-to-jack plugin.
It makes poll()+_poll_revents() return correct values
when there's something to read/write.
It also makes jack pcm survive snd_pcm_recover(-EPIPE).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agojack: Use jack_client_open instead of deprecated jack_client_new.
Maarten Baert [Tue, 18 Mar 2014 16:55:14 +0000 (17:55 +0100)]
jack: Use jack_client_open instead of deprecated jack_client_new.

Signed-off-by: Maarten Baert <maarten-baert@hotmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agojack: Allow to specify a client name as parameters
Valentin Corfu [Tue, 11 Feb 2014 09:06:36 +0000 (04:06 -0500)]
jack: Allow to specify a client name as parameters

 The current jack client name contains the process id of the application
providing the audio samples. This leads to unpredictable jack client
names which makes handling of the connections by a controlling
application very hard.
 This modification now, allows to specify a client name as parameters
in the configuration file. The implementation is backward
compatible and simply adds a new configuration option to the plugin.

[reformatted and small refactoring by tiwai]

Signed-off-by: Valentin Corfu <valentinx.corfu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoa52: switch to AV_CODEC_ID identifiers
Anton Khirnov [Thu, 9 Jan 2014 20:14:17 +0000 (21:14 +0100)]
a52: switch to AV_CODEC_ID identifiers

Fixes build with latest libavcodec versions.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoa52: Propagate errors from hw
David Henningsson [Wed, 1 Jan 2014 12:17:38 +0000 (13:17 +0100)]
a52: Propagate errors from hw

Several callbacks returned 0 even though the hw was failing, leading
applications to believe everything was fine when it wasn't.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoa52: Add chmap support
Takashi Iwai [Wed, 9 Oct 2013 15:25:50 +0000 (17:25 +0200)]
a52: Add chmap support

Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoa52: Fix build error with the recent version
Takashi Iwai [Wed, 9 Oct 2013 15:24:35 +0000 (17:24 +0200)]
a52: Fix build error with the recent version

The version check for USE_AVCODEC_FRAME wasn't done correctly, and it
failed to build with version 54.x or later.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoupmix: Add chmap support
Takashi Iwai [Wed, 9 Oct 2013 14:59:20 +0000 (16:59 +0200)]
upmix: Add chmap support

Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agovdownmix: Add chmap support
Takashi Iwai [Wed, 9 Oct 2013 14:28:47 +0000 (16:28 +0200)]
vdownmix: Add chmap support

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoAdd AM_MAINTAINER_MODE([enable]) to configure.in.
Jordi Mallach [Wed, 15 May 2013 17:11:48 +0000 (19:11 +0200)]
Add AM_MAINTAINER_MODE([enable]) to configure.in.

Signed-off-by: Jordi Mallach <jordi@debian.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoCheck for and include libavutil.h to avoid unresolved symbols.
Jordi Mallach [Wed, 15 May 2013 17:11:47 +0000 (19:11 +0200)]
Check for and include libavutil.h to avoid unresolved symbols.

The a52 plugin uses av_free(), but does not check for libavutil
availability. Patch configure.in to check for the module, and include
libavutil.h.

Signed-off-by: Jordi Mallach <jordi@debian.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoRelease v1.0.27 v1.0.27
Jaroslav Kysela [Thu, 11 Apr 2013 11:43:08 +0000 (13:43 +0200)]
Release v1.0.27

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
12 years agopulse: pulse_pcm_poll_revents should return 0 on success
Sander Jansen [Tue, 26 Feb 2013 04:24:13 +0000 (22:24 -0600)]
pulse: pulse_pcm_poll_revents should return 0 on success

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoa52: Fix build errors
Takashi Iwai [Fri, 30 Nov 2012 16:45:31 +0000 (17:45 +0100)]
a52: Fix build errors

I merged somehow a half-baked patch mistakenly.  Fixed now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoa52: Add the support of recent libavcodec / libavutil
Takashi Iwai [Fri, 30 Nov 2012 16:15:44 +0000 (17:15 +0100)]
a52: Add the support of recent libavcodec / libavutil

The recent avcodec requires the planar support, which is essentially
non-interleaved formats.  We need to limit the accepted access types
depending on it.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agopcm_pulse: set prebuf parameter according to software parameters
Rémi Denis-Courmont [Sun, 18 Nov 2012 10:01:49 +0000 (12:01 +0200)]
pcm_pulse: set prebuf parameter according to software parameters

The current default value for prebuf is very high, almost the full
virtual ALSA buffer. This breaks some application especially where
low latency is involved.

This patch makes pcm_pulse implement the sw_params callback and get
the prebuf value from the ALSA software parameters. Thus the
trigger latency is much more like what an ALSA application should
expect from an ALSA PCM device.

Acked-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoRelease v1.0.26 v1.0.26
Jaroslav Kysela [Thu, 6 Sep 2012 07:52:58 +0000 (09:52 +0200)]
Release v1.0.26

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
13 years agopulse: Support 24-bit formats
Andrew Eikum [Mon, 20 Aug 2012 09:28:14 +0000 (11:28 +0200)]
pulse: Support 24-bit formats

These formats were introduced in PulseAudio 0.9.15. There aren't any
new formats supported since then, so this also brings the PulseAudio
plugin in sync with current PulseAudio.

Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agousb_stream: Fix build with glibc 2.16
Takashi Iwai [Tue, 31 Jul 2012 09:18:54 +0000 (11:18 +0200)]
usb_stream: Fix build with glibc 2.16

_GNU_SOURCE needs to be defined at first.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoRelease v1.0.25 v1.0.25
Jaroslav Kysela [Wed, 25 Jan 2012 07:57:07 +0000 (08:57 +0100)]
Release v1.0.25

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
13 years agoAdded missing configuration files for the pulse plugin
Jaroslav Kysela [Mon, 23 Jan 2012 15:46:48 +0000 (16:46 +0100)]
Added missing configuration files for the pulse plugin

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
13 years agojack: Fix revents for playback
Fons Adriaensen [Mon, 9 Jan 2012 17:18:10 +0000 (18:18 +0100)]
jack: Fix revents for playback

The following patch will make snd_pcm_poll_descriptors_revents()
return the correct value when used on a jack plugin device.
The current version returns POLLIN regardless of capture or
playback.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoSet CLOEXEC flag for pipes in PulseAudio plugins
Chris Rankin [Tue, 27 Sep 2011 07:44:15 +0000 (09:44 +0200)]
Set CLOEXEC flag for pipes in PulseAudio plugins

I have noticed that Alsa / PulseAudio are leaking a couple of pipes after a
fork/exec, and have traced the leak to the following two plugins:

libasound_module_ctl_pulse.so
libasound_module_pcm_pulse.so

This is with Fedora 15. I have attached a patch for the problem.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agopulse: Install a PulseAudio config snippet into alsa.conf.d
Colin Guthrie [Fri, 16 Sep 2011 09:35:17 +0000 (10:35 +0100)]
pulse: Install a PulseAudio config snippet into alsa.conf.d

v2: Assing priorities to the config snippets.

Signed-off-by: Colin Guthrie <colin@mageia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agopulse - Define a dummy PA_CHECK_VERSION() when not available
Takashi Iwai [Fri, 26 Aug 2011 07:43:11 +0000 (09:43 +0200)]
pulse - Define a dummy PA_CHECK_VERSION() when not available

An old version of PA doesn't define this macro, and gives a build error.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agopulse - only underrun if no more data has been written
Takashi Iwai [Tue, 23 Aug 2011 15:02:17 +0000 (17:02 +0200)]
pulse - only underrun if no more data has been written

Original patch from David Henningsson <david.henningsson@canonical.com>

If more data has already been written after the underrun, the underrun
will automatically end and therefore we should not report it or
restart the stream.

[ This patch adds a more check of underrun with a new PA function so
  that the underrun handles works more reliably.  As the feature is
  supported only in a recent version of PA, the underrun handling is
  enabled as default now for the new PA, while it's still disabled for
  older PA.  -- tiwai ]

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agojack: Fix hanging applications when using jack plugin
Kevin Ross [Thu, 4 Aug 2011 14:19:56 +0000 (16:19 +0200)]
jack: Fix hanging applications when using jack plugin

As described in issue #2727

   https://bugtrack.alsa-project.org/alsa-bug/view.php?id=2727

applications hang after some seconds when using the jack plugin.

Kevin Ross <kevin@familyross.net> writes:

   The cause: The plugin creates a pipe, so that the fd's could be
   polled to indicate completion of a transfer.  However, the call to
   write() blocks when playing audio, as nothing actually reads from the
   pipe, and it fills up until it blocks.

   Making the socket non-blocking fixes the problem, and testing with
   playback and capture both work properly for me now.

[Adrian: I've also tested Kevin's patch and confirm it works.]

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agopulse: Set PA_CONTEXT_NOAUTOSPAWN when fallback is available
Takashi Iwai [Wed, 27 Jul 2011 07:32:12 +0000 (09:32 +0200)]
pulse: Set PA_CONTEXT_NOAUTOSPAWN when fallback is available

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agopulse: Add fallback option
Takashi Iwai [Tue, 26 Jul 2011 12:26:26 +0000 (14:26 +0200)]
pulse: Add fallback option

Added "fallback" option to give the PCM / controller name as a fallback
when connecting to PA server fails.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoa52: Fix build with older ffmpeg versions.
Colin Guthrie [Tue, 26 Apr 2011 21:55:44 +0000 (22:55 +0100)]
a52: Fix build with older ffmpeg versions.

This fixes a regression introduced in:
  40c129a160f37fe9488b2828d6299f99c269703e

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoPulse: Fix snd_pcm_avail returning 0 in some cases
David Henningsson [Thu, 21 Apr 2011 13:10:19 +0000 (15:10 +0200)]
Pulse: Fix snd_pcm_avail returning 0 in some cases

Due to a round-off error, snd_pcm_avail could in some cases
return 0 even though more data could be written to the stream.

Reported-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoa52 - Fix a52 codec with recent libavcodec updates
Joerg Reuter [Wed, 6 Apr 2011 14:36:11 +0000 (16:36 +0200)]
a52 - Fix a52 codec with recent libavcodec updates

The recent libavcodec is changed to accept only float input, but
the old ac3 encoder is still somehow working with a different name.
This patch makes it working again.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoRelease v1.0.24 v1.0.24
Jaroslav Kysela [Wed, 26 Jan 2011 11:05:44 +0000 (12:05 +0100)]
Release v1.0.24

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
14 years agoFix README-jack (second channel)
Jaroslav Kysela [Wed, 17 Nov 2010 09:31:00 +0000 (10:31 +0100)]
Fix README-jack (second channel)

Reported-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
15 years agopulse: Add handle_underrun option
Takashi Iwai [Fri, 9 Jul 2010 12:05:03 +0000 (14:05 +0200)]
pulse: Add handle_underrun option

Added a config option "handle_underrun" to specify whether pulse plugin
handles the underrun reported from PA.  The default value is now set to
false, i.e. it will ignore underruns in PA (for good reasons below).
You can take back to the old behavior by setting handle_underrun true.

The original idea was brought by David Henningsson <diwic@ubuntu.com>,
while this patch is simplified and makes the behavior configurable.

The reasons for avoiding underruns (cited from David's original patch):

 Reporting underruns to ALSA seems to do more bad than good, for these reasons:
 * If pulseaudio gets an underrun, the normal way to end that underrun is to
   feed it with more buffers. This is different from the ALSA way of dealing
   with underruns, which requires hardware buffer pointers to be reset.
 * In addition, underrun signals are delivered asynchronously from pulseaudio.
   This means that there might be more buffers on the way to pulseaudio when
   the underrun is reported, making the underrun obsolete. Unfortunately,
   there is currently no known way to determine whether this is the case or
   not.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agopulse: Fix invalid buffer pointer return value
David Henningsson [Sat, 9 Jan 2010 08:09:14 +0000 (09:09 +0100)]
pulse: Fix invalid buffer pointer return value

This patch improves recovering from underruns, and prevents hangs inside
snd_pcm_write* and snd_pcm_read* due to snd_pcm_avail* returning too
low values. It especially helps low latency situations.

Signed-off-by: David Henningsson <diwic@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoRelease v1.0.23 v1.0.23
Jaroslav Kysela [Fri, 16 Apr 2010 11:11:10 +0000 (13:11 +0200)]
Release v1.0.23

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
15 years agousb_stream: Allow user-set period-size and rate
Michaël Cadilhac [Mon, 22 Feb 2010 09:01:49 +0000 (10:01 +0100)]
usb_stream: Allow user-set period-size and rate

* usb_stream/pcm_usb_stream.c: Allow user-set period-size and rate.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agousb_stream: Check for NULL-ness before dereferencing
Michaël Cadilhac [Mon, 22 Feb 2010 08:59:26 +0000 (09:59 +0100)]
usb_stream: Check for NULL-ness before dereferencing

 * usb_stream/pcm_usb_stream.c (snd_pcm_us_stop): Prevent
   dereferencing when structure is not initialized.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoRelease v1.0.22 v1.0.22
Jaroslav Kysela [Wed, 16 Dec 2009 15:18:55 +0000 (16:18 +0100)]
Release v1.0.22

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
15 years agoupmix - Add 7.1 support
Christopher Schramm [Thu, 3 Dec 2009 16:18:48 +0000 (17:18 +0100)]
upmix - Add 7.1 support

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoa52 - set channel layout with recent libavcodec
Anssi Hannula [Fri, 27 Nov 2009 15:15:46 +0000 (17:15 +0200)]
a52 - set channel layout with recent libavcodec

As of SVN r18631 (2009-04-20) A52 encoder of libavcodec outputs a
warning at run-time if channel layout is not specified.

Fix that by setting the channel layout in a52_prepare() when building
against libavcodec revision that supports this.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoa52 - fix 5.1 channel order with recent libavcodec
Anssi Hannula [Fri, 27 Nov 2009 15:15:45 +0000 (17:15 +0200)]
a52 - fix 5.1 channel order with recent libavcodec

As of SVN r18540 libavcodec expects 5.1 channel audio with SMPTE channel
order. Fix ALSA a52 plugin to use that order when built against such a
libavcodec. Minor version of libavcodec was raised on the same day (Apr
17th 2009), so use that for the check.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoRelease v1.0.21 v1.0.21
Jaroslav Kysela [Mon, 31 Aug 2009 13:09:41 +0000 (15:09 +0200)]
Release v1.0.21

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
16 years agopulse: immediately trigger EIO when connection is dropped
Lennart Poettering [Tue, 4 Aug 2009 21:56:00 +0000 (23:56 +0200)]
pulse: immediately trigger EIO when connection is dropped

When the connection is dropped notify the application immediately
instead of waiting until the applications calls into us the next time.

This makes "aplay" handle connections shutdown similar to hardware
unplugs: an immediate EIO is thrown.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agopulse: rework object destruction paths a bit
Lennart Poettering [Tue, 4 Aug 2009 21:55:28 +0000 (23:55 +0200)]
pulse: rework object destruction paths a bit

Make sure we deal better with partially initialized structs.

Don't check for pointer state before calling free() since free() does
that anyway.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agopulse: unify stream/context state checks
Lennart Poettering [Tue, 4 Aug 2009 21:55:05 +0000 (23:55 +0200)]
pulse: unify stream/context state checks

Unify (and simplify) the paths that check for the validity of a
stream/context: always call into check_stream()/pulse_check_connection()
when applicable instead of rolling our own checks each time. Also check
for validity of mainloop before locking it.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agopulse: get rid of redundant state variable
Lennart Poettering [Tue, 4 Aug 2009 21:54:42 +0000 (23:54 +0200)]
pulse: get rid of redundant state variable

snd_pulse_t::state was mostly shadowing the state of
pa_context_get_state(snd_pulse_t::context), so get rid of it and use the
state of the context directly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agopulse: move a couple of PCM related functions from pulse.c to pcm_pulse.c
Lennart Poettering [Tue, 4 Aug 2009 21:54:24 +0000 (23:54 +0200)]
pulse: move a couple of PCM related functions from pulse.c to pcm_pulse.c

A number of functions in pulse.c are only relevant for the PCM handling,
so let's move them to pcm_pulse.c. This allows us to simplify their
argument lists a bit.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agopulse: replace manual mainloop by pa_mainloop_iterate()
Lennart Poettering [Tue, 4 Aug 2009 21:53:51 +0000 (23:53 +0200)]
pulse: replace manual mainloop by pa_mainloop_iterate()

The pa_mainloop_prepare()/_poll()/_dispatch() can be simplified by
simply calling pa_mainloop_iterate() which does all this in one call.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agopulse: call pa_threaded_mainloop_wait() to handle spurious wakeups
Lennart Poettering [Fri, 31 Jul 2009 14:02:21 +0000 (16:02 +0200)]
pulse: call pa_threaded_mainloop_wait() to handle spurious wakeups

pa_threaded_mainloop_wait() can wake up for no reason, according to the
specs of the underlying POSIX ptrhead_cond_wait() docs, so we need to
call it in a loop here which should be cleaner anyway.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agopulse: unify destruction of snd_pulse_t
Lennart Poettering [Fri, 31 Jul 2009 14:02:05 +0000 (16:02 +0200)]
pulse: unify destruction of snd_pulse_t

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agopulse: use PA_CONTEXT_IS_GOOD where applicable
Lennart Poettering [Fri, 31 Jul 2009 14:01:52 +0000 (16:01 +0200)]
pulse: use PA_CONTEXT_IS_GOOD where applicable

PA_CONTEXT_IS_GOOD is a safer way to check whether a context is still
valid.

This patch also bumps the version requirement of libpulse to 0.9.11.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agopulse: get rid of a number of assert()s
Lennart Poettering [Fri, 31 Jul 2009 13:25:44 +0000 (15:25 +0200)]
pulse: get rid of a number of assert()s

Instead of hitting an assert when any of the plugin functions is called
in an invalid context we should return a clean error to make sure
programs are not unnecessarily aborted.

This should fix issues such as http://pulseaudio.org/ticket/595

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agooss - Add missing initialization of fragments
Takashi Iwai [Fri, 17 Jul 2009 10:00:18 +0000 (12:00 +0200)]
oss - Add missing initialization of fragments

The periods calculation was missing for initializing OSS fragments.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoalsa-plugins/pulse: Implement 'pause'.
Troy Moure [Thu, 18 Jun 2009 13:55:21 +0000 (14:55 +0100)]
alsa-plugins/pulse: Implement 'pause'.

Just cork or uncork the stream to pause or unpause it.

Signed-off-by: Troy Moure <twmoure@szypr.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agospeex - Add echo-cancelling option to speexdsp plugin
Takashi Iwai [Tue, 16 Jun 2009 06:04:22 +0000 (08:04 +0200)]
speex - Add echo-cancelling option to speexdsp plugin

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoAdd PCM rates query support for PCM rate plugins
Takashi Iwai [Tue, 2 Jun 2009 14:30:06 +0000 (16:30 +0200)]
Add PCM rates query support for PCM rate plugins

Follow the new PCM rate-plugin protocol to support the rate range
queries, etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoRelease v1.0.20 v1.0.20
Jaroslav Kysela [Wed, 6 May 2009 07:07:28 +0000 (09:07 +0200)]
Release v1.0.20

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
16 years agoarcam_av: Refactor event callback to facilitate addition of "numid" optimisation
Peter Stokes [Mon, 2 Mar 2009 11:24:13 +0000 (12:24 +0100)]
arcam_av: Refactor event callback to facilitate addition of "numid" optimisation

Signed-off-by: Peter Stokes <linux@dadeos.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoarcam_av: Refactor control specifications to facilitate addition of "numid" optimisation
Peter Stokes [Mon, 23 Feb 2009 09:03:31 +0000 (10:03 +0100)]
arcam_av: Refactor control specifications to facilitate addition of "numid" optimisation

Signed-off-by: Peter Stokes <linux@dadeos.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoarcam_av: Remove incorrect usage of the static SHM ID variable
Peter Stokes [Mon, 23 Feb 2009 09:02:50 +0000 (10:02 +0100)]
arcam_av: Remove incorrect usage of the static SHM ID variable

Signed-off-by: Peter Stokes <linux@dadeos.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agooss: Add numid check in ctl plugin
Takashi Iwai [Tue, 17 Feb 2009 16:29:17 +0000 (17:29 +0100)]
oss: Add numid check in ctl plugin

Added the check of non-zero numid to optimize the look-up for the
element.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agopulse: Add numid check in ctl plugin
Takashi Iwai [Tue, 17 Feb 2009 16:28:13 +0000 (17:28 +0100)]
pulse: Add numid check in ctl plugin

Added the check of non-zero numid and optimize the look-up for the
element.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoClean up Makefile.am
Takashi Iwai [Thu, 22 Jan 2009 11:15:56 +0000 (12:15 +0100)]
Clean up Makefile.am

Avoid unnecessary substitution and use simply SUBDIRS += ...

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoAdd arcam-av plugin
Peter Stokes [Thu, 22 Jan 2009 11:09:44 +0000 (12:09 +0100)]
Add arcam-av plugin

Added arcam-av control plugin (type "arcam_av") for accessing
Arcam AV amplifier via ALSA mixer interface.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoAdd missing continue in config parser of pcm-upmix plugin (again)
Takashi Iwai [Wed, 21 Jan 2009 14:55:45 +0000 (15:55 +0100)]
Add missing continue in config parser of pcm-upmix plugin (again)

This change was reverted accidentally by the previous git-stash operation
on my local tree...

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoAdd Speex pre-processing plugin
Takashi Iwai [Wed, 21 Jan 2009 17:11:43 +0000 (18:11 +0100)]
Add Speex pre-processing plugin

Added Speex pre-processing filter plugin for denoise, AGC, etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoFix build of pph plugin with speex-1.2rc1
Takashi Iwai [Wed, 21 Jan 2009 15:53:36 +0000 (16:53 +0100)]
Fix build of pph plugin with speex-1.2rc1

The resampler code is moved to libspeexdsp instead of libspeex.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoAdd missing continue in config parser of pcm-upmix plugin
Takashi Iwai [Wed, 21 Jan 2009 14:55:45 +0000 (15:55 +0100)]
Add missing continue in config parser of pcm-upmix plugin

16 years agoAdd missing -lm to pph plugin
Takashi Iwai [Wed, 21 Jan 2009 08:36:57 +0000 (09:36 +0100)]
Add missing -lm to pph plugin

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoRelease v1.0.19 v1.0.19
Jaroslav Kysela [Mon, 19 Jan 2009 11:17:21 +0000 (12:17 +0100)]
Release v1.0.19

Signed-off-by: Jaroslav Kysela <perex@perex.cz>