Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 653742
Collapse All | Expand All

(-)a/rate/rate_samplerate.c (-4 / +2 lines)
Lines 154-167 static void pcm_src_close(void *obj) Link Here
154
}
154
}
155
155
156
#if SND_PCM_RATE_PLUGIN_VERSION >= 0x010002
156
#if SND_PCM_RATE_PLUGIN_VERSION >= 0x010002
157
static int get_supported_rates(void *obj, unsigned int *rate_min,
157
static int get_supported_rates(void *obj ATTRIBUTE_UNUSED, unsigned int *rate_min,
158
			       unsigned int *rate_max)
158
			       unsigned int *rate_max)
159
{
159
{
160
	*rate_min = *rate_max = 0; /* both unlimited */
160
	*rate_min = *rate_max = 0; /* both unlimited */
161
	return 0;
161
	return 0;
162
}
162
}
163
163
164
static void dump(void *obj, snd_output_t *out)
164
static void dump(void *obj ATTRIBUTE_UNUSED, snd_output_t *out)
165
{
165
{
166
	snd_output_printf(out, "Converter: libsamplerate\n");
166
	snd_output_printf(out, "Converter: libsamplerate\n");
167
}
167
}
168
- 
169
files for plugins
168
files for plugins
170
--
171
a52/60-a52-encoder.conf       | 38 ++++++++++++++++++++++++++
169
a52/60-a52-encoder.conf       | 38 ++++++++++++++++++++++++++
172
a52/Makefile.am               |  4 +++
170
a52/Makefile.am               |  4 +++
173
a52/pcm_a52.c                 |  2 +-
171
a52/pcm_a52.c                 |  2 +-
174
arcam-av/50-arcam-av-ctl.conf | 16 +++++++++++
172
arcam-av/50-arcam-av-ctl.conf | 16 +++++++++++
175
arcam-av/Makefile.am          |  4 +++
173
arcam-av/Makefile.am          |  4 +++
176
configure.ac                  | 12 +++++++++
174
configure.ac                  | 12 +++++++++
177
jack/50-jack.conf             | 18 +++++++++++++
175
jack/50-jack.conf             | 18 +++++++++++++
178
jack/Makefile.am              |  4 +++
176
jack/Makefile.am              |  4 +++
179
maemo/98-maemo.conf           | 11 ++++++++
177
maemo/98-maemo.conf           | 11 ++++++++
180
maemo/Makefile.am             |  4 +++
178
maemo/Makefile.am             |  4 +++
181
mix/60-upmix.conf             | 26 ++++++++++++++++++
179
mix/60-upmix.conf             | 26 ++++++++++++++++++
182
mix/60-vdownmix.conf          | 24 +++++++++++++++++
180
mix/60-vdownmix.conf          | 24 +++++++++++++++++
183
mix/Makefile.am               |  5 +++-
181
mix/Makefile.am               |  5 +++-
184
oss/50-oss.conf               | 26 ++++++++++++++++++
182
oss/50-oss.conf               | 26 ++++++++++++++++++
185
oss/Makefile.am               |  4 +++
183
oss/Makefile.am               |  4 +++
186
pph/10-speexrate.conf         | 28 +++++++++++++++++++
184
pph/10-speexrate.conf         | 28 +++++++++++++++++++
187
pph/Makefile.am               |  4 +++
185
pph/Makefile.am               |  4 +++
188
pulse/50-pulseaudio.conf      | 15 ++++++-----
186
pulse/50-pulseaudio.conf      | 15 ++++++-----
189
pulse/Makefile.am             |  4 +--
187
pulse/Makefile.am             |  4 +--
190
rate-lavc/10-rate-lavc.conf   | 28 +++++++++++++++++++
188
rate-lavc/10-rate-lavc.conf   | 28 +++++++++++++++++++
191
rate-lavc/Makefile.am         |  4 +++
189
rate-lavc/Makefile.am         |  4 +++
192
rate/10-samplerate.conf       | 28 +++++++++++++++++++
190
rate/10-samplerate.conf       | 28 +++++++++++++++++++
193
rate/Makefile.am              |  4 +++
191
rate/Makefile.am              |  4 +++
194
speex/60-speex.conf           | 63 +++++++++++++++++++++++++++++++++++++++++++
192
speex/60-speex.conf           | 63 +++++++++++++++++++++++++++++++++++++++++++
195
speex/Makefile.am             |  4 +++
193
speex/Makefile.am             |  4 +++
196
usb_stream/98-usb-stream.conf | 27 +++++++++++++++++++
194
usb_stream/98-usb-stream.conf | 27 +++++++++++++++++++
197
usb_stream/Makefile.am        |  4 +++
195
usb_stream/Makefile.am        |  4 +++
198
27 files changed, 401 insertions(+), 10 deletions(-)
196
27 files changed, 401 insertions(+), 10 deletions(-)
199
create mode 100644 a52/60-a52-encoder.conf
197
create mode 100644 a52/60-a52-encoder.conf
200
create mode 100644 arcam-av/50-arcam-av-ctl.conf
198
create mode 100644 arcam-av/50-arcam-av-ctl.conf
201
create mode 100644 jack/50-jack.conf
199
create mode 100644 jack/50-jack.conf
202
create mode 100644 maemo/98-maemo.conf
200
create mode 100644 maemo/98-maemo.conf
203
create mode 100644 mix/60-upmix.conf
201
create mode 100644 mix/60-upmix.conf
204
create mode 100644 mix/60-vdownmix.conf
202
create mode 100644 mix/60-vdownmix.conf
205
create mode 100644 oss/50-oss.conf
203
create mode 100644 oss/50-oss.conf
206
create mode 100644 pph/10-speexrate.conf
204
create mode 100644 pph/10-speexrate.conf
207
create mode 100644 rate-lavc/10-rate-lavc.conf
205
create mode 100644 rate-lavc/10-rate-lavc.conf
208
create mode 100644 rate/10-samplerate.conf
206
create mode 100644 rate/10-samplerate.conf
209
create mode 100644 speex/60-speex.conf
207
create mode 100644 speex/60-speex.conf
210
create mode 100644 usb_stream/98-usb-stream.conf
208
create mode 100644 usb_stream/98-usb-stream.conf
(-)a/a52/60-a52-encoder.conf (+38 lines)
Line 0 Link Here
1
pcm.a52 {
2
	@args [ CARD SLAVE RATE BITRATE CHANNELS ]
3
	@args.CARD {
4
		type integer
5
		default {
6
			@func refer
7
			name defaults.pcm.card
8
		}
9
	}
10
	@args.SLAVE {
11
		type string
12
	}
13
	@args.RATE {
14
		type integer
15
		default 48000
16
	}
17
	@args.BITRATE {
18
		type integer
19
		default 448
20
	}
21
	@args.CHANNELS {
22
		type string
23
		default 6
24
	}
25
	type a52
26
	card $CARD
27
	slavepcm $SLAVE
28
	rate $RATE
29
	bitrate $BITRATE
30
	channels $CHANNELS
31
	hint {
32
		show {
33
			@func refer
34
			name defaults.namehint.basic
35
		}
36
                description "Plugin to convert multichannel stream to A52 (AC3) bitstream"
37
	}
38
}
(-)a/a52/Makefile.am (+4 lines)
Lines 1-6 Link Here
1
EXTRA_DIST = 60-a52-encoder.conf
2
1
asound_module_pcm_a52_LTLIBRARIES = libasound_module_pcm_a52.la
3
asound_module_pcm_a52_LTLIBRARIES = libasound_module_pcm_a52.la
4
asound_module_addon_DATA = 60-a52-encoder.conf
2
5
3
asound_module_pcm_a52dir = @ALSA_PLUGIN_DIR@
6
asound_module_pcm_a52dir = @ALSA_PLUGIN_DIR@
7
asound_module_addondir = @ALSA_ADDON_DIR@
4
8
5
AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ @AVCODEC_CFLAGS@ \
9
AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ @AVCODEC_CFLAGS@ \
6
	-DAVCODEC_HEADER="@AVCODEC_HEADER@"
10
	-DAVCODEC_HEADER="@AVCODEC_HEADER@"
(-)a/a52/pcm_a52.c (-1 / +1 lines)
Lines 937-943 SND_PCM_PLUGIN_DEFINE_FUNC(a52) Link Here
937
		goto error;
937
		goto error;
938
	}
938
	}
939
939
940
	if (! pcm_string) {
940
	if (! pcm_string || pcm_string[0] == '\0') {
941
		snprintf(devstr, sizeof(devstr),
941
		snprintf(devstr, sizeof(devstr),
942
			 "iec958:{AES0 0x%x AES1 0x%x AES2 0x%x AES3 0x%x %s%s}",
942
			 "iec958:{AES0 0x%x AES1 0x%x AES2 0x%x AES3 0x%x %s%s}",
943
			 IEC958_AES0_CON_EMPHASIS_NONE | IEC958_AES0_NONAUDIO |
943
			 IEC958_AES0_CON_EMPHASIS_NONE | IEC958_AES0_NONAUDIO |
(-)a/arcam-av/50-arcam-av-ctl.conf (+16 lines)
Line 0 Link Here
1
ctl.arcam_av {
2
	@args [ PORT ]
3
	@args.PORT {
4
		type string
5
		default "/dev/ttyUSB0"
6
	}
7
	type arcam_av
8
	port $PORT
9
	hint {
10
		show {
11
			@func refer
12
			name defaults.namehint.basic
13
		}
14
		description "Arcam-AV Amplifier"
15
	}
16
}
(-)a/arcam-av/Makefile.am (+4 lines)
Lines 1-6 Link Here
1
EXTRA_DIST = 50-arcam-av-ctl.conf
2
1
asound_module_ctl_arcam_av_LTLIBRARIES = libasound_module_ctl_arcam_av.la
3
asound_module_ctl_arcam_av_LTLIBRARIES = libasound_module_ctl_arcam_av.la
4
asound_module_addon_DATA = 50-arcam-av-ctl.conf
2
5
3
asound_module_ctl_arcam_avdir = @ALSA_PLUGIN_DIR@
6
asound_module_ctl_arcam_avdir = @ALSA_PLUGIN_DIR@
7
asound_module_addondir = @ALSA_ADDON_DIR@
4
8
5
AM_CFLAGS = -Wall -g @ALSA_CFLAGS@
9
AM_CFLAGS = -Wall -g @ALSA_CFLAGS@
6
AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined
10
AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined
(-)a/configure.ac (+12 lines)
Lines 206-211 AC_DEFINE_UNQUOTED(ALSA_DATA_DIR, "$alsadatadir", [directory containing ALSA dat Link Here
206
ALSA_DATA_DIR="$alsadatadir"
206
ALSA_DATA_DIR="$alsadatadir"
207
AC_SUBST(ALSA_DATA_DIR)
207
AC_SUBST(ALSA_DATA_DIR)
208
208
209
dnl ALSA add-on config directory
210
AC_ARG_WITH(alsaaddondir,
211
    AS_HELP_STRING([--with-alsaaddondir=dir],
212
	[path where ALSA add-on config files are stored]),
213
    alsaaddondir="$withval", alsaaddondir="")
214
if test -z "$alsaaddondir"; then
215
    alsaaddondir="/etc/alsa/conf.d"
216
fi
217
AC_DEFINE_UNQUOTED(ALSA_ADDON_DIR, "$alsaaddondir", [directory containing ALSA add-on config files])
218
ALSA_ADDON_DIR="$alsaaddondir"
219
AC_SUBST(ALSA_ADDON_DIR)
220
209
SAVE_PLUGINS_VERSION
221
SAVE_PLUGINS_VERSION
210
222
211
AC_OUTPUT([
223
AC_OUTPUT([
(-)a/jack/50-jack.conf (+18 lines)
Line 0 Link Here
1
pcm.jack {
2
	type jack
3
	playback_ports {
4
		0 alsa_pcm:playback_1
5
		1 alsa_pcm:playback_2
6
	}
7
	capture_ports {
8
		0 alsa_pcm:capture_1
9
		1 alsa_pcm:capture_2
10
	}
11
	hint {
12
		show {
13
			@func refer
14
			name defaults.namehint.basic
15
		}
16
		description "JACK Audio Connection Kit"
17
	}
18
}
(-)a/jack/Makefile.am (+4 lines)
Lines 1-6 Link Here
1
EXTRA_DIST = 50-jack.conf
2
1
asound_module_pcm_jack_LTLIBRARIES = libasound_module_pcm_jack.la
3
asound_module_pcm_jack_LTLIBRARIES = libasound_module_pcm_jack.la
4
asound_module_addon_DATA = 50-jack.conf
2
5
3
asound_module_pcm_jackdir = @ALSA_PLUGIN_DIR@
6
asound_module_pcm_jackdir = @ALSA_PLUGIN_DIR@
7
asound_module_addondir = @ALSA_ADDON_DIR@
4
8
5
AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ @JACK_CFLAGS@
9
AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ @JACK_CFLAGS@
6
AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED)
10
AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED)
(-)a/maemo/98-maemo.conf (+11 lines)
Line 0 Link Here
1
pcm.!default {
2
	type alsa_dsp
3
	playback_device_file [ "/dev/dsptask/pcm2" ]
4
	recording_device_file [ "/dev/dsptask/pcm_rec" ]
5
}
6
7
ctl.!default {
8
	type dsp_ctl
9
	playback_devices [ "/dev/dsptask/pcm2" ]
10
	recording_devices [ "/dev/dsptask/pcm_rec" ]
11
}
(-)a/maemo/Makefile.am (+4 lines)
Lines 1-8 Link Here
1
EXTRA_DIST = 98-maemo.conf
2
1
asound_module_pcm_alsa_dsp_LTLIBRARIES = libasound_module_pcm_alsa_dsp.la
3
asound_module_pcm_alsa_dsp_LTLIBRARIES = libasound_module_pcm_alsa_dsp.la
2
asound_module_ctl_dsp_ctl_LTLIBRARIES = libasound_module_ctl_dsp_ctl.la
4
asound_module_ctl_dsp_ctl_LTLIBRARIES = libasound_module_ctl_dsp_ctl.la
5
asound_module_addon_DATA = 98-maemo.conf
3
6
4
asound_module_pcm_alsa_dspdir = @ALSA_PLUGIN_DIR@
7
asound_module_pcm_alsa_dspdir = @ALSA_PLUGIN_DIR@
5
asound_module_ctl_dsp_ctldir = @ALSA_PLUGIN_DIR@
8
asound_module_ctl_dsp_ctldir = @ALSA_PLUGIN_DIR@
9
asound_module_addondir = @ALSA_ADDON_DIR@
6
10
7
AM_CFLAGS = -Wall -O2 @ALSA_CFLAGS@ $(DBUS_CFLAGS)
11
AM_CFLAGS = -Wall -O2 @ALSA_CFLAGS@ $(DBUS_CFLAGS)
8
AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED)
12
AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED)
(-)a/mix/60-upmix.conf (+26 lines)
Line 0 Link Here
1
pcm.upmix {
2
	@args [ SLAVE CHANNELS DELAY ]
3
	@args.SLAVE {
4
		type string
5
		default "plug:hw"
6
	}
7
	@args.CHANNELS {
8
		type integer
9
		default 6
10
	}
11
	@args.DELAY {
12
		type integer
13
		default 0
14
	}
15
	type upmix
16
	channels $CHANNELS
17
	delay $DELAY
18
	slave.pcm $SLAVE
19
	hint {
20
		show {
21
			@func refer
22
			name defaults.namehint.basic
23
		}
24
                description "Plugin for channel upmix (4,6,8)"
25
	}
26
}
(-)a/mix/60-vdownmix.conf (+24 lines)
Line 0 Link Here
1
pcm.vdownmix {
2
	@args [ SLAVE CHANNELS DELAY ]
3
	@args.SLAVE {
4
		type string
5
		default "plug:hw"
6
	}
7
	@args.CHANNELS {
8
		type integer
9
		default 6
10
	}
11
	@args.DELAY {
12
		type integer
13
		default 0
14
	}
15
	type vdownmix
16
	slave.pcm $SLAVE
17
	hint {
18
		show {
19
			@func refer
20
			name defaults.namehint.basic
21
		}
22
                description "Plugin for channel downmix (stereo) with a simple spacialization"
23
	}
24
}
(-)a/mix/Makefile.am (-1 / +4 lines)
Lines 1-8 Link Here
1
EXTRA_DIST = 60-upmix.conf 60-vdownmix.conf
2
1
asound_module_pcm_upmix_LTLIBRARIES = libasound_module_pcm_upmix.la
3
asound_module_pcm_upmix_LTLIBRARIES = libasound_module_pcm_upmix.la
2
asound_module_pcm_vdownmix_LTLIBRARIES = libasound_module_pcm_vdownmix.la
4
asound_module_pcm_vdownmix_LTLIBRARIES = libasound_module_pcm_vdownmix.la
5
asound_module_addon_DATA = 60-upmix.conf 60-vdownmix.conf
3
6
4
asound_module_pcm_upmixdir = @ALSA_PLUGIN_DIR@
7
asound_module_pcm_upmixdir = @ALSA_PLUGIN_DIR@
5
asound_module_pcm_vdownmixdir = @ALSA_PLUGIN_DIR@
8
asound_module_pcm_vdownmixdir = @ALSA_PLUGIN_DIR@
9
asound_module_addondir = @ALSA_ADDON_DIR@
6
10
7
AM_CFLAGS = -Wall -g @ALSA_CFLAGS@
11
AM_CFLAGS = -Wall -g @ALSA_CFLAGS@
8
AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED)
12
AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED)
Lines 11-14 libasound_module_pcm_upmix_la_SOURCES = pcm_upmix.c Link Here
11
libasound_module_pcm_upmix_la_LIBADD = @ALSA_LIBS@
15
libasound_module_pcm_upmix_la_LIBADD = @ALSA_LIBS@
12
libasound_module_pcm_vdownmix_la_SOURCES = pcm_vdownmix.c
16
libasound_module_pcm_vdownmix_la_SOURCES = pcm_vdownmix.c
13
libasound_module_pcm_vdownmix_la_LIBADD = @ALSA_LIBS@
17
libasound_module_pcm_vdownmix_la_LIBADD = @ALSA_LIBS@
14
(-)a/oss/50-oss.conf (+26 lines)
Line 0 Link Here
1
pcm.oss {
2
	@args [ DEVICE ]
3
	@args.DEVICE {
4
		type string
5
		default "/dev/dsp"
6
	}
7
	type oss
8
	port $DEVICE
9
	hint {
10
		show {
11
			@func refer
12
			name defaults.namehint.basic
13
		}
14
		description "Open Sound System"
15
	}
16
}
17
18
ctl.oss {
19
	@args [ DEVICE ]
20
	@args.DEVICE {
21
		type string
22
		default "/dev/mixer"
23
	}
24
	type oss
25
	device $DEVICE
26
}
(-)a/oss/Makefile.am (+4 lines)
Lines 1-8 Link Here
1
EXTRA_DIST = 50-oss.conf
2
1
asound_module_pcm_oss_LTLIBRARIES = libasound_module_pcm_oss.la
3
asound_module_pcm_oss_LTLIBRARIES = libasound_module_pcm_oss.la
2
asound_module_ctl_oss_LTLIBRARIES = libasound_module_ctl_oss.la
4
asound_module_ctl_oss_LTLIBRARIES = libasound_module_ctl_oss.la
5
asound_module_addon_DATA = 50-oss.conf
3
6
4
asound_module_pcm_ossdir = @ALSA_PLUGIN_DIR@
7
asound_module_pcm_ossdir = @ALSA_PLUGIN_DIR@
5
asound_module_ctl_ossdir = @ALSA_PLUGIN_DIR@
8
asound_module_ctl_ossdir = @ALSA_PLUGIN_DIR@
9
asound_module_addondir = @ALSA_ADDON_DIR@
6
10
7
AM_CFLAGS = -Wall -g @ALSA_CFLAGS@
11
AM_CFLAGS = -Wall -g @ALSA_CFLAGS@
8
AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED)
12
AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED)
(-)a/pph/10-speexrate.conf (+28 lines)
Line 0 Link Here
1
pcm.speexrate {
2
	@args [ SLAVE RATE CONVERTER ]
3
	@args.SLAVE {
4
		type string
5
		default "plug:hw"
6
	}
7
	@args.RATE {
8
		type integer
9
		default 48000
10
	}
11
	@args.CONVERTER {
12
		type string
13
		default "speexrate"
14
	}
15
	type rate
16
	converter $CONVERTER
17
	slave {
18
		pcm $SLAVE
19
		rate $RATE
20
	}
21
	hint {
22
		show {
23
			@func refer
24
			name defaults.namehint.basic
25
		}
26
                description "Rate Converter Plugin Using Speex Resampler"
27
	}
28
}
(-)a/pph/Makefile.am (+4 lines)
Lines 1-6 Link Here
1
EXTRA_DIST = 10-speexrate.conf
2
1
asound_module_rate_speexrate_LTLIBRARIES = libasound_module_rate_speexrate.la
3
asound_module_rate_speexrate_LTLIBRARIES = libasound_module_rate_speexrate.la
4
asound_module_addon_DATA = 10-speexrate.conf
2
5
3
asound_module_rate_speexratedir = @ALSA_PLUGIN_DIR@
6
asound_module_rate_speexratedir = @ALSA_PLUGIN_DIR@
7
asound_module_addondir = @ALSA_ADDON_DIR@
4
8
5
AM_CFLAGS = -DVAR_ARRAYS -Wall -g @ALSA_CFLAGS@
9
AM_CFLAGS = -DVAR_ARRAYS -Wall -g @ALSA_CFLAGS@
6
AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED)
10
AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED)
(-)a/pulse/50-pulseaudio.conf (-6 / +9 lines)
Lines 1-13 Link Here
1
# Add a specific named PulseAudio pcm and ctl (typically useful for testing)
1
# Add a specific named PulseAudio pcm and ctl (typically useful for testing)
2
2
3
pcm.pulse {
3
pcm.pulse {
4
    type pulse
4
	type pulse
5
    hint {
5
	hint {
6
        show on
6
		show {
7
        description "PulseAudio Sound Server"
7
			@func refer
8
    }
8
			name defaults.namehint.basic
9
		}
10
		description "PulseAudio Sound Server"
11
	}
9
}
12
}
10
13
11
ctl.pulse {
14
ctl.pulse {
12
    type pulse
15
	type pulse
13
}
16
}
(-)a/pulse/Makefile.am (-2 / +2 lines)
Lines 3-14 EXTRA_DIST = 50-pulseaudio.conf 99-pulseaudio-default.conf.example Link Here
3
asound_module_pcm_LTLIBRARIES = libasound_module_pcm_pulse.la
3
asound_module_pcm_LTLIBRARIES = libasound_module_pcm_pulse.la
4
asound_module_ctl_LTLIBRARIES = libasound_module_ctl_pulse.la
4
asound_module_ctl_LTLIBRARIES = libasound_module_ctl_pulse.la
5
asound_module_conf_LTLIBRARIES = libasound_module_conf_pulse.la
5
asound_module_conf_LTLIBRARIES = libasound_module_conf_pulse.la
6
asound_module_data_DATA = 50-pulseaudio.conf 99-pulseaudio-default.conf.example
6
asound_module_addon_DATA = 50-pulseaudio.conf 99-pulseaudio-default.conf.example
7
7
8
asound_module_pcmdir = @ALSA_PLUGIN_DIR@
8
asound_module_pcmdir = @ALSA_PLUGIN_DIR@
9
asound_module_ctldir = @ALSA_PLUGIN_DIR@
9
asound_module_ctldir = @ALSA_PLUGIN_DIR@
10
asound_module_confdir = @ALSA_PLUGIN_DIR@
10
asound_module_confdir = @ALSA_PLUGIN_DIR@
11
asound_module_datadir = @ALSA_DATA_DIR@/alsa.conf.d
11
asound_module_addondir = @ALSA_ADDON_DIR@
12
12
13
AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ $(PTHREAD_CFLAGS) $(pulseaudio_CFLAGS) -D_GNU_SOURCE
13
AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ $(PTHREAD_CFLAGS) $(pulseaudio_CFLAGS) -D_GNU_SOURCE
14
AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED)
14
AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED)
(-)a/rate-lavc/10-rate-lavc.conf (+28 lines)
Line 0 Link Here
1
pcm.lavcrate {
2
	@args [ SLAVE RATE CONVERTER ]
3
	@args.SLAVE {
4
		type string
5
		default "plug:hw"
6
	}
7
	@args.RATE {
8
		type integer
9
		default 48000
10
	}
11
	@args.CONVERTER {
12
		type string
13
		default "lavcrate"
14
	}
15
	type rate
16
	converter $CONVERTER
17
	slave {
18
		pcm $SLAVE
19
		rate $RATE
20
	}
21
	hint {
22
		show {
23
			@func refer
24
			name defaults.namehint.basic
25
		}
26
                description "Rate Converter Plugin Using AVC Library"
27
	}
28
}
(-)a/rate-lavc/Makefile.am (+4 lines)
Lines 1-6 Link Here
1
EXTRA_DIST = 10-rate-lavc.conf
2
1
asound_module_rate_lavcrate_LTLIBRARIES = libasound_module_rate_lavcrate.la
3
asound_module_rate_lavcrate_LTLIBRARIES = libasound_module_rate_lavcrate.la
4
asound_module_addon_DATA = 10-rate-lavc.conf
2
5
3
asound_module_rate_lavcratedir = @ALSA_PLUGIN_DIR@
6
asound_module_rate_lavcratedir = @ALSA_PLUGIN_DIR@
7
asound_module_addondir = @ALSA_ADDON_DIR@
4
8
5
AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ @AVCODEC_CFLAGS@ \
9
AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ @AVCODEC_CFLAGS@ \
6
	-DAVCODEC_HEADER="@AVCODEC_HEADER@"
10
	-DAVCODEC_HEADER="@AVCODEC_HEADER@"
(-)a/rate/10-samplerate.conf (+28 lines)
Line 0 Link Here
1
pcm.samplerate {
2
	@args [ SLAVE RATE CONVERTER ]
3
	@args.SLAVE {
4
		type string
5
		default "plug:hw"
6
	}
7
	@args.RATE {
8
		type integer
9
		default 48000
10
	}
11
	@args.CONVERTER {
12
		type string
13
		default "samplerate"
14
	}
15
	type rate
16
	converter $CONVERTER
17
	slave {
18
		pcm $SLAVE
19
		rate $RATE
20
	}
21
	hint {
22
		show {
23
			@func refer
24
			name defaults.namehint.basic
25
		}
26
                description "Rate Converter Plugin Using Samplerate Library"
27
	}
28
}
(-)a/rate/Makefile.am (+4 lines)
Lines 1-6 Link Here
1
EXTRA_DIST = 10-samplerate.conf
2
1
asound_module_rate_samplerate_LTLIBRARIES = libasound_module_rate_samplerate.la
3
asound_module_rate_samplerate_LTLIBRARIES = libasound_module_rate_samplerate.la
4
asound_module_addon_DATA = 10-samplerate.conf
2
5
3
asound_module_rate_sampleratedir = @ALSA_PLUGIN_DIR@
6
asound_module_rate_sampleratedir = @ALSA_PLUGIN_DIR@
7
asound_module_addondir = @ALSA_ADDON_DIR@
4
8
5
AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ $(samplerate_CFLAGS)
9
AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ $(samplerate_CFLAGS)
6
AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED)
10
AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED)
(-)a/speex/60-speex.conf (+63 lines)
Line 0 Link Here
1
pcm.speex {
2
	@args [ SLAVE AGC AGC_LEVEL DENOISE ECHO
3
                DEREVERB DEREVERB_DECAY DEREVERB_LEVEL
4
                FRAMES FILTER_LENGTH ]
5
	@args.SLAVE {
6
		type string
7
		default "plug:hw"
8
	}
9
	@args.AGC {
10
		type string
11
		default off
12
	}
13
	@args.AGC_LEVEL {
14
		type integer
15
		default 8000
16
	}
17
	@args.DENOISE {
18
		type string
19
		default on
20
	}
21
	@args.ECHO {
22
		type string
23
		default off
24
	}
25
	@args.DEREVERB {
26
		type string
27
		default off
28
	}
29
	@args.DEREVERB_DECAY {
30
		type real
31
		default 0
32
	}
33
	@args.DEREVERB_LEVEL {
34
		type real
35
		default 0
36
	}
37
	@args.FRAMES {
38
		type integer
39
		default 64
40
	}
41
	@args.FILTER_LENGTH {
42
		type integer
43
		default 256
44
	}
45
	type speex
46
	agc $AGC
47
	agc_level $AGC_LEVEL
48
	denoise $DENOISE
49
	echo $ECHO
50
	dereverb $DEREVERB
51
	dereverb_decay $DEREVERB_DECAY
52
	dereverb_level $DEREVERB_LEVEL
53
	frames $FRAMES
54
	filter_length $FILTER_LENGTH
55
	slave.pcm $SLAVE
56
	hint {
57
		show {
58
			@func refer
59
			name defaults.namehint.basic
60
		}
61
                description "Plugin using Speex DSP (resample, agc, denoise, echo, dereverb)"
62
	}
63
}
(-)a/speex/Makefile.am (+4 lines)
Lines 1-6 Link Here
1
EXTRA_DIST = 60-speex.conf
2
1
asound_module_pcm_speex_LTLIBRARIES = libasound_module_pcm_speex.la
3
asound_module_pcm_speex_LTLIBRARIES = libasound_module_pcm_speex.la
4
asound_module_addon_DATA = 60-speex.conf
2
5
3
asound_module_pcm_speexdir = @ALSA_PLUGIN_DIR@
6
asound_module_pcm_speexdir = @ALSA_PLUGIN_DIR@
7
asound_module_addondir = @ALSA_ADDON_DIR@
4
8
5
AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ @speexdsp_CFLAGS@
9
AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ @speexdsp_CFLAGS@
6
AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED)
10
AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED)
(-)a/usb_stream/98-usb-stream.conf (+27 lines)
Line 0 Link Here
1
pcm.usbstream {
2
	@args [ CARD RATE PERIOD_SIZE ]
3
	@args.CARD {
4
		type string
5
		default {
6
			func refer
7
			name defaults.pcm.card
8
		}
9
	}
10
	@args.RATE {
11
		type integer
12
	}
13
	@args.PERIOD_SIZE {
14
		type integer
15
	}
16
	type usb_stream
17
	card $CARD
18
	rate $RATE
19
	period_size $PERIOD_SIZE
20
	hint {
21
		show {
22
			@func refer
23
			name defaults.namehint.basic
24
		}
25
                description "USB Stream Output"
26
	}
27
}
(-)a/usb_stream/Makefile.am (-2 / +4 lines)
Lines 1-6 Link Here
1
EXTRA_DIST = 98-usb-stream.conf
2
1
asound_module_pcm_usb_stream_LTLIBRARIES = libasound_module_pcm_usb_stream.la
3
asound_module_pcm_usb_stream_LTLIBRARIES = libasound_module_pcm_usb_stream.la
4
asound_module_addon_DATA = 98-usb-stream.conf
2
5
3
asound_module_pcm_usb_streamdir = @ALSA_PLUGIN_DIR@
6
asound_module_pcm_usb_streamdir = @ALSA_PLUGIN_DIR@
7
asound_module_addondir = @ALSA_ADDON_DIR@
4
8
5
AM_CFLAGS = -Wall -g @ALSA_CFLAGS@
9
AM_CFLAGS = -Wall -g @ALSA_CFLAGS@
6
AM_LDFLAGS = -module -avoid-version -export-dynamic $(LDFLAGS_NOUNDEFINED)
10
AM_LDFLAGS = -module -avoid-version -export-dynamic $(LDFLAGS_NOUNDEFINED)
7
- 
8
--
9
Makefile.am     | 21 ++++++++++++++++++---
11
Makefile.am     | 21 ++++++++++++++++++---
10
configure.ac    | 20 +++++++++++++++++++-
12
configure.ac    | 20 +++++++++++++++++++-
11
doc/Makefile.am | 37 ++++++++++++++++++++++++++++++++++---
13
doc/Makefile.am | 37 ++++++++++++++++++++++++++++++++++---
12
3 files changed, 71 insertions(+), 7 deletions(-)
14
3 files changed, 71 insertions(+), 7 deletions(-)
(-)a/Makefile.am (-3 / +18 lines)
Lines 1-4 Link Here
1
SUBDIRS = oss mix usb_stream arcam-av doc
1
SUBDIRS = doc
2
if HAVE_OSS
3
SUBDIRS += oss
4
endif
5
if HAVE_MIX
6
SUBDIRS += mix
7
endif
2
if HAVE_JACK
8
if HAVE_JACK
3
SUBDIRS += jack
9
SUBDIRS += jack
4
endif
10
endif
Lines 8-15 endif Link Here
8
if HAVE_SAMPLERATE
14
if HAVE_SAMPLERATE
9
SUBDIRS += rate
15
SUBDIRS += rate
10
endif
16
endif
11
if HAVE_AVCODEC
17
if HAVE_A52
12
SUBDIRS += a52 rate-lavc
18
SUBDIRS += a52
19
endif
20
if HAVE_AVCRATE
21
SUBDIRS += rate-lavc
22
endif
23
if HAVE_USBSTREAM
24
SUBDIRS += usb_stream
25
endif
26
if HAVE_ARCAMAV
27
SUBDIRS += arcam-av
13
endif
28
endif
14
if HAVE_MAEMO_PLUGIN
29
if HAVE_MAEMO_PLUGIN
15
SUBDIRS += maemo
30
SUBDIRS += maemo
(-)a/configure.ac (-1 / +19 lines)
Lines 135-140 AC_SUBST(AVCODEC_CFLAGS) Link Here
135
AC_SUBST(AVCODEC_LIBS)
135
AC_SUBST(AVCODEC_LIBS)
136
AC_SUBST(AVCODEC_HEADER)
136
AC_SUBST(AVCODEC_HEADER)
137
137
138
AC_ARG_ENABLE([a52],
139
      AS_HELP_STRING([--disable-a52], [Disable building of A52 encoder plugin]))
140
141
if test "x$enable_a52" != "xno" -a "$HAVE_AVCODEC" = "yes"; then
142
  HAVE_A52=yes
143
fi
144
AM_CONDITIONAL(HAVE_A52, test x$HAVE_A52 = xyes)
145
146
AC_ARG_ENABLE([avcrate],
147
      AS_HELP_STRING([--disable-avcrate], [Disable building of AVC rate plugin]))
148
149
if test "x$enable_avcrate" != "xno" -a "$HAVE_AVCODEC" = "yes"; then
150
  HAVE_AVCRATE=yes
151
fi
152
AM_CONDITIONAL(HAVE_AVCRATE, test x$HAVE_AVCRATE = xyes)
153
138
AC_ARG_ENABLE([speexdsp],
154
AC_ARG_ENABLE([speexdsp],
139
      AS_HELP_STRING([--disable-speexdsp], [Disable building of speexdsp plugin]))
155
      AS_HELP_STRING([--disable-speexdsp], [Disable building of speexdsp plugin]))
140
156
Lines 260-271 if test "$HAVE_SAMPLERATE" = "yes"; then Link Here
260
fi
276
fi
261
echo "Maemo plugin:       $HAVE_MAEMO_PLUGIN"
277
echo "Maemo plugin:       $HAVE_MAEMO_PLUGIN"
262
echo "  Using Osso resource manager: $use_maemo_rm"
278
echo "  Using Osso resource manager: $use_maemo_rm"
263
echo "A52, lavc plugins:  $HAVE_AVCODEC"
264
if test "$HAVE_AVCODEC" = "yes"; then
279
if test "$HAVE_AVCODEC" = "yes"; then
280
  echo "AVCodec config:"
265
  echo "  AVCODEC_CFLAGS: $AVCODEC_CFLAGS"
281
  echo "  AVCODEC_CFLAGS: $AVCODEC_CFLAGS"
266
  echo "  AVCODEC_LIBS: $AVCODEC_LIBS"
282
  echo "  AVCODEC_LIBS: $AVCODEC_LIBS"
267
  echo "  AVCODEC_HEADER: $AVCODEC_HEADER"
283
  echo "  AVCODEC_HEADER: $AVCODEC_HEADER"
268
fi
284
fi
285
echo "A52 plugin:         $HAVE_A52"
286
echo "AVC rate plugin:    $HAVE_AVCRATE"
269
echo "Speex rate plugin:  $PPH"
287
echo "Speex rate plugin:  $PPH"
270
echo "Speex preprocess plugin:  $HAVE_SPEEXDSP"
288
echo "Speex preprocess plugin:  $HAVE_SPEEXDSP"
271
if test "$HAVE_SPEEX" = "yes"; then
289
if test "$HAVE_SPEEX" = "yes"; then
(-)a/doc/Makefile.am (-9 / +34 lines)
Lines 1-4 Link Here
1
EXTRA_DIST = README-pcm-oss README-jack README-pulse README-maemo \
1
EXTRA_DIST =
2
	upmix.txt vdownmix.txt samplerate.txt a52.txt lavcrate.txt \
3
	speexrate.txt speexdsp.txt README-arcam-av
4
2
5
- 
3
if HAVE_OSS
4
EXTRA_DIST += README-pcm-oss
5
endif
6
if HAVE_MIX
7
EXTRA_DIST += upmix.txt vdownmix.txt
8
endif
9
if HAVE_JACK
10
EXTRA_DIST += README-jack
11
endif
12
if HAVE_PULSE
13
EXTRA_DIST += README-pulse
14
endif
15
if HAVE_MAEMO_PLUGIN
16
EXTRA_DIST += README-maemo
17
endif
18
if HAVE_SAMPLERATE
19
EXTRA_DIST += samplerate.txt
20
endif
21
if HAVE_A52
22
EXTRA_DIST += a52.txt
23
endif
24
if HAVE_AVCRATE
25
EXTRA_DIST += lavcrate.txt
26
endif
27
if HAVE_PPH
28
EXTRA_DIST += speexrate.txt
29
endif
30
if HAVE_SPEEXDSP
31
EXTRA_DIST += speexdsp.txt
32
endif
33
if HAVE_ARCAMAV
34
EXTRA_DIST += README-arcam-av
35
endif
6
libavresample
36
libavresample
7
 --disable-avcodec renamed to --disable-libav
8
 --avcodec-includedir renamed to --libav-includedir
9
 --avcodec-libdir renamed to --libav-libdir
10
 --disable-lavcrate renamed to --disable-lavrate
11
--
12
Makefile.am                                        |   4 +-
37
Makefile.am                                        |   4 +-
13
a52/Makefile.am                                    |   5 +-
38
a52/Makefile.am                                    |   5 +-
14
a52/pcm_a52.c                                      |   2 +-
39
a52/pcm_a52.c                                      |   2 +-
15
configure.ac                                       |  85 +++---
40
configure.ac                                       |  85 +++---
16
doc/Makefile.am                                    |   4 +-
41
doc/Makefile.am                                    |   4 +-
17
doc/{lavcrate.txt => lavrate.txt}                  |  10 +-
42
doc/{lavcrate.txt => lavrate.txt}                  |  10 +-
18
.../10-rate-lavc.conf => rate-lav/10-rate-lav.conf |   6 +-
43
.../10-rate-lavc.conf => rate-lav/10-rate-lav.conf |   6 +-
19
rate-lav/Makefile.am                               |  25 ++
44
rate-lav/Makefile.am                               |  25 ++
20
{rate-lavc => rate-lav}/gcd.h                      |   0
45
{rate-lavc => rate-lav}/gcd.h                      |   0
21
rate-lav/rate_lavrate.c                            | 235 +++++++++++++++++
46
rate-lav/rate_lavrate.c                            | 235 +++++++++++++++++
22
rate-lavc/Makefile.am                              |  26 --
47
rate-lavc/Makefile.am                              |  26 --
23
rate-lavc/rate_lavcrate.c                          | 291 ---------------------
48
rate-lavc/rate_lavcrate.c                          | 291 ---------------------
24
12 files changed, 311 insertions(+), 382 deletions(-)
49
12 files changed, 311 insertions(+), 382 deletions(-)
25
rename doc/{lavcrate.txt => lavrate.txt} (76%)
50
rename doc/{lavcrate.txt => lavrate.txt} (76%)
26
rename rate-lavc/10-rate-lavc.conf => rate-lav/10-rate-lav.conf (73%)
51
rename rate-lavc/10-rate-lavc.conf => rate-lav/10-rate-lav.conf (73%)
27
create mode 100644 rate-lav/Makefile.am
52
create mode 100644 rate-lav/Makefile.am
28
rename {rate-lavc => rate-lav}/gcd.h (100%)
53
rename {rate-lavc => rate-lav}/gcd.h (100%)
29
create mode 100644 rate-lav/rate_lavrate.c
54
create mode 100644 rate-lav/rate_lavrate.c
30
delete mode 100644 rate-lavc/Makefile.am
55
delete mode 100644 rate-lavc/Makefile.am
31
delete mode 100644 rate-lavc/rate_lavcrate.c
56
delete mode 100644 rate-lavc/rate_lavcrate.c
(-)a/Makefile.am (-2 / +2 lines)
Lines 17-24 endif Link Here
17
if HAVE_A52
17
if HAVE_A52
18
SUBDIRS += a52
18
SUBDIRS += a52
19
endif
19
endif
20
if HAVE_AVCRATE
20
if HAVE_LAVRATE
21
SUBDIRS += rate-lavc
21
SUBDIRS += rate-lav
22
endif
22
endif
23
if HAVE_USBSTREAM
23
if HAVE_USBSTREAM
24
SUBDIRS += usb_stream
24
SUBDIRS += usb_stream
(-)a/a52/Makefile.am (-3 / +2 lines)
Lines 6-14 asound_module_addon_DATA = 60-a52-encoder.conf Link Here
6
asound_module_pcm_a52dir = @ALSA_PLUGIN_DIR@
6
asound_module_pcm_a52dir = @ALSA_PLUGIN_DIR@
7
asound_module_addondir = @ALSA_ADDON_DIR@
7
asound_module_addondir = @ALSA_ADDON_DIR@
8
8
9
AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ @AVCODEC_CFLAGS@ \
9
AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ @LIBAV_CFLAGS@
10
	-DAVCODEC_HEADER="@AVCODEC_HEADER@"
11
AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED)
10
AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED)
12
11
13
libasound_module_pcm_a52_la_SOURCES = pcm_a52.c
12
libasound_module_pcm_a52_la_SOURCES = pcm_a52.c
14
libasound_module_pcm_a52_la_LIBADD = @ALSA_LIBS@ @AVCODEC_LIBS@
13
libasound_module_pcm_a52_la_LIBADD = @ALSA_LIBS@ @LIBAV_LIBS@ @LIBAV_CODEC_LIBS@
(-)a/a52/pcm_a52.c (-1 / +1 lines)
Lines 25-31 Link Here
25
#include <alsa/asoundlib.h>
25
#include <alsa/asoundlib.h>
26
#include <alsa/pcm_external.h>
26
#include <alsa/pcm_external.h>
27
#include <alsa/pcm_plugin.h>
27
#include <alsa/pcm_plugin.h>
28
#include AVCODEC_HEADER
28
#include <libavcodec/avcodec.h>
29
#include <libavutil/avutil.h>
29
#include <libavutil/avutil.h>
30
30
31
/* some compatibility wrappers */
31
/* some compatibility wrappers */
(-)a/configure.ac (-49 / +36 lines)
Lines 89-155 if test "$use_maemo_rm" = "yes"; then Link Here
89
        fi
89
        fi
90
fi
90
fi
91
91
92
AC_ARG_ENABLE([avcodec],
92
AC_ARG_ENABLE([libav],
93
      AS_HELP_STRING([--disable-avcodec], [Don't build plugins depending on avcodec (a52)]))
93
      AS_HELP_STRING([--disable-avlib], [Do not build plugins depending on libav/ffmpeg (a52,lavrate...)]))
94
94
95
if test "x$enable_avcodec" != "xno"; then
95
if test "x$enable_libav" != "xno"; then
96
  PKG_CHECK_MODULES(AVCODEC, [libavcodec libavutil], [HAVE_AVCODEC=yes], [HAVE_AVCODEC=no])
96
  PKG_CHECK_MODULES(LIBAV, [libavcodec libavutil libavresample], [HAVE_LIBAV=yes], [HAVE_LIBAV=no])
97
fi
97
fi
98
98
99
if test "x$HAVE_AVCODEC" = "xno"; then
99
if test "x$HAVE_LIBAV" = "xno"; then
100
  AC_ARG_WITH([avcodec-includedir],
100
  AC_ARG_WITH([libav-includedir],
101
	AS_HELP_STRING([--with-avcodec-includedir=dir],
101
	AS_HELP_STRING([--with-libav-includedir=dir],
102
		[AVcodec include directory]),
102
		[Libav/ffmpeg include directory]),
103
	[AVCODEC_CFLAGS="-I$withval"], [AVCODEC_CFLAGS=""])
103
		[LIBAV_CFLAGS="-I$(withval)"], [LIBAV_CFLAGS=""])
104
  AC_ARG_WITH([avcodec-libdir],
104
  AC_ARG_WITH([libav-libdir],
105
	AS_HELP_STRING([--with-avcodec-libdir=dir],
105
	AS_HELP_STRING([--with-libav-libdir=dir],
106
		[AVcodec library directory]),
106
		[Libav/ffmpeg library directory]),
107
	[AVCODEC_LIBS="-L$withval"], [AVCODEC_LIBS=""])
107
		[LIBAV_LIBS="-L$withval"], [LIBAV_LIBS=""])
108
108
109
  CFLAGS_saved="$CFLAGS"
109
  CFLAGS_saved="$CFLAGS"
110
  LDFLAGS_saved="$LDFLAGS"
110
  LDFLAGS_saved="$LDFLAGS"
111
  CFLAGS="$CFLAGS $AVCODEC_CFLAGS"
111
  CFLAGS="$CFLAGS $LIBAV_CFLAGS"
112
  LDFLAGS="$LDFLAGS $AVCODEC_LIBS"
112
  LDFLAGS="$LDFLAGS $LIBAV_LIBS"
113
  AVCODEC_LIBS="$AVCODEC_LIBS -lavcodec"
113
  AC_CHECK_LIB([avcodec], [avcodec_open], [HAVE_LIBAV=yes], [HAVE_LIBAV=no])
114
  AC_CHECK_LIB([avcodec], [avcodec_open], [HAVE_AVCODEC=yes], [HAVE_AVCODEC=no])
115
  CFLAGS="$CFLAGS_saved"
114
  CFLAGS="$CFLAGS_saved"
116
  LDFLAGS="$LDFLAGS_saved"
115
  LDFLAGS="$LDFLAGS_saved"
116
  LIBAV_CODEC_LIBS="-lavcodec"
117
  LIBAV_RESAMPLE_LIBS="-lavresample -lavutil"
117
fi
118
fi
118
119
119
if test $HAVE_AVCODEC = yes; then
120
AM_CONDITIONAL(HAVE_LIBAV, test x$HAVE_LIBAV = xyes)
120
  AVCODEC_HEADER=""
121
AC_SUBST(LIBAV_CFLAGS)
121
  CFLAGS_saved="$CFLAGS"
122
AC_SUBST(LIBAV_LIBS)
122
  CFLAGS="$CFLAGS $AVCODEC_CFLAGS"
123
AC_SUBST(LIBAV_CODEC_LIBS)
123
  AC_CHECK_HEADER([ffmpeg/avcodec.h], [AVCODEC_HEADER='<ffmpeg/avcodec.h>'])
124
AC_SUBST(LIBAV_RESAMPLE_LIBS)
124
  if test -z "$AVCODEC_HEADER"; then
125
    AC_CHECK_HEADER([libavcodec/avcodec.h], [AVCODEC_HEADER='<libavcodec/avcodec.h>'])
126
  fi
127
  if test -z "$AVCODEC_HEADER"; then
128
    HAVE_AVCODEC=no
129
  fi
130
  CFLAGS="$CFLAGS_saved"
131
fi
132
133
AM_CONDITIONAL(HAVE_AVCODEC, test x$HAVE_AVCODEC = xyes)
134
AC_SUBST(AVCODEC_CFLAGS)
135
AC_SUBST(AVCODEC_LIBS)
136
AC_SUBST(AVCODEC_HEADER)
137
125
138
AC_ARG_ENABLE([a52],
126
AC_ARG_ENABLE([a52],
139
      AS_HELP_STRING([--disable-a52], [Disable building of A52 encoder plugin]))
127
      AS_HELP_STRING([--disable-a52], [Disable building of A52 encoder plugin]))
140
128
141
if test "x$enable_a52" != "xno" -a "$HAVE_AVCODEC" = "yes"; then
129
if test "x$enable_a52" != "xno" -a "$HAVE_LIBAV" = "yes"; then
142
  HAVE_A52=yes
130
  HAVE_A52=yes
143
fi
131
fi
144
AM_CONDITIONAL(HAVE_A52, test x$HAVE_A52 = xyes)
132
AM_CONDITIONAL(HAVE_A52, test x$HAVE_A52 = xyes)
145
133
146
AC_ARG_ENABLE([avcrate],
134
AC_ARG_ENABLE([lavrate],
147
      AS_HELP_STRING([--disable-avcrate], [Disable building of AVC rate plugin]))
135
      AS_HELP_STRING([--disable-lavrate], [Disable building of libav/ffmpeg rate plugin]))
148
136
149
if test "x$enable_avcrate" != "xno" -a "$HAVE_AVCODEC" = "yes"; then
137
if test "x$enable_lavrate" != "xno" -a "$HAVE_LIBAV" = "yes"; then
150
  HAVE_AVCRATE=yes
138
  HAVE_LAVRATE=yes
151
fi
139
fi
152
AM_CONDITIONAL(HAVE_AVCRATE, test x$HAVE_AVCRATE = xyes)
140
AM_CONDITIONAL(HAVE_LAVRATE, test x$HAVE_LAVRATE = xyes)
153
141
154
AC_ARG_ENABLE([speexdsp],
142
AC_ARG_ENABLE([speexdsp],
155
      AS_HELP_STRING([--disable-speexdsp], [Disable building of speexdsp plugin]))
143
      AS_HELP_STRING([--disable-speexdsp], [Disable building of speexdsp plugin]))
Lines 245-251 AC_OUTPUT([ Link Here
245
	mix/Makefile
233
	mix/Makefile
246
	rate/Makefile
234
	rate/Makefile
247
	a52/Makefile
235
	a52/Makefile
248
	rate-lavc/Makefile
236
	rate-lav/Makefile
249
	maemo/Makefile
237
	maemo/Makefile
250
	doc/Makefile
238
	doc/Makefile
251
	usb_stream/Makefile
239
	usb_stream/Makefile
Lines 276-289 if test "$HAVE_SAMPLERATE" = "yes"; then Link Here
276
fi
264
fi
277
echo "Maemo plugin:       $HAVE_MAEMO_PLUGIN"
265
echo "Maemo plugin:       $HAVE_MAEMO_PLUGIN"
278
echo "  Using Osso resource manager: $use_maemo_rm"
266
echo "  Using Osso resource manager: $use_maemo_rm"
279
if test "$HAVE_AVCODEC" = "yes"; then
267
if test "$HAVE_LIBAV" = "yes"; then
280
  echo "AVCodec config:"
268
  echo "Libav/ffmpeg config:"
281
  echo "  AVCODEC_CFLAGS: $AVCODEC_CFLAGS"
269
  echo "  LIBAV_CFLAGS:   $LIBAV_CFLAGS"
282
  echo "  AVCODEC_LIBS: $AVCODEC_LIBS"
270
  echo "  LIBAV_LIBS:     $LIBAV_LIBS / $LIBAV_CODEC_LIBS / $LIBAV_RESAMPLE_LIBS"
283
  echo "  AVCODEC_HEADER: $AVCODEC_HEADER"
284
fi
271
fi
285
echo "A52 plugin:         $HAVE_A52"
272
echo "Libav A52 plugin:   $HAVE_A52"
286
echo "AVC rate plugin:    $HAVE_AVCRATE"
273
echo "Libav rate plugin:  $HAVE_LAVRATE"
287
echo "Speex rate plugin:  $PPH"
274
echo "Speex rate plugin:  $PPH"
288
echo "Speex preprocess plugin:  $HAVE_SPEEXDSP"
275
echo "Speex preprocess plugin:  $HAVE_SPEEXDSP"
289
if test "$HAVE_SPEEX" = "yes"; then
276
if test "$HAVE_SPEEX" = "yes"; then
(-)a/doc/Makefile.am (-2 / +2 lines)
Lines 21-28 endif Link Here
21
if HAVE_A52
21
if HAVE_A52
22
EXTRA_DIST += a52.txt
22
EXTRA_DIST += a52.txt
23
endif
23
endif
24
if HAVE_AVCRATE
24
if HAVE_LAVRATE
25
EXTRA_DIST += lavcrate.txt
25
EXTRA_DIST += lavrate.txt
26
endif
26
endif
27
if HAVE_PPH
27
if HAVE_PPH
28
EXTRA_DIST += speexrate.txt
28
EXTRA_DIST += speexrate.txt
(-)a/doc/lavcrate.txt (-5 / +5 lines)
Lines 1-14 Link Here
1
Rate Converter Plugin Using libavcodec
1
Rate Converter Plugin Using libavresample
2
======================================
2
=========================================0
3
3
4
The plugin in rate-lavc subdirectory is an external rate converter using
4
The plugin in rate-lavr subdirectory is an external rate converter using
5
libavcodec's resampler.  You can use this rate converter plugin by defining a
5
libavresample library. You can use this rate converter plugin by defining a
6
rate PCM with "converter" parameter, such as:
6
rate PCM with "converter" parameter, such as:
7
7
8
	pcm.my_rate {
8
	pcm.my_rate {
9
		type rate
9
		type rate
10
		slave.pcm "hw"
10
		slave.pcm "hw"
11
		converter "lavcrate"
11
		converter "lavrate"
12
	}
12
	}
13
13
14
The plug plugin has also a similar field, "rate_converter".
14
The plug plugin has also a similar field, "rate_converter".
(-)a/rate-lavc/10-rate-lavc.conf (-3 / +3 lines)
Lines 1-4 Link Here
1
pcm.lavcrate {
1
pcm.lavrate {
2
	@args [ SLAVE RATE CONVERTER ]
2
	@args [ SLAVE RATE CONVERTER ]
3
	@args.SLAVE {
3
	@args.SLAVE {
4
		type string
4
		type string
Lines 10-16 pcm.lavcrate { Link Here
10
	}
10
	}
11
	@args.CONVERTER {
11
	@args.CONVERTER {
12
		type string
12
		type string
13
		default "lavcrate"
13
		default "lavrate"
14
	}
14
	}
15
	type rate
15
	type rate
16
	converter $CONVERTER
16
	converter $CONVERTER
Lines 23-28 pcm.lavcrate { Link Here
23
			@func refer
23
			@func refer
24
			name defaults.namehint.basic
24
			name defaults.namehint.basic
25
		}
25
		}
26
                description "Rate Converter Plugin Using AVC Library"
26
                description "Rate Converter Plugin Using Libav/FFmpeg Library"
27
	}
27
	}
28
}
28
}
(-)a/rate-lav/Makefile.am (+25 lines)
Line 0 Link Here
1
EXTRA_DIST = 10-rate-lav.conf
2
3
asound_module_rate_lavrate_LTLIBRARIES = libasound_module_rate_lavrate.la
4
asound_module_addon_DATA = 10-rate-lav.conf
5
6
asound_module_rate_lavratedir = @ALSA_PLUGIN_DIR@
7
asound_module_addondir = @ALSA_ADDON_DIR@
8
9
AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ @LIBAV_CFLAGS@
10
AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED)
11
12
libasound_module_rate_lavrate_la_SOURCES = rate_lavrate.c
13
libasound_module_rate_lavrate_la_LIBADD = @ALSA_LIBS@ @LIBAV_LIBS@ @LIBAV_RESAMPLE_LIBS@
14
15
noinst_HEADERS = gcd.h
16
17
install-exec-hook:
18
	rm -f $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_lavrate_*.so
19
	$(LN_S) libasound_module_rate_lavrate.so $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_lavrate_higher.so
20
	$(LN_S) libasound_module_rate_lavrate.so $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_lavrate_high.so
21
	$(LN_S) libasound_module_rate_lavrate.so $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_lavrate_fast.so
22
	$(LN_S) libasound_module_rate_lavrate.so $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_lavrate_faster.so
23
24
uninstall-hook:
25
	rm -f $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_lavrate_*.so
(-)a/rate-lav/rate_lavrate.c (+235 lines)
Line 0 Link Here
1
/*
2
 * Rate converter plugin using libavresample
3
 * Copyright (c) 2014 by Anton Khirnov
4
 *
5
 * This library is free software; you can redistribute it and/or
6
 * modify it under the terms of the GNU Lesser General Public
7
 * License as published by the Free Software Foundation; either
8
 * version 2.1 of the License, or (at your option) any later version.
9
 *
10
 * This library is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
 * Lesser General Public License for more details.
14
 */
15
16
#include <stdio.h>
17
#include <alsa/asoundlib.h>
18
#include <alsa/pcm_rate.h>
19
20
#include <libavresample/avresample.h>
21
#include <libavutil/channel_layout.h>
22
#include <libavutil/opt.h>
23
#include <libavutil/mathematics.h>
24
#include <libavutil/samplefmt.h>
25
26
27
static unsigned int filter_size = 16;
28
static unsigned int phase_shift = 10; /* auto-adjusts */
29
static double cutoff = 0; /* auto-adjusts */
30
31
struct rate_src {
32
	AVAudioResampleContext *avr;
33
34
	unsigned int in_rate;
35
	unsigned int out_rate;
36
	unsigned int channels;
37
};
38
39
static snd_pcm_uframes_t input_frames(void *obj ATTRIBUTE_UNUSED,
40
				      snd_pcm_uframes_t frames)
41
{
42
	return frames;
43
}
44
45
static snd_pcm_uframes_t output_frames(void *obj ATTRIBUTE_UNUSED,
46
				       snd_pcm_uframes_t frames)
47
{
48
	return frames;
49
}
50
51
static void pcm_src_free(void *obj)
52
{
53
	struct rate_src *rate = obj;
54
	avresample_free(&rate->avr);
55
}
56
57
static int pcm_src_init(void *obj, snd_pcm_rate_info_t *info)
58
{
59
	struct rate_src *rate = obj;
60
	int i, ir, or;
61
62
	if (!rate->avr || rate->channels != info->channels) {
63
		int ret;
64
65
		pcm_src_free(rate);
66
		rate->channels = info->channels;
67
		ir = rate->in_rate = info->in.rate;
68
		or = rate->out_rate = info->out.rate;
69
		i = av_gcd(or, ir);
70
		if (or > ir) {
71
			phase_shift = or/i;
72
		} else {
73
			phase_shift = ir/i;
74
		}
75
		if (cutoff <= 0.0) {
76
			cutoff = 1.0 - 1.0/filter_size;
77
			if (cutoff < 0.80)
78
				cutoff = 0.80;
79
		}
80
81
		rate->avr = avresample_alloc_context();
82
		if (!rate->avr)
83
			return -ENOMEM;
84
85
		av_opt_set_int(rate->avr, "in_sample_rate",     info->in.rate,  0);
86
		av_opt_set_int(rate->avr, "out_sample_rate",    info->out.rate, 0);
87
		av_opt_set_int(rate->avr, "in_sample_format",   AV_SAMPLE_FMT_S16, 0);
88
		av_opt_set_int(rate->avr, "out_sample_format",  AV_SAMPLE_FMT_S16, 0);
89
		av_opt_set_int(rate->avr, "in_channel_layout",  av_get_default_channel_layout(rate->channels), 0);
90
		av_opt_set_int(rate->avr, "out_channel_layout", av_get_default_channel_layout(rate->channels), 0);
91
92
		av_opt_set_int(rate->avr, "filter_size",        filter_size, 0);
93
		av_opt_set_int(rate->avr, "phase_shift",        phase_shift, 0);
94
		av_opt_set_double(rate->avr, "cutoff",          cutoff,      0);
95
96
		ret = avresample_open(rate->avr);
97
		if (ret < 0) {
98
			avresample_free(&rate->avr);
99
			return -EINVAL;
100
		}
101
	}
102
103
	return 0;
104
}
105
106
static int pcm_src_adjust_pitch(void *obj, snd_pcm_rate_info_t *info)
107
{
108
	struct rate_src *rate = obj;
109
110
	if (info->out.rate != rate->out_rate || info->in.rate != rate->in_rate)
111
		pcm_src_init(obj, info);
112
	return 0;
113
}
114
115
static void pcm_src_reset(void *obj)
116
{
117
	struct rate_src *rate = obj;
118
119
	if (rate->avr) {
120
#if 0
121
		avresample_close(rate->avr);
122
		avresample_open(rate->avr);
123
#endif
124
	}
125
}
126
127
static void pcm_src_convert_s16(void *obj, int16_t *dst,
128
				unsigned int dst_frames,
129
				const int16_t *src,
130
				unsigned int src_frames)
131
{
132
	struct rate_src *rate = obj;
133
	int chans = rate->channels;
134
	unsigned int total_in = avresample_get_delay(rate->avr) + src_frames;
135
136
	avresample_convert(rate->avr, (uint8_t **)&dst, dst_frames * chans * 2, dst_frames,
137
	                   (uint8_t **)&src, src_frames * chans * 2, src_frames);
138
139
	avresample_set_compensation(rate->avr,
140
                                    total_in - src_frames > filter_size ? 0 : 1, src_frames);
141
}
142
143
static void pcm_src_close(void *obj)
144
{
145
	pcm_src_free(obj);
146
}
147
148
#if SND_PCM_RATE_PLUGIN_VERSION >= 0x010002
149
static int get_supported_rates(void *obj ATTRIBUTE_UNUSED,
150
			       unsigned int *rate_min,
151
			       unsigned int *rate_max)
152
{
153
	*rate_min = *rate_max = 0; /* both unlimited */
154
	return 0;
155
}
156
157
static void dump(void *obj ATTRIBUTE_UNUSED, snd_output_t *out)
158
{
159
	snd_output_printf(out, "Converter: libavr\n");
160
}
161
#endif
162
163
static snd_pcm_rate_ops_t pcm_src_ops = {
164
	.close = pcm_src_close,
165
	.init = pcm_src_init,
166
	.free = pcm_src_free,
167
	.reset = pcm_src_reset,
168
	.adjust_pitch = pcm_src_adjust_pitch,
169
	.convert_s16 = pcm_src_convert_s16,
170
	.input_frames = input_frames,
171
	.output_frames = output_frames,
172
#if SND_PCM_RATE_PLUGIN_VERSION >= 0x010002
173
	.version = SND_PCM_RATE_PLUGIN_VERSION,
174
	.get_supported_rates = get_supported_rates,
175
	.dump = dump,
176
#endif
177
};
178
179
int pcm_src_open(unsigned int version, void **objp, snd_pcm_rate_ops_t *ops)
180
181
{
182
	struct rate_src *rate;
183
184
#if SND_PCM_RATE_PLUGIN_VERSION < 0x010002
185
	if (version != SND_PCM_RATE_PLUGIN_VERSION) {
186
		fprintf(stderr, "Invalid rate plugin version %x\n", version);
187
		return -EINVAL;
188
	}
189
#endif
190
	rate = calloc(1, sizeof(*rate));
191
	if (!rate)
192
		return -ENOMEM;
193
194
	*objp = rate;
195
	rate->avr = NULL;
196
#if SND_PCM_RATE_PLUGIN_VERSION >= 0x010002
197
	if (version == 0x010001)
198
		memcpy(ops, &pcm_src_ops, sizeof(snd_pcm_rate_old_ops_t));
199
	else
200
#endif
201
		*ops = pcm_src_ops;
202
	return 0;
203
}
204
205
int SND_PCM_RATE_PLUGIN_ENTRY(lavrate)(unsigned int version, void **objp,
206
			snd_pcm_rate_ops_t *ops)
207
{
208
	return pcm_src_open(version, objp, ops);
209
}
210
int SND_PCM_RATE_PLUGIN_ENTRY(lavrate_higher)(unsigned int version,
211
			void **objp, snd_pcm_rate_ops_t *ops)
212
{
213
	filter_size = 64;
214
	return pcm_src_open(version, objp, ops);
215
}
216
int SND_PCM_RATE_PLUGIN_ENTRY(lavrate_high)(unsigned int version,
217
			void **objp, snd_pcm_rate_ops_t *ops)
218
{
219
	filter_size = 32;
220
	return pcm_src_open(version, objp, ops);
221
}
222
int SND_PCM_RATE_PLUGIN_ENTRY(lavrate_fast)(unsigned int version,
223
			void **objp, snd_pcm_rate_ops_t *ops)
224
{
225
	filter_size = 8;
226
	return pcm_src_open(version, objp, ops);
227
}
228
int SND_PCM_RATE_PLUGIN_ENTRY(lavrate_faster)(unsigned int version,
229
			void **objp, snd_pcm_rate_ops_t *ops)
230
{
231
	filter_size = 4;
232
	return pcm_src_open(version, objp, ops);
233
}
234
235
(-)a/rate-lavc/Makefile.am (-26 lines)
Lines 1-26 Link Here
1
EXTRA_DIST = 10-rate-lavc.conf
2
3
asound_module_rate_lavcrate_LTLIBRARIES = libasound_module_rate_lavcrate.la
4
asound_module_addon_DATA = 10-rate-lavc.conf
5
6
asound_module_rate_lavcratedir = @ALSA_PLUGIN_DIR@
7
asound_module_addondir = @ALSA_ADDON_DIR@
8
9
AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ @AVCODEC_CFLAGS@ \
10
	-DAVCODEC_HEADER="@AVCODEC_HEADER@"
11
AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED)
12
13
libasound_module_rate_lavcrate_la_SOURCES = rate_lavcrate.c
14
libasound_module_rate_lavcrate_la_LIBADD = @ALSA_LIBS@ @AVCODEC_LIBS@
15
16
noinst_HEADERS = gcd.h
17
18
install-exec-hook:
19
	rm -f $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_lavcrate_*.so
20
	$(LN_S) libasound_module_rate_lavcrate.so $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_lavcrate_higher.so
21
	$(LN_S) libasound_module_rate_lavcrate.so $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_lavcrate_high.so
22
	$(LN_S) libasound_module_rate_lavcrate.so $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_lavcrate_fast.so
23
	$(LN_S) libasound_module_rate_lavcrate.so $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_lavcrate_faster.so
24
25
uninstall-hook:
26
	rm -f $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_lavcrate_*.so
(-)a/rate-lavc/rate_lavcrate.c (-293 lines)
Lines 1-291 Link Here
1
/*
2
 * Rate converter plugin using libavcodec's resampler
3
 * Copyright (c) 2007 by Nicholas Kain <njkain@gmail.com>
4
 *
5
 * based on rate converter that uses libsamplerate
6
 * Copyright (c) 2006 by Takashi Iwai <tiwai@suse.de>
7
 *
8
 * This library is free software; you can redistribute it and/or
9
 * modify it under the terms of the GNU Lesser General Public
10
 * License as published by the Free Software Foundation; either
11
 * version 2.1 of the License, or (at your option) any later version.
12
 *
13
 * This library is distributed in the hope that it will be useful,
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16
 * Lesser General Public License for more details.
17
 */
18
19
#include <stdio.h>
20
#include <alsa/asoundlib.h>
21
#include <alsa/pcm_rate.h>
22
#include AVCODEC_HEADER
23
#include "gcd.h"
24
25
static int filter_size = 16;
26
static int phase_shift = 10; /* auto-adjusts */
27
static double cutoff = 0; /* auto-adjusts */
28
29
struct rate_src {
30
	struct AVResampleContext *context;
31
	int in_rate;
32
	int out_rate;
33
	int stored;
34
	int point;
35
	int16_t **out;
36
	int16_t **in;
37
	unsigned int channels;
38
};
39
40
static snd_pcm_uframes_t input_frames(void *obj, snd_pcm_uframes_t frames)
41
{
42
	return frames;
43
}
44
45
static snd_pcm_uframes_t output_frames(void *obj, snd_pcm_uframes_t frames)
46
{
47
	return frames;
48
}
49
50
static void pcm_src_free(void *obj)
51
{
52
	struct rate_src *rate = obj;
53
	int i;
54
55
	if (rate->out) {
56
		for (i=0; i<rate->channels; i++) {
57
			free(rate->out[i]);
58
		}
59
		free(rate->out);
60
	}
61
	if (rate->in) {
62
		for (i=0; i<rate->channels; i++) {
63
			free(rate->in[i]);
64
		}
65
		free(rate->in);
66
	}
67
	rate->out = rate->in = NULL;
68
69
	if (rate->context) {
70
		av_resample_close(rate->context);
71
		rate->context = NULL;
72
	}
73
}
74
75
static int pcm_src_init(void *obj, snd_pcm_rate_info_t *info)
76
{
77
	struct rate_src *rate = obj;
78
	int i, ir, or;
79
80
	if (! rate->context || rate->channels != info->channels) {
81
		pcm_src_free(rate);
82
		rate->channels = info->channels;
83
		ir = rate->in_rate = info->in.rate;
84
		or = rate->out_rate = info->out.rate;
85
		i = gcd(or, ir);
86
		if (or > ir) {
87
			phase_shift = or/i;
88
		} else {
89
			phase_shift = ir/i;
90
		}
91
		if (cutoff <= 0.0) {
92
			cutoff = 1.0 - 1.0/filter_size;
93
			if (cutoff < 0.80)
94
				cutoff = 0.80;
95
		}
96
		rate->context = av_resample_init(info->out.rate, info->in.rate,
97
			filter_size, phase_shift,
98
			(info->out.rate >= info->in.rate ? 0 : 1), cutoff);
99
		if (!rate->context)
100
			return -EINVAL;
101
	}
102
103
	rate->out = malloc(rate->channels * sizeof(int16_t *));
104
	rate->in = malloc(rate->channels * sizeof(int16_t *));
105
	for (i=0; i<rate->channels; i++) {
106
		rate->out[i] = calloc(info->out.period_size * 2, 
107
			sizeof(int16_t));
108
		rate->in[i] = calloc(info->in.period_size * 2,
109
			sizeof(int16_t));
110
	}
111
	rate->point = info->in.period_size / 2;
112
	if (!rate->out || !rate->in) {
113
		pcm_src_free(rate);
114
		return -ENOMEM;
115
	}
116
117
	return 0;
118
}
119
120
static int pcm_src_adjust_pitch(void *obj, snd_pcm_rate_info_t *info)
121
{
122
	struct rate_src *rate = obj;
123
124
	if (info->out.rate != rate->out_rate || info->in.rate != rate->in_rate)
125
		pcm_src_init(obj, info);
126
	return 0;
127
}
128
129
static void pcm_src_reset(void *obj)
130
{
131
	struct rate_src *rate = obj;
132
	rate->stored = 0;
133
}
134
135
static void deinterleave(const int16_t *src, int16_t **dst, unsigned int frames,
136
	unsigned int chans, int overflow)
137
{
138
	int i, j;
139
140
	if (chans == 1) {
141
		memcpy(dst + overflow, src, frames*sizeof(int16_t));
142
	} else if (chans == 2) {
143
		for (j=overflow; j<(frames + overflow); j++) {
144
			dst[0][j] = *(src++);
145
			dst[1][j] = *(src++);
146
		}
147
	} else {
148
		for (j=overflow; j<(frames + overflow); j++) {
149
			for (i=0; i<chans; i++) {
150
				dst[i][j] = *(src++);
151
			}
152
		}
153
	}
154
}
155
156
static void reinterleave(int16_t **src, int16_t *dst, unsigned int frames,
157
	unsigned int chans)
158
{
159
	int i, j;
160
161
	if (chans == 1) {
162
		memcpy(dst, src, frames*sizeof(int16_t));
163
	} else if (chans == 2) {
164
		for (j=0; j<frames; j++) {
165
			*(dst++) = src[0][j];
166
			*(dst++) = src[1][j];
167
		}
168
	} else {
169
		for (j=0; j<frames; j++) {
170
			for (i=0; i<chans; i++) {
171
				*(dst++) = src[i][j];
172
			}
173
		}
174
	}
175
}
176
177
static void pcm_src_convert_s16(void *obj, int16_t *dst, unsigned int
178
	dst_frames, const int16_t *src, unsigned int src_frames)
179
{
180
	struct rate_src *rate = obj;
181
	int consumed = 0, chans=rate->channels, ret=0, i;
182
	int total_in = rate->stored + src_frames, new_stored;
183
184
	deinterleave(src, rate->in, src_frames, chans, rate->point);
185
	for (i=0; i<chans; ++i) {	
186
		ret = av_resample(rate->context, rate->out[i],
187
				rate->in[i]+rate->point-rate->stored, &consumed,
188
				total_in, dst_frames, i == (chans - 1));
189
		new_stored = total_in-consumed;
190
		memmove(rate->in[i]+rate->point-new_stored,
191
				rate->in[i]+rate->point-rate->stored+consumed,
192
				new_stored*sizeof(int16_t));
193
	}
194
	av_resample_compensate(rate->context,
195
			total_in-src_frames>filter_size?0:1, src_frames);
196
	reinterleave(rate->out, dst, ret, chans);
197
	rate->stored = total_in-consumed;
198
}
199
200
static void pcm_src_close(void *obj)
201
{
202
	pcm_src_free(obj);
203
}
204
205
#if SND_PCM_RATE_PLUGIN_VERSION >= 0x010002
206
static int get_supported_rates(void *obj, unsigned int *rate_min,
207
			       unsigned int *rate_max)
208
{
209
	*rate_min = *rate_max = 0; /* both unlimited */
210
	return 0;
211
}
212
213
static void dump(void *obj, snd_output_t *out)
214
{
215
	snd_output_printf(out, "Converter: liblavc\n");
216
}
217
#endif
218
219
static snd_pcm_rate_ops_t pcm_src_ops = {
220
	.close = pcm_src_close,
221
	.init = pcm_src_init,
222
	.free = pcm_src_free,
223
	.reset = pcm_src_reset,
224
	.adjust_pitch = pcm_src_adjust_pitch,
225
	.convert_s16 = pcm_src_convert_s16,
226
	.input_frames = input_frames,
227
	.output_frames = output_frames,
228
#if SND_PCM_RATE_PLUGIN_VERSION >= 0x010002
229
	.version = SND_PCM_RATE_PLUGIN_VERSION,
230
	.get_supported_rates = get_supported_rates,
231
	.dump = dump,
232
#endif
233
};
234
235
int pcm_src_open(unsigned int version, void **objp, snd_pcm_rate_ops_t *ops)
236
237
{
238
	struct rate_src *rate;
239
240
#if SND_PCM_RATE_PLUGIN_VERSION < 0x010002
241
	if (version != SND_PCM_RATE_PLUGIN_VERSION) {
242
		fprintf(stderr, "Invalid rate plugin version %x\n", version);
243
		return -EINVAL;
244
	}
245
#endif
246
	rate = calloc(1, sizeof(*rate));
247
	if (!rate)
248
		return -ENOMEM;
249
250
	*objp = rate;
251
	rate->context = NULL;
252
#if SND_PCM_RATE_PLUGIN_VERSION >= 0x010002
253
	if (version == 0x010001)
254
		memcpy(ops, &pcm_src_ops, sizeof(snd_pcm_rate_old_ops_t));
255
	else
256
#endif
257
		*ops = pcm_src_ops;
258
	return 0;
259
}
260
261
int SND_PCM_RATE_PLUGIN_ENTRY(lavcrate)(unsigned int version, void **objp,
262
			snd_pcm_rate_ops_t *ops)
263
{
264
	return pcm_src_open(version, objp, ops);
265
}
266
int SND_PCM_RATE_PLUGIN_ENTRY(lavcrate_higher)(unsigned int version,
267
			void **objp, snd_pcm_rate_ops_t *ops)
268
{
269
	filter_size = 64;
270
	return pcm_src_open(version, objp, ops);
271
}
272
int SND_PCM_RATE_PLUGIN_ENTRY(lavcrate_high)(unsigned int version,
273
			void **objp, snd_pcm_rate_ops_t *ops)
274
{
275
	filter_size = 32;
276
	return pcm_src_open(version, objp, ops);
277
}
278
int SND_PCM_RATE_PLUGIN_ENTRY(lavcrate_fast)(unsigned int version,
279
			void **objp, snd_pcm_rate_ops_t *ops)
280
{
281
	filter_size = 8;
282
	return pcm_src_open(version, objp, ops);
283
}
284
int SND_PCM_RATE_PLUGIN_ENTRY(lavcrate_faster)(unsigned int version,
285
			void **objp, snd_pcm_rate_ops_t *ops)
286
{
287
	filter_size = 4;
288
	return pcm_src_open(version, objp, ops);
289
}
290
291
292
- 
293
--with-alsagconfdir and --with-alsalconfdir
0
--with-alsagconfdir and --with-alsalconfdir
294
--
295
a52/Makefile.am        | 14 +++++++++++---
1
a52/Makefile.am        | 14 +++++++++++---
296
arcam-av/Makefile.am   | 14 +++++++++++---
2
arcam-av/Makefile.am   | 14 +++++++++++---
297
configure.ac           | 32 ++++++++++++++++++++++----------
3
configure.ac           | 32 ++++++++++++++++++++++----------
298
install-hooks.am       | 16 ++++++++++++++++
4
install-hooks.am       | 16 ++++++++++++++++
299
jack/Makefile.am       | 14 +++++++++++---
5
jack/Makefile.am       | 14 +++++++++++---
300
maemo/Makefile.am      | 14 +++++++++++---
6
maemo/Makefile.am      | 14 +++++++++++---
301
mix/Makefile.am        | 14 +++++++++++---
7
mix/Makefile.am        | 14 +++++++++++---
302
oss/Makefile.am        | 14 +++++++++++---
8
oss/Makefile.am        | 14 +++++++++++---
303
pph/Makefile.am        | 16 ++++++++++++----
9
pph/Makefile.am        | 16 ++++++++++++----
304
pulse/Makefile.am      | 17 ++++++++++++++---
10
pulse/Makefile.am      | 17 ++++++++++++++---
305
rate-lav/Makefile.am   | 13 ++++++++++---
11
rate-lav/Makefile.am   | 13 ++++++++++---
306
rate/Makefile.am       | 14 +++++++++++---
12
rate/Makefile.am       | 14 +++++++++++---
307
speex/Makefile.am      | 14 +++++++++++---
13
speex/Makefile.am      | 14 +++++++++++---
308
usb_stream/Makefile.am | 14 +++++++++++---
14
usb_stream/Makefile.am | 14 +++++++++++---
309
14 files changed, 173 insertions(+), 47 deletions(-)
15
14 files changed, 173 insertions(+), 47 deletions(-)
310
create mode 100644 install-hooks.am
16
create mode 100644 install-hooks.am
(-)a/a52/Makefile.am (-3 / +11 lines)
Lines 1-13 Link Here
1
EXTRA_DIST = 60-a52-encoder.conf
1
GCONF_FILES = 60-a52-encoder.conf
2
3
EXTRA_DIST = $(GCONF_FILES)
2
4
3
asound_module_pcm_a52_LTLIBRARIES = libasound_module_pcm_a52.la
5
asound_module_pcm_a52_LTLIBRARIES = libasound_module_pcm_a52.la
4
asound_module_addon_DATA = 60-a52-encoder.conf
6
asound_module_gconf_DATA = $(GCONF_FILES)
5
7
6
asound_module_pcm_a52dir = @ALSA_PLUGIN_DIR@
8
asound_module_pcm_a52dir = @ALSA_PLUGIN_DIR@
7
asound_module_addondir = @ALSA_ADDON_DIR@
9
asound_module_gconfdir = @ALSA_GCONF_DIR@
8
10
9
AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ @LIBAV_CFLAGS@
11
AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ @LIBAV_CFLAGS@
10
AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED)
12
AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED)
11
13
12
libasound_module_pcm_a52_la_SOURCES = pcm_a52.c
14
libasound_module_pcm_a52_la_SOURCES = pcm_a52.c
13
libasound_module_pcm_a52_la_LIBADD = @ALSA_LIBS@ @LIBAV_LIBS@ @LIBAV_CODEC_LIBS@
15
libasound_module_pcm_a52_la_LIBADD = @ALSA_LIBS@ @LIBAV_LIBS@ @LIBAV_CODEC_LIBS@
16
17
include ../install-hooks.am
18
19
install-data-hook: install-conf-hook
20
21
uninstall-local: uninstall-conf-hook
(-)a/arcam-av/Makefile.am (-3 / +11 lines)
Lines 1-13 Link Here
1
EXTRA_DIST = 50-arcam-av-ctl.conf
1
GCONF_FILES = 50-arcam-av-ctl.conf
2
3
EXTRA_DIST = $(GCONF_FILES)
2
4
3
asound_module_ctl_arcam_av_LTLIBRARIES = libasound_module_ctl_arcam_av.la
5
asound_module_ctl_arcam_av_LTLIBRARIES = libasound_module_ctl_arcam_av.la
4
asound_module_addon_DATA = 50-arcam-av-ctl.conf
6
asound_module_gconf_DATA = $(GCONF_FILES)
5
7
6
asound_module_ctl_arcam_avdir = @ALSA_PLUGIN_DIR@
8
asound_module_ctl_arcam_avdir = @ALSA_PLUGIN_DIR@
7
asound_module_addondir = @ALSA_ADDON_DIR@
9
asound_module_gconfdir = @ALSA_GCONF_DIR@
8
10
9
AM_CFLAGS = -Wall -g @ALSA_CFLAGS@
11
AM_CFLAGS = -Wall -g @ALSA_CFLAGS@
10
AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined
12
AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined
11
13
12
libasound_module_ctl_arcam_av_la_SOURCES = ctl_arcam_av.c arcam_av.c arcam_av.h
14
libasound_module_ctl_arcam_av_la_SOURCES = ctl_arcam_av.c arcam_av.c arcam_av.h
13
libasound_module_ctl_arcam_av_la_LIBADD = @ALSA_LIBS@
15
libasound_module_ctl_arcam_av_la_LIBADD = @ALSA_LIBS@
16
17
include ../install-hooks.am
18
19
install-data-hook: install-conf-hook
20
21
uninstall-local: uninstall-conf-hook
(-)a/configure.ac (-10 / +22 lines)
Lines 210-226 AC_DEFINE_UNQUOTED(ALSA_DATA_DIR, "$alsadatadir", [directory containing ALSA dat Link Here
210
ALSA_DATA_DIR="$alsadatadir"
210
ALSA_DATA_DIR="$alsadatadir"
211
AC_SUBST(ALSA_DATA_DIR)
211
AC_SUBST(ALSA_DATA_DIR)
212
212
213
dnl ALSA add-on config directory
213
dnl ALSA add-on global config directory
214
AC_ARG_WITH(alsaaddondir,
214
AC_ARG_WITH(alsagconfdir,
215
    AS_HELP_STRING([--with-alsaaddondir=dir],
215
    AS_HELP_STRING([--with-alsagconfdir=dir],
216
	[path where ALSA add-on config files are stored]),
216
	[path where ALSA global add-on config files are stored]),
217
    alsaaddondir="$withval", alsaaddondir="")
217
    alsagconfdir="$withval", alsagconfdir="")
218
if test -z "$alsaaddondir"; then
218
if test -z "$alsagconfdir"; then
219
    alsaaddondir="/etc/alsa/conf.d"
219
    alsagconfdir="$ALSA_DATA_DIR/alsa.conf.d"
220
fi
220
fi
221
AC_DEFINE_UNQUOTED(ALSA_ADDON_DIR, "$alsaaddondir", [directory containing ALSA add-on config files])
221
AC_DEFINE_UNQUOTED(ALSA_GCONF_DIR, "$alsagconfdir", [directory containing global ALSA add-on config files])
222
ALSA_ADDON_DIR="$alsaaddondir"
222
ALSA_GCONF_DIR="$alsagconfdir"
223
AC_SUBST(ALSA_ADDON_DIR)
223
AC_SUBST(ALSA_GCONF_DIR)
224
225
dnl ALSA add-on local config directory
226
AC_ARG_WITH(alsalconfdir,
227
    AS_HELP_STRING([--with-alsalconfdir=dir],
228
	[path where ALSA local add-on config files are stored]),
229
    alsalconfdir="$withval", alsalconfdir="")
230
if test -z "$alsalconfdir"; then
231
    alsalconfdir="/etc/alsa/conf.d"
232
fi
233
AC_DEFINE_UNQUOTED(ALSA_LCONF_DIR, "$alsalconfdir", [directory containing local ALSA add-on config files])
234
ALSA_LCONF_DIR="$alsalconfdir"
235
AC_SUBST(ALSA_LCONF_DIR)
224
236
225
SAVE_PLUGINS_VERSION
237
SAVE_PLUGINS_VERSION
226
238
(-)a/install-hooks.am (+16 lines)
Line 0 Link Here
1
install-conf-hook:
2
	mkdir -p $(DESTDIR)$(ALSA_LCONF_DIR)
3
	@(echo cd $(DESTDIR)$(ALSA_LCONF_DIR);			\
4
	  cd $(DESTDIR)$(ALSA_LCONF_DIR);			\
5
	  for i in $(GCONF_FILES); do				\
6
	    echo $(RM) $$i";" ln -s $(ALSA_GCONF_DIR)/$$i .;	\
7
	    $(RM) $$i;						\
8
	    ln -s $(ALSA_GCONF_DIR)/$$i .;			\
9
	  done)
10
uninstall-conf-hook:
11
	@(echo cd $(DESTDIR)$(ALSA_LCONF_DIR);			\
12
	  cd $(DESTDIR)$(ALSA_LCONF_DIR);			\
13
	  for i in $(GCONF_FILES); do				\
14
	    echo $(RM) $$i;					\
15
	    $(RM) $$i;						\
16
	  done)
(-)a/jack/Makefile.am (-3 / +11 lines)
Lines 1-13 Link Here
1
EXTRA_DIST = 50-jack.conf
1
GCONF_FILES = 50-jack.conf
2
3
EXTRA_DIST = $(GCONF_FILES)
2
4
3
asound_module_pcm_jack_LTLIBRARIES = libasound_module_pcm_jack.la
5
asound_module_pcm_jack_LTLIBRARIES = libasound_module_pcm_jack.la
4
asound_module_addon_DATA = 50-jack.conf
6
asound_module_gconf_DATA = $(GCONF_FILES)
5
7
6
asound_module_pcm_jackdir = @ALSA_PLUGIN_DIR@
8
asound_module_pcm_jackdir = @ALSA_PLUGIN_DIR@
7
asound_module_addondir = @ALSA_ADDON_DIR@
9
asound_module_gconfdir = @ALSA_GCONF_DIR@
8
10
9
AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ @JACK_CFLAGS@
11
AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ @JACK_CFLAGS@
10
AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED)
12
AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED)
11
13
12
libasound_module_pcm_jack_la_SOURCES = pcm_jack.c
14
libasound_module_pcm_jack_la_SOURCES = pcm_jack.c
13
libasound_module_pcm_jack_la_LIBADD = @ALSA_LIBS@ @JACK_LIBS@
15
libasound_module_pcm_jack_la_LIBADD = @ALSA_LIBS@ @JACK_LIBS@
16
17
include ../install-hooks.am
18
19
install-data-hook: install-conf-hook
20
21
uninstall-local: uninstall-conf-hook
(-)a/maemo/Makefile.am (-3 / +11 lines)
Lines 1-12 Link Here
1
EXTRA_DIST = 98-maemo.conf
1
GCONF_FILES = 98-maemo.conf
2
3
EXTRA_DIST = $(GCONF_FILES)
2
4
3
asound_module_pcm_alsa_dsp_LTLIBRARIES = libasound_module_pcm_alsa_dsp.la
5
asound_module_pcm_alsa_dsp_LTLIBRARIES = libasound_module_pcm_alsa_dsp.la
4
asound_module_ctl_dsp_ctl_LTLIBRARIES = libasound_module_ctl_dsp_ctl.la
6
asound_module_ctl_dsp_ctl_LTLIBRARIES = libasound_module_ctl_dsp_ctl.la
5
asound_module_addon_DATA = 98-maemo.conf
7
asound_module_gconf_DATA = $(GCONF_FILES)
6
8
7
asound_module_pcm_alsa_dspdir = @ALSA_PLUGIN_DIR@
9
asound_module_pcm_alsa_dspdir = @ALSA_PLUGIN_DIR@
8
asound_module_ctl_dsp_ctldir = @ALSA_PLUGIN_DIR@
10
asound_module_ctl_dsp_ctldir = @ALSA_PLUGIN_DIR@
9
asound_module_addondir = @ALSA_ADDON_DIR@
11
asound_module_gconfdir = @ALSA_GCONF_DIR@
10
12
11
AM_CFLAGS = -Wall -O2 @ALSA_CFLAGS@ $(DBUS_CFLAGS)
13
AM_CFLAGS = -Wall -O2 @ALSA_CFLAGS@ $(DBUS_CFLAGS)
12
AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED)
14
AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED)
Lines 19-21 libasound_module_ctl_dsp_ctl_la_LIBADD = @ALSA_LIBS@ $(DBUS_LIBS) -lpthread Link Here
19
21
20
noinst_HEADERS = constants.h debug.h dsp-protocol.h list.h reporting.h \
22
noinst_HEADERS = constants.h debug.h dsp-protocol.h list.h reporting.h \
21
	         types.h
23
	         types.h
24
25
include ../install-hooks.am
26
27
install-data-hook: install-conf-hook
28
29
uninstall-local: uninstall-conf-hook
(-)a/mix/Makefile.am (-3 / +11 lines)
Lines 1-12 Link Here
1
EXTRA_DIST = 60-upmix.conf 60-vdownmix.conf
1
GCONF_FILES = 60-upmix.conf 60-vdownmix.conf
2
3
EXTRA_DIST = $(GCONF_FILES)
2
4
3
asound_module_pcm_upmix_LTLIBRARIES = libasound_module_pcm_upmix.la
5
asound_module_pcm_upmix_LTLIBRARIES = libasound_module_pcm_upmix.la
4
asound_module_pcm_vdownmix_LTLIBRARIES = libasound_module_pcm_vdownmix.la
6
asound_module_pcm_vdownmix_LTLIBRARIES = libasound_module_pcm_vdownmix.la
5
asound_module_addon_DATA = 60-upmix.conf 60-vdownmix.conf
7
asound_module_gconf_DATA = $(GCONF_FILES)
6
8
7
asound_module_pcm_upmixdir = @ALSA_PLUGIN_DIR@
9
asound_module_pcm_upmixdir = @ALSA_PLUGIN_DIR@
8
asound_module_pcm_vdownmixdir = @ALSA_PLUGIN_DIR@
10
asound_module_pcm_vdownmixdir = @ALSA_PLUGIN_DIR@
9
asound_module_addondir = @ALSA_ADDON_DIR@
11
asound_module_gconfdir = @ALSA_GCONF_DIR@
10
12
11
AM_CFLAGS = -Wall -g @ALSA_CFLAGS@
13
AM_CFLAGS = -Wall -g @ALSA_CFLAGS@
12
AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED)
14
AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED)
Lines 15-17 libasound_module_pcm_upmix_la_SOURCES = pcm_upmix.c Link Here
15
libasound_module_pcm_upmix_la_LIBADD = @ALSA_LIBS@
17
libasound_module_pcm_upmix_la_LIBADD = @ALSA_LIBS@
16
libasound_module_pcm_vdownmix_la_SOURCES = pcm_vdownmix.c
18
libasound_module_pcm_vdownmix_la_SOURCES = pcm_vdownmix.c
17
libasound_module_pcm_vdownmix_la_LIBADD = @ALSA_LIBS@
19
libasound_module_pcm_vdownmix_la_LIBADD = @ALSA_LIBS@
20
21
include ../install-hooks.am
22
23
install-data-hook: install-conf-hook
24
25
uninstall-local: uninstall-conf-hook
(-)a/oss/Makefile.am (-3 / +11 lines)
Lines 1-12 Link Here
1
EXTRA_DIST = 50-oss.conf
1
GCONF_FILEs = 50-oss.conf
2
3
EXTRA_DIST = $(GCONF_FILES)
2
4
3
asound_module_pcm_oss_LTLIBRARIES = libasound_module_pcm_oss.la
5
asound_module_pcm_oss_LTLIBRARIES = libasound_module_pcm_oss.la
4
asound_module_ctl_oss_LTLIBRARIES = libasound_module_ctl_oss.la
6
asound_module_ctl_oss_LTLIBRARIES = libasound_module_ctl_oss.la
5
asound_module_addon_DATA = 50-oss.conf
7
asound_module_gconf_DATA = $(GCONF_FILES)
6
8
7
asound_module_pcm_ossdir = @ALSA_PLUGIN_DIR@
9
asound_module_pcm_ossdir = @ALSA_PLUGIN_DIR@
8
asound_module_ctl_ossdir = @ALSA_PLUGIN_DIR@
10
asound_module_ctl_ossdir = @ALSA_PLUGIN_DIR@
9
asound_module_addondir = @ALSA_ADDON_DIR@
11
asound_module_gconfdir = @ALSA_GCONF_DIR@
10
12
11
AM_CFLAGS = -Wall -g @ALSA_CFLAGS@
13
AM_CFLAGS = -Wall -g @ALSA_CFLAGS@
12
AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED)
14
AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED)
Lines 16-18 libasound_module_pcm_oss_la_LIBADD = @ALSA_LIBS@ Link Here
16
18
17
libasound_module_ctl_oss_la_SOURCES = ctl_oss.c
19
libasound_module_ctl_oss_la_SOURCES = ctl_oss.c
18
libasound_module_ctl_oss_la_LIBADD = @ALSA_LIBS@
20
libasound_module_ctl_oss_la_LIBADD = @ALSA_LIBS@
21
22
include ../install-hooks.am
23
24
install-data-hook: install-conf-hook
25
26
uninstall-local: uninstall-conf-hook
(-)a/pph/Makefile.am (-4 / +12 lines)
Lines 1-10 Link Here
1
EXTRA_DIST = 10-speexrate.conf
1
GCONF_FILES = 10-speexrate.conf
2
3
EXTRA_DIST = $(GCONF_FILES)
2
4
3
asound_module_rate_speexrate_LTLIBRARIES = libasound_module_rate_speexrate.la
5
asound_module_rate_speexrate_LTLIBRARIES = libasound_module_rate_speexrate.la
4
asound_module_addon_DATA = 10-speexrate.conf
6
asound_module_gconf_DATA = $(GCONF_FILES)
5
7
6
asound_module_rate_speexratedir = @ALSA_PLUGIN_DIR@
8
asound_module_rate_speexratedir = @ALSA_PLUGIN_DIR@
7
asound_module_addondir = @ALSA_ADDON_DIR@
9
asound_module_gconfdir = @ALSA_GCONF_DIR@
8
10
9
AM_CFLAGS = -DVAR_ARRAYS -Wall -g @ALSA_CFLAGS@
11
AM_CFLAGS = -DVAR_ARRAYS -Wall -g @ALSA_CFLAGS@
10
AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED)
12
AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED)
Lines 20-25 libasound_module_rate_speexrate_la_SOURCES += resample.c Link Here
20
libasound_module_rate_speexrate_la_LIBADD += -lm
22
libasound_module_rate_speexrate_la_LIBADD += -lm
21
endif
23
endif
22
24
25
noinst_HEADERS = speex_resampler.h arch.h fixed_generic.h
26
27
include ../install-hooks.am
28
23
install-exec-hook:
29
install-exec-hook:
24
	rm -f $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_speexrate_*.so
30
	rm -f $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_speexrate_*.so
25
	$(LN_S) libasound_module_rate_speexrate.so $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_speexrate_best.so
31
	$(LN_S) libasound_module_rate_speexrate.so $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_speexrate_best.so
Lines 28-31 install-exec-hook: Link Here
28
uninstall-hook:
34
uninstall-hook:
29
	rm -f $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_speexrate_*.so
35
	rm -f $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_speexrate_*.so
30
36
31
noinst_HEADERS = speex_resampler.h arch.h fixed_generic.h
37
install-data-hook: install-conf-hook
38
39
uninstall-local: uninstall-conf-hook
(-)a/pulse/Makefile.am (-3 / +14 lines)
Lines 1-14 Link Here
1
EXTRA_DIST = 50-pulseaudio.conf 99-pulseaudio-default.conf.example
1
GCONF_FILES = 50-pulseaudio.conf
2
LCONF_FILES = 99-pulseaudio-default.conf.example
3
4
EXTRA_DIST = $(GCONF_FILES) $(LCONF_FILES)
2
5
3
asound_module_pcm_LTLIBRARIES = libasound_module_pcm_pulse.la
6
asound_module_pcm_LTLIBRARIES = libasound_module_pcm_pulse.la
4
asound_module_ctl_LTLIBRARIES = libasound_module_ctl_pulse.la
7
asound_module_ctl_LTLIBRARIES = libasound_module_ctl_pulse.la
5
asound_module_conf_LTLIBRARIES = libasound_module_conf_pulse.la
8
asound_module_conf_LTLIBRARIES = libasound_module_conf_pulse.la
6
asound_module_addon_DATA = 50-pulseaudio.conf 99-pulseaudio-default.conf.example
9
asound_module_gconf_DATA = $(GCONF_FILES)
10
asound_module_lconf_DATA = $(LCONF_FILES)
7
11
8
asound_module_pcmdir = @ALSA_PLUGIN_DIR@
12
asound_module_pcmdir = @ALSA_PLUGIN_DIR@
9
asound_module_ctldir = @ALSA_PLUGIN_DIR@
13
asound_module_ctldir = @ALSA_PLUGIN_DIR@
10
asound_module_confdir = @ALSA_PLUGIN_DIR@
14
asound_module_confdir = @ALSA_PLUGIN_DIR@
11
asound_module_addondir = @ALSA_ADDON_DIR@
15
asound_module_gconfdir = @ALSA_GCONF_DIR@
16
asound_module_lconfdir = @ALSA_LCONF_DIR@
12
17
13
AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ $(PTHREAD_CFLAGS) $(pulseaudio_CFLAGS) -D_GNU_SOURCE
18
AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ $(PTHREAD_CFLAGS) $(pulseaudio_CFLAGS) -D_GNU_SOURCE
14
AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED)
19
AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED)
Lines 21-23 libasound_module_ctl_pulse_la_LIBADD = @ALSA_LIBS@ $(PTHREAD_LIBS) $(pulseaudio_ Link Here
21
26
22
libasound_module_conf_pulse_la_SOURCES = conf_pulse.c
27
libasound_module_conf_pulse_la_SOURCES = conf_pulse.c
23
libasound_module_conf_pulse_la_LIBADD = @ALSA_LIBS@ $(PTHREAD_LIBS) $(pulseaudio_LIBS)
28
libasound_module_conf_pulse_la_LIBADD = @ALSA_LIBS@ $(PTHREAD_LIBS) $(pulseaudio_LIBS)
29
30
include ../install-hooks.am
31
32
install-data-hook: install-conf-hook
33
34
uninstall-local: uninstall-conf-hook
(-)a/rate-lav/Makefile.am (-3 / +10 lines)
Lines 1-10 Link Here
1
EXTRA_DIST = 10-rate-lav.conf
1
GCONF_FILES = 10-rate-lav.conf
2
3
EXTRA_DIST = $(GCONF_FILES)
2
4
3
asound_module_rate_lavrate_LTLIBRARIES = libasound_module_rate_lavrate.la
5
asound_module_rate_lavrate_LTLIBRARIES = libasound_module_rate_lavrate.la
4
asound_module_addon_DATA = 10-rate-lav.conf
6
asound_module_gconf_DATA = $(GCONF_FILES)
5
7
6
asound_module_rate_lavratedir = @ALSA_PLUGIN_DIR@
8
asound_module_rate_lavratedir = @ALSA_PLUGIN_DIR@
7
asound_module_addondir = @ALSA_ADDON_DIR@
9
asound_module_gconfdir = @ALSA_GCONF_DIR@
8
10
9
AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ @LIBAV_CFLAGS@
11
AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ @LIBAV_CFLAGS@
10
AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED)
12
AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED)
Lines 14-19 libasound_module_rate_lavrate_la_LIBADD = @ALSA_LIBS@ @LIBAV_LIBS@ @LIBAV_RESAMP Link Here
14
16
15
noinst_HEADERS = gcd.h
17
noinst_HEADERS = gcd.h
16
18
19
include ../install-hooks.am
20
17
install-exec-hook:
21
install-exec-hook:
18
	rm -f $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_lavrate_*.so
22
	rm -f $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_lavrate_*.so
19
	$(LN_S) libasound_module_rate_lavrate.so $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_lavrate_higher.so
23
	$(LN_S) libasound_module_rate_lavrate.so $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_lavrate_higher.so
Lines 23-25 install-exec-hook: Link Here
23
27
24
uninstall-hook:
28
uninstall-hook:
25
	rm -f $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_lavrate_*.so
29
	rm -f $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_lavrate_*.so
30
install-data-hook: install-conf-hook
31
32
uninstall-local: uninstall-conf-hook
(-)a/rate/Makefile.am (-3 / +11 lines)
Lines 1-10 Link Here
1
EXTRA_DIST = 10-samplerate.conf
1
GCONF_FILES = 10-samplerate.conf
2
3
EXTRA_DIST = $(GCONF_FILES)
2
4
3
asound_module_rate_samplerate_LTLIBRARIES = libasound_module_rate_samplerate.la
5
asound_module_rate_samplerate_LTLIBRARIES = libasound_module_rate_samplerate.la
4
asound_module_addon_DATA = 10-samplerate.conf
6
asound_module_gconf_DATA = $(GCONF_FILES)
5
7
6
asound_module_rate_sampleratedir = @ALSA_PLUGIN_DIR@
8
asound_module_rate_sampleratedir = @ALSA_PLUGIN_DIR@
7
asound_module_addondir = @ALSA_ADDON_DIR@
9
asound_module_gconfdir = @ALSA_GCONF_DIR@
8
10
9
AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ $(samplerate_CFLAGS)
11
AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ $(samplerate_CFLAGS)
10
AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED)
12
AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED)
Lines 12-17 AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUN Link Here
12
libasound_module_rate_samplerate_la_SOURCES = rate_samplerate.c
14
libasound_module_rate_samplerate_la_SOURCES = rate_samplerate.c
13
libasound_module_rate_samplerate_la_LIBADD = @ALSA_LIBS@ @samplerate_LIBS@
15
libasound_module_rate_samplerate_la_LIBADD = @ALSA_LIBS@ @samplerate_LIBS@
14
16
17
include ../install-hooks.am
18
15
install-exec-hook:
19
install-exec-hook:
16
	rm -f $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_samplerate_*.so
20
	rm -f $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_samplerate_*.so
17
	$(LN_S) libasound_module_rate_samplerate.so $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_samplerate_best.so
21
	$(LN_S) libasound_module_rate_samplerate.so $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_samplerate_best.so
Lines 21-23 install-exec-hook: Link Here
21
25
22
uninstall-hook:
26
uninstall-hook:
23
	rm -f $(DESTDIR)$(libdir)/alsa-lib/libasound_module_rate_samplerate_*.so
27
	rm -f $(DESTDIR)$(libdir)/alsa-lib/libasound_module_rate_samplerate_*.so
28
29
install-data-hook: install-conf-hook
30
31
uninstall-local: uninstall-conf-hook
(-)a/speex/Makefile.am (-3 / +11 lines)
Lines 1-13 Link Here
1
EXTRA_DIST = 60-speex.conf
1
GCONF_FILES = 60-speex.conf
2
3
EXTRA_DIST = $(GCONF_FILES)
2
4
3
asound_module_pcm_speex_LTLIBRARIES = libasound_module_pcm_speex.la
5
asound_module_pcm_speex_LTLIBRARIES = libasound_module_pcm_speex.la
4
asound_module_addon_DATA = 60-speex.conf
6
asound_module_gconf_DATA = $(GCONF_FILES)
5
7
6
asound_module_pcm_speexdir = @ALSA_PLUGIN_DIR@
8
asound_module_pcm_speexdir = @ALSA_PLUGIN_DIR@
7
asound_module_addondir = @ALSA_ADDON_DIR@
9
asound_module_gconfdir = @ALSA_GCONF_DIR@
8
10
9
AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ @speexdsp_CFLAGS@
11
AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ @speexdsp_CFLAGS@
10
AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED)
12
AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED)
11
13
12
libasound_module_pcm_speex_la_SOURCES = pcm_speex.c
14
libasound_module_pcm_speex_la_SOURCES = pcm_speex.c
13
libasound_module_pcm_speex_la_LIBADD = @ALSA_LIBS@ @speexdsp_LIBS@
15
libasound_module_pcm_speex_la_LIBADD = @ALSA_LIBS@ @speexdsp_LIBS@
16
17
include ../install-hooks.am
18
19
install-data-hook: install-conf-hook
20
21
uninstall-local: uninstall-conf-hook
(-)a/usb_stream/Makefile.am (-5 / +11 lines)
Lines 1-10 Link Here
1
EXTRA_DIST = 98-usb-stream.conf
1
GCONF_FILES = 98-usb-stream.conf
2
3
EXTRA_DIST = $(GCONF_FILES)
2
4
3
asound_module_pcm_usb_stream_LTLIBRARIES = libasound_module_pcm_usb_stream.la
5
asound_module_pcm_usb_stream_LTLIBRARIES = libasound_module_pcm_usb_stream.la
4
asound_module_addon_DATA = 98-usb-stream.conf
6
asound_module_gconf_DATA = $(GCONF_FILES)
5
7
6
asound_module_pcm_usb_streamdir = @ALSA_PLUGIN_DIR@
8
asound_module_pcm_usb_streamdir = @ALSA_PLUGIN_DIR@
7
asound_module_addondir = @ALSA_ADDON_DIR@
9
asound_module_gconfdir = @ALSA_GCONF_DIR@
8
10
9
AM_CFLAGS = -Wall -g @ALSA_CFLAGS@
11
AM_CFLAGS = -Wall -g @ALSA_CFLAGS@
10
AM_LDFLAGS = -module -avoid-version -export-dynamic $(LDFLAGS_NOUNDEFINED)
12
AM_LDFLAGS = -module -avoid-version -export-dynamic $(LDFLAGS_NOUNDEFINED)
Lines 13-15 libasound_module_pcm_usb_stream_la_SOURCES = pcm_usb_stream.c Link Here
13
libasound_module_pcm_usb_stream_la_LIBADD = @ALSA_LIBS@
15
libasound_module_pcm_usb_stream_la_LIBADD = @ALSA_LIBS@
14
16
15
noinst_HEADERS = usb_stream.h
17
noinst_HEADERS = usb_stream.h
16
- 
18
17
--
19
include ../install-hooks.am
20
21
install-data-hook: install-conf-hook
22
23
uninstall-local: uninstall-conf-hook
18
oss/Makefile.am | 2 +-
24
oss/Makefile.am | 2 +-
19
1 file changed, 1 insertion(+), 1 deletion(-)
25
1 file changed, 1 insertion(+), 1 deletion(-)
(-)a/oss/Makefile.am (-2 / +1 lines)
Lines 1-4 Link Here
1
GCONF_FILEs = 50-oss.conf
1
GCONF_FILES = 50-oss.conf
2
2
3
EXTRA_DIST = $(GCONF_FILES)
3
EXTRA_DIST = $(GCONF_FILES)
4
4
5
- 

Return to bug 653742