diff -Nru alsa-plugins-1.2.2/Makefile.in alsa-plugins-1.2.6/Makefile.in --- alsa-plugins-1.2.2/Makefile.in 2020-02-19 10:26:51.000000000 +0000 +++ alsa-plugins-1.2.6/Makefile.in 2021-12-06 11:44:23.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -152,8 +152,8 @@ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir distdir-am dist dist-all distcheck -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ - $(LISP)config.h.in +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \ + config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. @@ -350,6 +350,7 @@ psdir = @psdir@ pulseaudio_CFLAGS = @pulseaudio_CFLAGS@ pulseaudio_LIBS = @pulseaudio_LIBS@ +runstatedir = @runstatedir@ samplerate_CFLAGS = @samplerate_CFLAGS@ samplerate_LIBS = @samplerate_LIBS@ sbindir = @sbindir@ @@ -624,6 +625,10 @@ tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) +dist-zstd: distdir + tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst + $(am__post_remove_distdir) + dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @@ -666,6 +671,8 @@ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ + *.tar.zst*) \ + zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) @@ -843,7 +850,7 @@ am--refresh check check-am clean clean-cscope clean-generic \ clean-libtool cscope cscopelist-am ctags ctags-am dist \ dist-all dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar \ - dist-tarZ dist-xz dist-zip distcheck distclean \ + dist-tarZ dist-xz dist-zip dist-zstd distcheck distclean \ distclean-generic distclean-hdr distclean-libtool \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ diff -Nru alsa-plugins-1.2.2/a52/60-a52-encoder.conf alsa-plugins-1.2.6/a52/60-a52-encoder.conf --- alsa-plugins-1.2.2/a52/60-a52-encoder.conf 2020-02-19 09:35:42.000000000 +0000 +++ alsa-plugins-1.2.6/a52/60-a52-encoder.conf 2021-12-06 10:17:29.000000000 +0000 @@ -36,3 +36,10 @@ description "Plugin to convert multichannel stream to A52 (AC3) bitstream" } } + +# +# A quick test command: +# CARD=1 # replace with your IEC958 card +# DEVICE=1 # replace with your IEC958 PCM device number +# speaker-test -d -b 2000000 -c 6 -D"plug:{SLAVE=\"a52:${CARD},'hw:${CARD},${DEVICE}'\"}" +# diff -Nru alsa-plugins-1.2.2/a52/Makefile.in alsa-plugins-1.2.6/a52/Makefile.in --- alsa-plugins-1.2.2/a52/Makefile.in 2020-02-19 10:26:51.000000000 +0000 +++ alsa-plugins-1.2.6/a52/Makefile.in 2021-12-06 11:44:23.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -336,6 +336,7 @@ psdir = @psdir@ pulseaudio_CFLAGS = @pulseaudio_CFLAGS@ pulseaudio_LIBS = @pulseaudio_LIBS@ +runstatedir = @runstatedir@ samplerate_CFLAGS = @samplerate_CFLAGS@ samplerate_LIBS = @samplerate_LIBS@ sbindir = @sbindir@ diff -Nru alsa-plugins-1.2.2/a52/pcm_a52.c alsa-plugins-1.2.6/a52/pcm_a52.c --- alsa-plugins-1.2.2/a52/pcm_a52.c 2020-02-19 09:35:42.000000000 +0000 +++ alsa-plugins-1.2.6/a52/pcm_a52.c 2021-12-06 10:17:29.000000000 +0000 @@ -41,7 +41,12 @@ #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(53, 34, 0) #include #include -#define USE_AVCODEC_FRAME +#define USE_AVCODEC_FRAME 1 +#endif + +#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(58, 91, 0) +#include +#define USE_AVCODEC_PACKET_ALLOC #endif #if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 0, 0) @@ -62,6 +67,12 @@ #define AV_CODEC_ID_AC3 CODEC_ID_AC3 #endif +#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(56, 56, 0) +#ifndef AV_INPUT_BUFFER_PADDING_SIZE +#define AV_INPUT_BUFFER_PADDING_SIZE FF_INPUT_BUFFER_PADDING_SIZE +#endif +#endif + #if LIBAVCODEC_VERSION_INT < 0x371c01 #define av_frame_alloc avcodec_alloc_frame #define av_frame_free avcodec_free_frame @@ -72,20 +83,29 @@ snd_pcm_t *slave; AVCodec *codec; AVCodecContext *avctx; + snd_pcm_format_t src_format; + unsigned int src_sample_bits; + unsigned int src_sample_bytes; snd_pcm_format_t format; int av_format; unsigned int channels; unsigned int rate; unsigned int bitrate; - short *inbuf; + void *inbuf; unsigned char *outbuf; + unsigned char *outbuf1; + unsigned char *outbuf2; int outbuf_size; - snd_pcm_uframes_t transfer; int remain; int filled; unsigned int slave_period_size; unsigned int slave_buffer_size; + snd_pcm_uframes_t pointer; + snd_pcm_uframes_t boundary; snd_pcm_hw_params_t *hw_params; +#ifdef USE_AVCODEC_PACKET_ALLOC + AVPacket *pkt; +#endif #ifdef USE_AVCODEC_FRAME AVFrame *frame; int is_planar; @@ -98,71 +118,104 @@ #define use_planar(rec) 0 #endif -#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(53, 34, 0) +#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(58, 91, 0) +static int do_encode(struct a52_ctx *rec) +{ + AVPacket *pkt = rec->pkt; + int ret; + + ret = avcodec_send_frame(rec->avctx, rec->frame); + if (ret < 0) + return -EINVAL; + ret = avcodec_receive_packet(rec->avctx, pkt); + if (ret < 0) + return -EINVAL; + + if (pkt->size > rec->outbuf_size - 8) + return -EINVAL; + memcpy(rec->outbuf1 + 8, pkt->data, pkt->size); + + return pkt->size; +} +#elif LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(53, 34, 0) static int do_encode(struct a52_ctx *rec) { AVPacket pkt = { - .data = rec->outbuf + 8, + .data = rec->outbuf1 + 8, .size = rec->outbuf_size - 8 }; - int got_frame; + int ret, got_frame; + + ret = avcodec_encode_audio2(rec->avctx, &pkt, rec->frame, &got_frame); + if (ret < 0) + return -EINVAL; - avcodec_encode_audio2(rec->avctx, &pkt, rec->frame, &got_frame); return pkt.size; } #else static int do_encode(struct a52_ctx *rec) { - return avcodec_encode_audio(rec->avctx, rec->outbuf + 8, - rec->outbuf_size - 8, - rec->inbuf); + int ret = avcodec_encode_audio(rec->avctx, rec->outbuf1 + 8, + rec->outbuf_size - 8, + rec->inbuf); + if (ret < 0) + return -EINVAL; + + return ret; } #endif /* convert the PCM data to A52 stream in IEC958 */ -static void convert_data(struct a52_ctx *rec) +static int convert_data(struct a52_ctx *rec) { + unsigned char *buf; int out_bytes = do_encode(rec); - rec->outbuf[0] = 0xf8; /* sync words */ - rec->outbuf[1] = 0x72; - rec->outbuf[2] = 0x4e; - rec->outbuf[3] = 0x1f; - rec->outbuf[4] = rec->outbuf[13] & 7; /* bsmod */ - rec->outbuf[5] = 0x01; /* data type */ - rec->outbuf[6] = ((out_bytes * 8) >> 8) & 0xff; - rec->outbuf[7] = (out_bytes * 8) & 0xff; + if (out_bytes < 0) + return out_bytes; + + buf = rec->outbuf1; + buf[0] = 0xf8; /* sync words */ + buf[1] = 0x72; + buf[2] = 0x4e; + buf[3] = 0x1f; + buf[4] = buf[13] & 7; /* bsmod */ + buf[5] = 0x01; /* data type */ + buf[6] = ((out_bytes * 8) >> 8) & 0xff; + buf[7] = (out_bytes * 8) & 0xff; /* swap bytes for little-endian 16bit */ - if (rec->format == SND_PCM_FORMAT_S16_LE) - swab(rec->outbuf, rec->outbuf, out_bytes + 8); - memset(rec->outbuf + 8 + out_bytes, 0, + if (rec->format == SND_PCM_FORMAT_S16_LE) { + swab(rec->outbuf1, rec->outbuf2, out_bytes + 8); + buf = rec->outbuf2; + } + rec->outbuf = buf; + memset(buf + 8 + out_bytes, 0, rec->outbuf_size - 8 - out_bytes); rec->remain = rec->outbuf_size / 4; rec->filled = 0; + + return 0; } /* write pending encoded data to the slave pcm */ static int write_out_pending(snd_pcm_ioplug_t *io, struct a52_ctx *rec) { - int err, ofs = 0; - - if (! rec->remain) - return 0; + snd_pcm_sframes_t ret; + unsigned int ofs; while (rec->remain) { - err = snd_pcm_writei(rec->slave, rec->outbuf + ofs, rec->remain); - if (err < 0) { - if (err == -EPIPE) + ofs = (rec->avctx->frame_size - rec->remain) * 4; + ret = snd_pcm_writei(rec->slave, rec->outbuf + ofs, rec->remain); + if (ret < 0) { + if (ret == -EPIPE) io->state = SND_PCM_STATE_XRUN; - return err; - } else if (! err) + if (ret == -EAGAIN) + break; + return ret; + } else if (! ret) break; - if (err < rec->remain) - ofs += (rec->remain - err) * 4; - rec->remain -= err; + rec->remain -= ret; } - if (rec->remain && ofs) - memmove(rec->outbuf, rec->outbuf + ofs, rec->remain * 4); return 0; } @@ -176,8 +229,8 @@ unsigned int i; for (i = 0; i < io->channels; i++) - memset(rec->frame->data[i] + rec->filled * 2, 0, - (rec->avctx->frame_size - rec->filled) * 2); + memset(rec->frame->data[i] + rec->filled * rec->src_sample_bytes, 0, + (rec->avctx->frame_size - rec->filled) * rec->src_sample_bytes); } #else #define clear_remaining_planar_data(io) /*NOP*/ @@ -195,10 +248,12 @@ if (use_planar(rec)) clear_remaining_planar_data(io); else { - memset(rec->inbuf + rec->filled * io->channels, 0, - (rec->avctx->frame_size - rec->filled) * io->channels * 2); + memset(rec->inbuf + rec->filled * io->channels * rec->src_sample_bytes, 0, + (rec->avctx->frame_size - rec->filled) * io->channels * rec->src_sample_bytes); } - convert_data(rec); + err = convert_data(rec); + if (err < 0) + return err; } err = write_out_pending(io, rec); if (err < 0) @@ -208,7 +263,8 @@ } /* check whether the areas consist of a continuous interleaved stream */ -static int check_interleaved(const snd_pcm_channel_area_t *areas, +static int check_interleaved(struct a52_ctx *rec, + const snd_pcm_channel_area_t *areas, unsigned int channels) { unsigned int ch; @@ -218,8 +274,8 @@ for (ch = 0; ch < channels; ch++) { if (areas[ch].addr != areas[0].addr || - areas[ch].first != ch * 16 || - areas[ch].step != channels * 16) + areas[ch].first != ch * rec->src_sample_bits || + areas[ch].step != channels * rec->src_sample_bits) return 0; } return 1; @@ -237,8 +293,7 @@ { struct a52_ctx *rec = io->private_data; unsigned int len = rec->avctx->frame_size - rec->filled; - short *src, *dst; - unsigned int src_step; + void *_dst; int err; static unsigned int ch_index[3][6] = { { 0, 1 }, @@ -255,16 +310,25 @@ if ((err = write_out_pending(io, rec)) < 0) return err; + /* If there are still frames left in outbuf, we can't + * accept a full a52 frame, because this would overwrite + * the frames in outbuf. This should not happen! The a52_pointer() + * callback should limit the transferred frames correctly. */ + if (rec->remain && len) { + SNDERR("fill data issue (remain is %i)", rec->remain); + len--; + } + if (size > len) size = len; - dst = rec->inbuf + rec->filled * io->channels; + _dst = rec->inbuf + rec->filled * io->channels * rec->src_sample_bytes; if (!use_planar(rec) && interleaved) { - memcpy(dst, areas->addr + offset * io->channels * 2, - size * io->channels * 2); - } else { - unsigned int i, ch, dst_step; - short *dst1; + memcpy(_dst, areas->addr + offset * io->channels * rec->src_sample_bytes, + size * io->channels * rec->src_sample_bytes); + } else if (rec->src_sample_bits == 16) { + unsigned int i, ch, src_step, dst_step; + short *src, *dst = _dst, *dst1; /* flatten copy to n-channel interleaved */ dst_step = io->channels; @@ -275,8 +339,8 @@ (ap->first + offset * ap->step) / 8); #ifdef USE_AVCODEC_FRAME - if (use_planar(rec)) { - memcpy(rec->frame->data[ch], src, size * 2); + if (use_planar(rec) && !interleaved) { + memcpy(rec->frame->data[ch] + rec->filled * 2, src, size * 2); continue; } #endif @@ -288,10 +352,40 @@ dst1 += dst_step; } } + } else if (rec->src_sample_bits == 32) { + unsigned int i, ch, src_step, dst_step; + int *src, *dst = _dst, *dst1; + + /* flatten copy to n-channel interleaved */ + dst_step = io->channels; + for (ch = 0; ch < io->channels; ch++, dst++) { + const snd_pcm_channel_area_t *ap; + ap = &areas[ch_index[io->channels / 2 - 1][ch]]; + src = (int *)(ap->addr + + (ap->first + offset * ap->step) / 8); + +#ifdef USE_AVCODEC_FRAME + if (use_planar(rec) && !interleaved) { + memcpy(rec->frame->data[ch] + rec->filled * 4, src, size * 4); + continue; + } +#endif + dst1 = dst; + src_step = ap->step / 32; /* in word */ + for (i = 0; i < size; i++) { + *dst1 = *src; + src += src_step; + dst1 += dst_step; + } + } + } else { + return -EIO; } rec->filled += size; if (rec->filled == rec->avctx->frame_size) { - convert_data(rec); + err = convert_data(rec); + if (err < 0) + return err; write_out_pending(io, rec); } return (int)size; @@ -308,16 +402,17 @@ struct a52_ctx *rec = io->private_data; snd_pcm_sframes_t result = 0; int err = 0; - int interleaved = check_interleaved(areas, io->channels); + int interleaved = check_interleaved(rec, areas, io->channels); do { err = fill_data(io, areas, offset, size, interleaved); - if (err < 0) + if (err <= 0) break; offset += (unsigned int)err; size -= (unsigned int)err; result += err; - rec->transfer += err; + rec->pointer += err; + rec->pointer %= rec->boundary; } while (size); return result > 0 ? result : err; } @@ -325,39 +420,45 @@ /* * pointer callback * - * Calculate the current position from the delay of slave PCM + * Calculate the current position from the available frames of slave PCM */ static snd_pcm_sframes_t a52_pointer(snd_pcm_ioplug_t *io) { struct a52_ctx *rec = io->private_data; - snd_pcm_sframes_t delay; + snd_pcm_sframes_t avail, delay; snd_pcm_state_t state; - int err; state = snd_pcm_state(rec->slave); switch (state) { case SND_PCM_STATE_RUNNING: case SND_PCM_STATE_DRAINING: - if ((err = snd_pcm_delay(rec->slave, &delay)) < 0) - return err; break; case SND_PCM_STATE_XRUN: - case SND_PCM_STATE_SUSPENDED: return -EPIPE; + case SND_PCM_STATE_SUSPENDED: + return -ESTRPIPE; default: return 0; } - if (delay < 0 || delay >= (snd_pcm_sframes_t)rec->slave_buffer_size) - delay = 0; - delay = (snd_pcm_sframes_t)io->appl_ptr - delay; - if (delay < 0) { - delay += io->buffer_size; - if (delay < 0) - delay = 0; - } - delay %= io->buffer_size; - return delay; + /* Write what we have from outbuf. */ + write_out_pending(io, rec); + + avail = snd_pcm_avail(rec->slave); + if (avail < 0) + return avail; + + /* get buffer delay without additional FIFO information */ + delay = rec->slave_buffer_size - avail; + while (delay < 0) + delay += rec->slave_buffer_size; + + avail = rec->pointer - delay - rec->remain - rec->filled; +#ifdef SND_PCM_IOPLUG_FLAG_BOUNDARY_WA + return avail % rec->boundary; +#else + return avail % io->buffer_size; +#endif } /* set up the fixed parameters of slave PCM hw_parmas */ @@ -451,6 +552,25 @@ } /* + * dump callback + */ +static void a52_dump(snd_pcm_ioplug_t *io, snd_output_t *out) +{ + struct a52_ctx *rec = io->private_data; + snd_pcm_t *pcm = io->pcm; + + snd_output_printf(out, "%s\n", io->name); + snd_output_printf(out, "Its setup is:\n"); + snd_pcm_dump_setup(pcm, out); + snd_output_printf(out, " %-13s: %s\n", "av_format", av_get_sample_fmt_name(rec->av_format)); + snd_output_printf(out, " %-13s: %i\n", "av_frame_size", rec->avctx ? rec->avctx->frame_size : -1); + snd_output_printf(out, " %-13s: %i\n", "remain", rec->remain); + snd_output_printf(out, " %-13s: %i\n", "filled", rec->filled); + snd_output_printf(out, "Slave: "); + snd_pcm_dump(rec->slave, out); +} + +/* * sw_params callback * * Set up slave PCM sw_params @@ -464,6 +584,7 @@ snd_pcm_sw_params_get_avail_min(params, &avail_min); snd_pcm_sw_params_get_start_threshold(params, &start_threshold); + snd_pcm_sw_params_get_boundary(params, &rec->boundary); len = avail_min; len += (int)rec->slave_buffer_size - (int)io->buffer_size; @@ -513,21 +634,27 @@ } #ifdef USE_AVCODEC_FRAME - if (rec->frame) { +#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 91, 0) + if (rec->frame) av_freep(&rec->frame->data[0]); - rec->inbuf = NULL; - } +#endif #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(54, 28, 0) av_frame_free(&rec->frame); #else av_freep(&rec->frame); #endif -#endif - +#else /* USE_AVCODEC_FRAME */ free(rec->inbuf); rec->inbuf = NULL; - free(rec->outbuf); - rec->outbuf = NULL; +#endif /* USE_AVCODEC_FRAME */ + +#ifdef USE_AVCODEC_PACKET_ALLOC + av_packet_free(&rec->pkt); +#endif + free(rec->outbuf2); + rec->outbuf2 = NULL; + free(rec->outbuf1); + rec->outbuf1 = NULL; } /* @@ -565,14 +692,22 @@ rec->frame = av_frame_alloc(); if (!rec->frame) return -ENOMEM; + rec->frame->nb_samples = rec->avctx->frame_size; +#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(58, 91, 0) + rec->frame->format = rec->avctx->sample_fmt; + rec->frame->channels = rec->avctx->channels; + rec->frame->channel_layout = rec->avctx->channel_layout; + if (av_frame_get_buffer(rec->frame, 0)) + return -ENOMEM; +#else if (av_samples_alloc(rec->frame->data, rec->frame->linesize, io->channels, rec->avctx->frame_size, rec->avctx->sample_fmt, 0) < 0) return -ENOMEM; - rec->frame->nb_samples = rec->avctx->frame_size; - rec->inbuf = (short *)rec->frame->data[0]; +#endif + rec->inbuf = rec->frame->data[0]; #else - rec->inbuf = malloc(rec->avctx->frame_size * 2 * io->channels); + rec->inbuf = malloc(rec->avctx->frame_size * io->channels * rec->src_sample_bytes); #endif if (!rec->inbuf) return -ENOMEM; @@ -610,15 +745,28 @@ if (err < 0) return -EINVAL; +#ifdef USE_AVCODEC_PACKET_ALLOC + rec->pkt = av_packet_alloc(); + if (!rec->pkt) + return -ENOMEM; +#endif + rec->outbuf_size = rec->avctx->frame_size * 4; - rec->outbuf = malloc(rec->outbuf_size); - if (! rec->outbuf) + rec->outbuf1 = malloc(rec->outbuf_size + AV_INPUT_BUFFER_PADDING_SIZE); + if (! rec->outbuf1) return -ENOMEM; + memset(rec->outbuf1 + rec->outbuf_size, 0, AV_INPUT_BUFFER_PADDING_SIZE); + + if (rec->format == SND_PCM_FORMAT_S16_LE) { + rec->outbuf2 = malloc(rec->outbuf_size); + if ( !rec->outbuf2) + return -ENOMEM; + } if (alloc_input_buffer(io)) return -ENOMEM; - rec->transfer = 0; + rec->pointer = 0; rec->remain = 0; rec->filled = 0; @@ -657,10 +805,9 @@ snd_pcm_t *slave = rec->slave; a52_free(rec); - if (slave) { - rec->slave = NULL; + free(rec); + if (slave) return snd_pcm_close(slave); - } return 0; } @@ -725,6 +872,7 @@ .close = a52_close, .hw_params = a52_hw_params, .hw_free = a52_hw_free, + .dump = a52_dump, .sw_params = a52_sw_params, .prepare = a52_prepare, .drain = a52_drain, @@ -761,8 +909,20 @@ SND_PCM_ACCESS_MMAP_NONINTERLEAVED, SND_PCM_ACCESS_RW_NONINTERLEAVED }; - unsigned int formats[] = { SND_PCM_FORMAT_S16 }; - int err; + static struct format { + int av; + snd_pcm_format_t alib; + } formats[] = { + { .av = AV_SAMPLE_FMT_S16, .alib = SND_PCM_FORMAT_S16 }, +#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52, 95, 0) && USE_AVCODEC_FRAME + { .av = AV_SAMPLE_FMT_S16P, .alib = SND_PCM_FORMAT_S16 }, + { .av = AV_SAMPLE_FMT_S32, .alib = SND_PCM_FORMAT_S32 }, + { .av = AV_SAMPLE_FMT_S32P, .alib = SND_PCM_FORMAT_S32 }, + { .av = AV_SAMPLE_FMT_FLTP, .alib = SND_PCM_FORMAT_FLOAT } +#endif + }; + int err, dir; + unsigned int i, fmt; snd_pcm_uframes_t buffer_max; unsigned int period_bytes, max_periods; @@ -779,8 +939,22 @@ if (err < 0) return err; + rec->src_format = SND_PCM_FORMAT_UNKNOWN; + for (i = 0; i < ARRAY_SIZE(formats); i++) + if (formats[i].av == rec->av_format) { + rec->src_format = formats[i].alib; + break; + } + if (rec->src_format == SND_PCM_FORMAT_UNKNOWN) { + SNDERR("A/V format '%s' is not supported", av_get_sample_fmt_name(rec->av_format)); + return -EINVAL; + } + fmt = rec->src_format; + rec->src_sample_bits = snd_pcm_format_physical_width(rec->src_format); + rec->src_sample_bytes = rec->src_sample_bits / 8; + if ((err = snd_pcm_ioplug_set_param_list(&rec->io, SND_PCM_IOPLUG_HW_FORMAT, - ARRAY_SIZE(formats), formats)) < 0 || + 1, &fmt)) < 0 || (err = snd_pcm_ioplug_set_param_minmax(&rec->io, SND_PCM_IOPLUG_HW_CHANNELS, rec->channels, rec->channels)) < 0 || (err = snd_pcm_ioplug_set_param_minmax(&rec->io, SND_PCM_IOPLUG_HW_RATE, @@ -791,8 +965,11 @@ return err; snd_pcm_hw_params_get_buffer_size_max(rec->hw_params, &buffer_max); + dir = -1; + snd_pcm_hw_params_get_periods_max(rec->hw_params, &max_periods, &dir); period_bytes = A52_FRAME_SIZE * 2 * rec->channels; - max_periods = buffer_max / A52_FRAME_SIZE; + if (buffer_max / A52_FRAME_SIZE < max_periods) + max_periods = buffer_max / A52_FRAME_SIZE; if ((err = snd_pcm_ioplug_set_param_minmax(&rec->io, SND_PCM_IOPLUG_HW_PERIOD_BYTES, period_bytes, period_bytes)) < 0 || @@ -812,11 +989,12 @@ int err; const char *card = NULL; const char *pcm_string = NULL; + const char *avcodec = NULL; unsigned int rate = 48000; unsigned int bitrate = 448; unsigned int channels = 6; snd_pcm_format_t format = SND_PCM_FORMAT_S16_LE; - char devstr[128], tmpcard[8]; + char devstr[128], tmpcard[16]; struct a52_ctx *rec; if (stream != SND_PCM_STREAM_PLAYBACK) { @@ -909,6 +1087,16 @@ } continue; } + if (strcmp(id, "avcodec") == 0) { + const char *str; + err = snd_config_get_string(n, &str); + if (err < 0) { + SNDERR("invalid type for %s", id); + return -EINVAL; + } + avcodec = str; + continue; + } SNDERR("Unknown field %s", id); return -EINVAL; } @@ -919,6 +1107,7 @@ return -ENOMEM; } + rec->src_format = SND_PCM_FORMAT_UNKNOWN; rec->rate = rate; rec->bitrate = bitrate; rec->channels = channels; @@ -927,11 +1116,17 @@ #ifndef USE_AVCODEC_FRAME avcodec_init(); #endif +#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 91, 0) avcodec_register_all(); +#endif - rec->codec = avcodec_find_encoder_by_name("ac3_fixed"); - if (rec->codec == NULL) - rec->codec = avcodec_find_encoder_by_name("ac3"); + if (avcodec) { + rec->codec = avcodec_find_encoder_by_name(avcodec); + } else { + rec->codec = avcodec_find_encoder_by_name("ac3_fixed"); + if (rec->codec == NULL) + rec->codec = avcodec_find_encoder_by_name("ac3"); + } if (rec->codec == NULL) rec->codec = avcodec_find_encoder(AV_CODEC_ID_AC3); if (rec->codec == NULL) { @@ -942,7 +1137,7 @@ if (! pcm_string || pcm_string[0] == '\0') { snprintf(devstr, sizeof(devstr), - "iec958:{AES0 0x%x AES1 0x%x AES2 0x%x AES3 0x%x %s%s}", + "iec958:{AES0 0x%x AES1 0x%x AES2 0x%x AES3 0x%x%s%s}", IEC958_AES0_CON_EMPHASIS_NONE | IEC958_AES0_NONAUDIO | IEC958_AES0_CON_NOT_COPYRIGHT, IEC958_AES1_CON_ORIGINAL | IEC958_AES1_CON_PCM_CODER, @@ -968,6 +1163,9 @@ rec->io.mmap_rw = 0; rec->io.callback = &a52_ops; rec->io.private_data = rec; +#ifdef SND_PCM_IOPLUG_FLAG_BOUNDARY_WA + rec->io.flags = SND_PCM_IOPLUG_FLAG_BOUNDARY_WA; +#endif #ifdef USE_AVCODEC_FRAME rec->av_format = rec->codec->sample_fmts[0]; rec->is_planar = av_sample_fmt_is_planar(rec->av_format); @@ -981,7 +1179,7 @@ if ((err = a52_set_hw_constraint(rec)) < 0) { snd_pcm_ioplug_delete(&rec->io); - goto error; + return err; } *pcmp = rec->io.pcm; diff -Nru alsa-plugins-1.2.2/aaf/Makefile.in alsa-plugins-1.2.6/aaf/Makefile.in --- alsa-plugins-1.2.2/aaf/Makefile.in 2020-02-19 10:26:51.000000000 +0000 +++ alsa-plugins-1.2.6/aaf/Makefile.in 2021-12-06 11:44:23.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -332,6 +332,7 @@ psdir = @psdir@ pulseaudio_CFLAGS = @pulseaudio_CFLAGS@ pulseaudio_LIBS = @pulseaudio_LIBS@ +runstatedir = @runstatedir@ samplerate_CFLAGS = @samplerate_CFLAGS@ samplerate_LIBS = @samplerate_LIBS@ sbindir = @sbindir@ diff -Nru alsa-plugins-1.2.2/aclocal.m4 alsa-plugins-1.2.6/aclocal.m4 --- alsa-plugins-1.2.2/aclocal.m4 2020-02-19 10:26:49.000000000 +0000 +++ alsa-plugins-1.2.6/aclocal.m4 2021-12-06 11:44:22.000000000 +0000 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.16.1 -*- Autoconf -*- +# generated automatically by aclocal 1.16.2 -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -364,7 +364,7 @@ [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])]) ])dnl PKG_HAVE_DEFINE_WITH_MODULES -# Copyright (C) 2002-2018 Free Software Foundation, Inc. +# Copyright (C) 2002-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -379,7 +379,7 @@ [am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.16.1], [], +m4_if([$1], [1.16.2], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -395,14 +395,14 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.16.1])dnl +[AM_AUTOMAKE_VERSION([1.16.2])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -454,7 +454,7 @@ # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2018 Free Software Foundation, Inc. +# Copyright (C) 1997-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -485,7 +485,7 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -676,7 +676,7 @@ # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -715,7 +715,9 @@ done if test $am_rc -ne 0; then AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. Try re-running configure with the + for automatic dependency tracking. If GNU make was not used, consider + re-running the configure script with MAKE="gmake" (or whatever is + necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking).]) fi @@ -742,7 +744,7 @@ # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -939,7 +941,7 @@ done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -960,7 +962,7 @@ fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2018 Free Software Foundation, Inc. +# Copyright (C) 2003-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -982,7 +984,7 @@ # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1017,7 +1019,7 @@ # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1060,7 +1062,7 @@ # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2018 Free Software Foundation, Inc. +# Copyright (C) 1997-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1099,7 +1101,7 @@ # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1128,7 +1130,7 @@ AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1175,7 +1177,7 @@ # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1194,7 +1196,7 @@ # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1275,7 +1277,7 @@ rm -f conftest.file ]) -# Copyright (C) 2009-2018 Free Software Foundation, Inc. +# Copyright (C) 2009-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1335,7 +1337,7 @@ _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1363,7 +1365,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2018 Free Software Foundation, Inc. +# Copyright (C) 2006-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1382,7 +1384,7 @@ # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2018 Free Software Foundation, Inc. +# Copyright (C) 2004-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru alsa-plugins-1.2.2/arcam-av/Makefile.in alsa-plugins-1.2.6/arcam-av/Makefile.in --- alsa-plugins-1.2.2/arcam-av/Makefile.in 2020-02-19 10:26:51.000000000 +0000 +++ alsa-plugins-1.2.6/arcam-av/Makefile.in 2021-12-06 11:44:23.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -338,6 +338,7 @@ psdir = @psdir@ pulseaudio_CFLAGS = @pulseaudio_CFLAGS@ pulseaudio_LIBS = @pulseaudio_LIBS@ +runstatedir = @runstatedir@ samplerate_CFLAGS = @samplerate_CFLAGS@ samplerate_LIBS = @samplerate_LIBS@ sbindir = @sbindir@ diff -Nru alsa-plugins-1.2.2/compile alsa-plugins-1.2.6/compile --- alsa-plugins-1.2.2/compile 2020-02-19 10:26:51.000000000 +0000 +++ alsa-plugins-1.2.6/compile 2021-12-06 11:44:23.000000000 +0000 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify @@ -53,7 +53,7 @@ MINGW*) file_conv=mingw ;; - CYGWIN*) + CYGWIN* | MSYS*) file_conv=cygwin ;; *) @@ -67,7 +67,7 @@ mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; - cygwin/*) + cygwin/* | msys/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) diff -Nru alsa-plugins-1.2.2/config.guess alsa-plugins-1.2.6/config.guess --- alsa-plugins-1.2.2/config.guess 2020-02-19 10:26:51.000000000 +0000 +++ alsa-plugins-1.2.6/config.guess 2021-12-06 11:44:23.000000000 +0000 @@ -2,7 +2,7 @@ # Attempt to guess a canonical system name. # Copyright 1992-2018 Free Software Foundation, Inc. -timestamp='2018-03-08' +timestamp='2018-08-29' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -84,8 +84,6 @@ exit 1 fi -trap 'exit 1' 1 2 15 - # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a @@ -96,34 +94,39 @@ # Portable tmp directory creation inspired by the Autoconf team. -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > "$dummy.c" ; - for c in cc gcc c89 c99 ; do - if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' +tmp= +# shellcheck disable=SC2172 +trap 'test -z "$tmp" || rm -fr "$tmp"' 1 2 13 15 +trap 'exitcode=$?; test -z "$tmp" || rm -fr "$tmp"; exit $exitcode' 0 + +set_cc_for_build() { + : "${TMPDIR=/tmp}" + # shellcheck disable=SC2039 + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } + dummy=$tmp/dummy + case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in + ,,) echo "int x;" > "$dummy.c" + for driver in cc gcc c89 c99 ; do + if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then + CC_FOR_BUILD="$driver" + break + fi + done + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; + esac +} # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then +if test -f /.attbin/uname ; then PATH=$PATH:/.attbin ; export PATH fi @@ -138,7 +141,7 @@ # We could probably try harder. LIBC=gnu - eval "$set_cc_for_build" + set_cc_for_build cat <<-EOF > "$dummy.c" #include #if defined(__UCLIBC__) @@ -199,7 +202,7 @@ os=netbsdelf ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval "$set_cc_for_build" + set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then @@ -237,7 +240,7 @@ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "$machine-${os}${release}${abi}" + echo "$machine-${os}${release}${abi-}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` @@ -389,20 +392,15 @@ echo i386-pc-auroraux"$UNAME_RELEASE" exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval "$set_cc_for_build" - SUN_ARCH=i386 - # If there is a compiler, see if it is configured for 64-bit objects. - # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. - # This test works for both compilers. - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then - if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - SUN_ARCH=x86_64 - fi - fi - echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + UNAME_REL="`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" + case `isainfo -b` in + 32) + echo i386-pc-solaris2"$UNAME_REL" + ;; + 64) + echo x86_64-pc-solaris2"$UNAME_REL" + ;; + esac exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize @@ -482,7 +480,7 @@ echo clipper-intergraph-clix"$UNAME_RELEASE" exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #ifdef __cplusplus #include /* for printf() prototype */ @@ -579,7 +577,7 @@ exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #include @@ -660,7 +658,7 @@ esac fi if [ "$HP_ARCH" = "" ]; then - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #define _HPUX_SOURCE @@ -700,7 +698,7 @@ esac if [ "$HP_ARCH" = hppa2.0w ] then - eval "$set_cc_for_build" + set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler @@ -726,7 +724,7 @@ echo ia64-hp-hpux"$HPUX_REV" exit ;; 3050*:HI-UX:*:*) - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #include int @@ -840,6 +838,17 @@ *:BSD/OS:*:*) echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" exit ;; + arm:FreeBSD:*:*) + UNAME_PROCESSOR=`uname -p` + set_cc_for_build + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi + else + echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf + fi + exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case "$UNAME_PROCESSOR" in @@ -894,8 +903,8 @@ # other systems with GNU libc and userland echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" exit ;; - i*86:Minix:*:*) - echo "$UNAME_MACHINE"-pc-minix + *:Minix:*:*) + echo "$UNAME_MACHINE"-unknown-minix exit ;; aarch64:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" @@ -922,7 +931,7 @@ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; arm*:Linux:*:*) - eval "$set_cc_for_build" + set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then @@ -971,7 +980,7 @@ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; mips:Linux:*:* | mips64:Linux:*:*) - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #undef CPU #undef ${UNAME_MACHINE} @@ -1285,7 +1294,7 @@ exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - eval "$set_cc_for_build" + set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi @@ -1358,6 +1367,7 @@ # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. + # shellcheck disable=SC2154 if test "$cputype" = 386; then UNAME_MACHINE=i386 else diff -Nru alsa-plugins-1.2.2/config.sub alsa-plugins-1.2.6/config.sub --- alsa-plugins-1.2.2/config.sub 2020-02-19 10:26:51.000000000 +0000 +++ alsa-plugins-1.2.6/config.sub 2021-12-06 11:44:23.000000000 +0000 @@ -2,7 +2,7 @@ # Configuration validation subroutine script. # Copyright 1992-2018 Free Software Foundation, Inc. -timestamp='2018-05-05' +timestamp='2018-08-29' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -110,16 +110,20 @@ exit 1;; esac -# Spilt fields of configuration type +# Split fields of configuration type IFS="-" read -r field1 field2 field3 field4 <&2 + exit 1 + ;; *-*-*-*) basic_machine=$field1-$field2 - os=-$field3-$field4 + os=$field3-$field4 ;; *-*-*) # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two @@ -132,1227 +136,1133 @@ | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ | storm-chaos* | os2-emx* | rtmk-nova*) basic_machine=$field1 - os=-$maybe_os + os=$maybe_os ;; android-linux) basic_machine=$field1-unknown - os=-linux-android + os=linux-android ;; *) basic_machine=$field1-$field2 - os=-$field3 + os=$field3 ;; esac ;; *-*) - basic_machine=$field1 - os=-$field2 + # A lone config we happen to match not fitting any patern + case $field1-$field2 in + decstation-3100) + basic_machine=mips-dec + os= + ;; + *-*) + # Second component is usually, but not always the OS + case $field2 in + # Prevent following clause from handling this valid os + sun*os*) + basic_machine=$field1 + os=$field2 + ;; + # Manufacturers + dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ + | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ + | unicom* | ibm* | next | hp | isi* | apollo | altos* \ + | convergent* | ncr* | news | 32* | 3600* | 3100* \ + | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ + | ultra | tti* | harris | dolphin | highlevel | gould \ + | cbm | ns | masscomp | apple | axis | knuth | cray \ + | microblaze* | sim | cisco \ + | oki | wec | wrs | winbond) + basic_machine=$field1-$field2 + os= + ;; + *) + basic_machine=$field1 + os=$field2 + ;; + esac + ;; + esac ;; *) - basic_machine=$1 - os= - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze*) - os= - basic_machine=$1 - ;; - -bluegene*) - os=-cnk - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*178) - os=-lynxos178 - ;; - -lynx*5) - os=-lynxos5 - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint + # Convert single-component short-hands not valid as part of + # multi-component configurations. + case $field1 in + 386bsd) + basic_machine=i386-pc + os=bsd + ;; + a29khif) + basic_machine=a29k-amd + os=udi + ;; + adobe68k) + basic_machine=m68010-adobe + os=scout + ;; + alliant) + basic_machine=fx80-alliant + os= + ;; + altos | altos3068) + basic_machine=m68k-altos + os= + ;; + am29k) + basic_machine=a29k-none + os=bsd + ;; + amdahl) + basic_machine=580-amdahl + os=sysv + ;; + amiga) + basic_machine=m68k-unknown + os= + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=bsd + ;; + aros) + basic_machine=i386-pc + os=aros + ;; + aux) + basic_machine=m68k-apple + os=aux + ;; + balance) + basic_machine=ns32k-sequent + os=dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=linux + ;; + cegcc) + basic_machine=arm-unknown + os=cegcc + ;; + convex-c1) + basic_machine=c1-convex + os=bsd + ;; + convex-c2) + basic_machine=c2-convex + os=bsd + ;; + convex-c32) + basic_machine=c32-convex + os=bsd + ;; + convex-c34) + basic_machine=c34-convex + os=bsd + ;; + convex-c38) + basic_machine=c38-convex + os=bsd + ;; + cray) + basic_machine=j90-cray + os=unicos + ;; + crds | unos) + basic_machine=m68k-crds + os= + ;; + da30) + basic_machine=m68k-da30 + os= + ;; + decstation | pmax | pmin | dec3100 | decstatn) + basic_machine=mips-dec + os= + ;; + delta88) + basic_machine=m88k-motorola + os=sysv3 + ;; + dicos) + basic_machine=i686-pc + os=dicos + ;; + djgpp) + basic_machine=i586-pc + os=msdosdjgpp + ;; + ebmon29k) + basic_machine=a29k-amd + os=ebmon + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=ose + ;; + gmicro) + basic_machine=tron-gmicro + os=sysv + ;; + go32) + basic_machine=i386-pc + os=go32 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=hms + ;; + harris) + basic_machine=m88k-harris + os=sysv3 + ;; + hp300) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=hpux + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=proelf + ;; + i386mach) + basic_machine=i386-mach + os=mach + ;; + vsta) + basic_machine=i386-pc + os=vsta + ;; + isi68 | isi) + basic_machine=m68k-isi + os=sysv + ;; + m68knommu) + basic_machine=m68k-unknown + os=linux + ;; + magnum | m3230) + basic_machine=mips-mips + os=sysv + ;; + merlin) + basic_machine=ns32k-utek + os=sysv + ;; + mingw64) + basic_machine=x86_64-pc + os=mingw64 + ;; + mingw32) + basic_machine=i686-pc + os=mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=mingw32ce + ;; + monitor) + basic_machine=m68k-rom68k + os=coff + ;; + morphos) + basic_machine=powerpc-unknown + os=morphos + ;; + moxiebox) + basic_machine=moxie-unknown + os=moxiebox + ;; + msdos) + basic_machine=i386-pc + os=msdos + ;; + msys) + basic_machine=i686-pc + os=msys + ;; + mvs) + basic_machine=i370-ibm + os=mvs + ;; + nacl) + basic_machine=le32-unknown + os=nacl + ;; + ncr3000) + basic_machine=i486-ncr + os=sysv4 + ;; + netbsd386) + basic_machine=i386-pc + os=netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=newsos + ;; + news1000) + basic_machine=m68030-sony + os=newsos + ;; + necv70) + basic_machine=v70-nec + os=sysv + ;; + nh3000) + basic_machine=m68k-harris + os=cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=cxux + ;; + nindy960) + basic_machine=i960-intel + os=nindy + ;; + mon960) + basic_machine=i960-intel + os=mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=nonstopux + ;; + os400) + basic_machine=powerpc-ibm + os=os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=ose + ;; + os68k) + basic_machine=m68k-none + os=os68k + ;; + paragon) + basic_machine=i860-intel + os=osf + ;; + parisc) + basic_machine=hppa-unknown + os=linux + ;; + pw32) + basic_machine=i586-unknown + os=pw32 + ;; + rdos | rdos64) + basic_machine=x86_64-pc + os=rdos + ;; + rdos32) + basic_machine=i386-pc + os=rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=coff + ;; + sa29200) + basic_machine=a29k-amd + os=udi + ;; + sei) + basic_machine=mips-sei + os=seiux + ;; + sequent) + basic_machine=i386-sequent + os= + ;; + sps7) + basic_machine=m68k-bull + os=sysv2 + ;; + st2000) + basic_machine=m68k-tandem + os= + ;; + stratus) + basic_machine=i860-stratus + os=sysv4 + ;; + sun2) + basic_machine=m68000-sun + os= + ;; + sun2os3) + basic_machine=m68000-sun + os=sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=sunos4 + ;; + sun3) + basic_machine=m68k-sun + os= + ;; + sun3os3) + basic_machine=m68k-sun + os=sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=sunos4 + ;; + sun4) + basic_machine=sparc-sun + os= + ;; + sun4os3) + basic_machine=sparc-sun + os=sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=solaris2 + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + os= + ;; + sv1) + basic_machine=sv1-cray + os=unicos + ;; + symmetry) + basic_machine=i386-sequent + os=dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=unicos + ;; + t90) + basic_machine=t90-cray + os=unicos + ;; + toad1) + basic_machine=pdp10-xkl + os=tops20 + ;; + tpf) + basic_machine=s390x-ibm + os=tpf + ;; + udi29k) + basic_machine=a29k-amd + os=udi + ;; + ultra3) + basic_machine=a29k-nyu + os=sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=none + ;; + vaxv) + basic_machine=vax-dec + os=sysv + ;; + vms) + basic_machine=vax-dec + os=vms + ;; + vxworks960) + basic_machine=i960-wrs + os=vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=vxworks + ;; + xbox) + basic_machine=i686-pc + os=mingw32 + ;; + ymp) + basic_machine=ymp-cray + os=unicos + ;; + *) + basic_machine=$1 + os= + ;; + esac ;; esac -# Decode aliases for certain CPU-COMPANY combinations. +# Decode 1-component or ad-hoc basic machines case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | aarch64 | aarch64_be \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arceb \ - | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv6m | armv[78][arm] \ - | avr | avr32 \ - | ba \ - | be32 | be64 \ - | bfin \ - | c4x | c8051 | clipper | csky \ - | d10v | d30v | dlx | dsp16xx \ - | e2k | epiphany \ - | fido | fr30 | frv | ft32 \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | hexagon \ - | i370 | i860 | i960 | ia16 | ia64 \ - | ip2k | iq2000 \ - | k1om \ - | le32 | le64 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa32r6 | mipsisa32r6el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64r6 | mipsisa64r6el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipsr5900 | mipsr5900el \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nds32 | nds32le | nds32be \ - | nfp \ - | nios | nios2 | nios2eb | nios2el \ - | ns16k | ns32k \ - | open8 | or1k | or1knd | or32 \ - | pdp10 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle \ - | pru \ - | pyramid \ - | riscv32 | riscv64 \ - | rl78 | rx \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu \ - | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ - | ubicom32 \ - | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ - | visium \ - | wasm32 \ - | x86 | xc16x | xstormy16 | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown - ;; - c54x) - basic_machine=tic54x-unknown - ;; - c55x) - basic_machine=tic55x-unknown - ;; - c6x) - basic_machine=tic6x-unknown - ;; - leon|leon[3-9]) - basic_machine=sparc-$basic_machine - ;; - m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65) + # Here we handle the default manufacturer of certain CPU types. It is in + # some cases the only manufacturer, in others, it is the most popular. + w89k) + cpu=hppa1.1 + vendor=winbond ;; - m9s12z | m68hcs12z | hcs12z | s12z) - basic_machine=s12z-unknown - os=-none + op50n) + cpu=hppa1.1 + vendor=oki ;; - ms1) - basic_machine=mt-unknown + op60c) + cpu=hppa1.1 + vendor=oki ;; - - strongarm | thumb | xscale) - basic_machine=arm-unknown + ibm*) + cpu=i370 + vendor=ibm ;; - xgate) - basic_machine=$basic_machine-unknown - os=-none + orion105) + cpu=clipper + vendor=highlevel ;; - xscaleeb) - basic_machine=armeb-unknown + mac | mpw | mac-mpw) + cpu=m68k + vendor=apple ;; - - xscaleel) - basic_machine=armel-unknown + pmac | pmac-mpw) + cpu=powerpc + vendor=apple ;; - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | aarch64-* | aarch64_be-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | ba-* \ - | be32-* | be64-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | c8051-* | clipper-* | craynv-* | csky-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | e2k-* | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | hexagon-* \ - | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ - | ip2k-* | iq2000-* \ - | k1om-* \ - | le32-* | le64-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ - | microblaze-* | microblazeel-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa32r6-* | mipsisa32r6el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64r6-* | mipsisa64r6el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipsr5900-* | mipsr5900el-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nds32-* | nds32le-* | nds32be-* \ - | nfp-* \ - | nios-* | nios2-* | nios2eb-* | nios2el-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | open8-* \ - | or1k*-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ - | pru-* \ - | pyramid-* \ - | riscv32-* | riscv64-* \ - | rl78-* | romp-* | rs6000-* | rx-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ - | tahoe-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile*-* \ - | tron-* \ - | ubicom32-* \ - | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ - | vax-* \ - | visium-* \ - | wasm32-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-pc - os=-bsd - ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att + cpu=m68000 + vendor=att ;; 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aros) - basic_machine=i386-pc - os=-aros - ;; - asmjs) - basic_machine=asmjs-unknown - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=-linux + cpu=we32k + vendor=att ;; bluegene*) - basic_machine=powerpc-ibm - os=-cnk - ;; - c54x-*) - basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - c55x-*) - basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - c6x-*) - basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - cegcc) - basic_machine=arm-unknown - os=-cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16 | cr16-*) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec + cpu=powerpc + vendor=ibm + os=cnk ;; decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 + cpu=pdp10 + vendor=dec + os=tops10 ;; decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 + cpu=pdp10 + vendor=dec + os=tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dicos) - basic_machine=i686-pc - os=-dicos - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx + cpu=m68k + vendor=motorola ;; dpx2*) - basic_machine=m68k-bull - os=-sysv3 - ;; - e500v[12]) - basic_machine=powerpc-unknown - os=$os"spe" - ;; - e500v[12]-*) - basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=$os"spe" - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd + cpu=m68k + vendor=bull + os=sysv3 ;; encore | umax | mmax) - basic_machine=ns32k-encore + cpu=ns32k + vendor=encore ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose + elxsi) + cpu=elxsi + vendor=elxsi + os=${os:-bsd} ;; fx2800) - basic_machine=i860-alliant + cpu=i860 + vendor=alliant ;; genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 + cpu=ns32k + vendor=ns ;; h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux + cpu=hppa1.1 + vendor=hitachi + os=hiuxwe2 ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp + cpu=hppa1.0 + vendor=hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp + cpu=m68000 + vendor=hp ;; hp9k3[2-9][0-9]) - basic_machine=m68k-hp + cpu=m68k + vendor=hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp + cpu=hppa1.0 + vendor=hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp + cpu=hppa1.1 + vendor=hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp + cpu=hppa1.1 + vendor=hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp + cpu=hppa1.1 + vendor=hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp + cpu=hppa1.1 + vendor=hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm + cpu=hppa1.0 + vendor=hp ;; i*86v32) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-sysv32 + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=sysv32 ;; i*86v4*) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-sysv4 + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=sysv4 ;; i*86v) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-sysv + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=sysv ;; i*86sol2) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - vsta) - basic_machine=i386-unknown - os=-vsta + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=solaris2 + ;; + j90 | j90-cray) + cpu=j90 + vendor=cray + os=${os:-unicos} ;; iris | iris4d) - basic_machine=mips-sgi + cpu=mips + vendor=sgi case $os in - -irix*) + irix*) ;; *) - os=-irix4 + os=irix4 ;; esac ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - leon-*|leon[3-9]-*) - basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'` - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=-linux - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - microblaze*) - basic_machine=microblaze-xilinx - ;; - mingw64) - basic_machine=x86_64-pc - os=-mingw64 - ;; - mingw32) - basic_machine=i686-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; miniframe) - basic_machine=m68000-convergent + cpu=m68000 + vendor=convergent ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - moxiebox) - basic_machine=moxie-unknown - os=-moxiebox - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'` - ;; - msys) - basic_machine=i686-pc - os=-msys - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - nacl) - basic_machine=le32-unknown - os=-nacl - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos + *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) + cpu=m68k + vendor=atari + os=mint ;; news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv + cpu=mips + vendor=sony + os=newsos ;; next | m*-next) - basic_machine=m68k-next + cpu=m68k + vendor=next case $os in - -nextstep* ) + nextstep* ) ;; - -ns2*) - os=-nextstep2 + ns2*) + os=nextstep2 ;; *) - os=-nextstep3 + os=nextstep3 ;; esac ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; np1) - basic_machine=np1-gould - ;; - neo-tandem) - basic_machine=neo-tandem - ;; - nse-tandem) - basic_machine=nse-tandem - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - nsv-tandem) - basic_machine=nsv-tandem - ;; - nsx-tandem) - basic_machine=nsx-tandem + cpu=np1 + vendor=gould ;; op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k + cpu=hppa1.1 + vendor=oki + os=proelf ;; pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=-linux + cpu=hppa1.1 + vendor=hitachi + os=hiuxwe2 ;; pbd) - basic_machine=sparc-tti + cpu=sparc + vendor=tti ;; pbb) - basic_machine=m68k-tti + cpu=m68k + vendor=tti ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 + pc532) + cpu=ns32k + vendor=pc532 ;; - pc98) - basic_machine=i386-pc + pn) + cpu=pn + vendor=gould ;; - pc98-*) - basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` + power) + cpu=power + vendor=ibm ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc + ps2) + cpu=i386 + vendor=ibm ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc + rm[46]00) + cpu=mips + vendor=siemens ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc + rtpc | rtpc-*) + cpu=romp + vendor=ibm ;; - pentium4) - basic_machine=i786-pc + sde) + cpu=mipsisa32 + vendor=sde + os=${os:-elf} ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` + simso-wrs) + cpu=sparclite + vendor=wrs + os=vxworks ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` + tower | tower-32) + cpu=m68k + vendor=ncr ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` + vpp*|vx|vx-*) + cpu=f301 + vendor=fujitsu ;; - pentium4-*) - basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` + w65) + cpu=w65 + vendor=wdc ;; - pn) - basic_machine=pn-gould + w89k-*) + cpu=hppa1.1 + vendor=winbond + os=proelf ;; - power) basic_machine=power-ibm + none) + cpu=none + vendor=none ;; - ppc | ppcbe) basic_machine=powerpc-unknown + leon|leon[3-9]) + cpu=sparc + vendor=$basic_machine ;; - ppc-* | ppcbe-*) - basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` + leon-*|leon[3-9]-*) + cpu=sparc + vendor=`echo "$basic_machine" | sed 's/-.*//'` ;; - ppcle | powerpclittle) - basic_machine=powerpcle-unknown + + *-*) + IFS="-" read -r cpu vendor <&2 - exit 1 + # Recognize the cannonical CPU types that are allowed with any + # company name. + case $cpu in + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ + | abacus \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \ + | alphapca5[67] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arceb \ + | arm | arm[lb]e | arme[lb] | armv* \ + | avr | avr32 \ + | asmjs \ + | ba \ + | be32 | be64 \ + | bfin | bs2000 \ + | c[123]* | c30 | [cjt]90 | c4x \ + | c8051 | clipper | craynv | csky | cydra \ + | d10v | d30v | dlx | dsp16xx \ + | e2k | elxsi | epiphany \ + | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \ + | h8300 | h8500 \ + | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ + | i370 | i*86 | i860 | i960 | ia16 | ia64 \ + | ip2k | iq2000 \ + | k1om \ + | le32 | le64 \ + | lm32 \ + | m32c | m32r | m32rle \ + | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k | v70 | w65 \ + | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip \ + | m88110 | m88k | maxq | mb | mcore | mep | metag \ + | microblaze | microblazeel \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ + | mipstx39 | mipstx39el \ + | mmix \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nds32 | nds32le | nds32be \ + | nfp \ + | nios | nios2 | nios2eb | nios2el \ + | none | np1 | ns16k | ns32k \ + | open8 \ + | or1k* \ + | or32 \ + | orion \ + | pdp10 | pdp11 | pj | pjl | pn | power \ + | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \ + | pru \ + | pyramid \ + | riscv | riscv32 | riscv64 \ + | rl78 | romp | rs6000 | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \ + | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \ + | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \ + | spu \ + | tahoe \ + | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \ + | tron \ + | ubicom32 \ + | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \ + | vax \ + | visium \ + | wasm32 \ + | we32k \ + | x86 | x86_64 | xc16x | xgate | xps100 \ + | xstormy16 | xtensa* \ + | ymp \ + | z8k | z80) + ;; + + *) + echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2 + exit 1 + ;; + esac ;; esac # Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` +case $vendor in + digital*) + vendor=dec ;; - *-commodore*) - basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` + commodore*) + vendor=cbm ;; *) ;; @@ -1365,200 +1275,240 @@ case $os in # First match some system type aliases that might get confused # with valid system types. - # -solaris* is a basic system type, with this one exception. - -auroraux) - os=-auroraux + # solaris* is a basic system type, with this one exception. + auroraux) + os=auroraux ;; - -solaris1 | -solaris1.*) + bluegene*) + os=cnk + ;; + solaris1 | solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; - -solaris) - os=-solaris2 + solaris) + os=solaris2 ;; - -unixware*) - os=-sysv4.2uw + unixware*) + os=sysv4.2uw ;; - -gnu/linux*) + gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # es1800 is here to avoid being matched by es* (a different OS) - -es1800*) - os=-ose + es1800*) + os=ose + ;; + # Some version numbers need modification + chorusos*) + os=chorusos + ;; + isc) + os=isc2.2 + ;; + sco6) + os=sco5v6 + ;; + sco5) + os=sco3.2v5 + ;; + sco4) + os=sco3.2v4 + ;; + sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + ;; + sco3.2v[4-9]* | sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + ;; + scout) + # Don't match below + ;; + sco*) + os=sco3.2v2 + ;; + psos*) + os=psos ;; # Now accept the basic system types. # The portable systems comes first. # Each alternative MUST end in a * to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* | -plan9* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* | -cloudabi* | -sortix* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \ - | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* | -hcos* \ - | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ - | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-musl* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ - | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \ - | -midnightbsd*) + # sysv* is not here because it comes later, after sysvr4. + gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \ + | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\ + | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ + | sym* | kopensolaris* | plan9* \ + | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ + | aos* | aros* | cloudabi* | sortix* \ + | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ + | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ + | knetbsd* | mirbsd* | netbsd* \ + | bitrig* | openbsd* | solidbsd* | libertybsd* \ + | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \ + | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ + | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ + | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \ + | chorusrdb* | cegcc* | glidix* \ + | cygwin* | msys* | pe* | moss* | proelf* | rtems* \ + | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \ + | linux-newlib* | linux-musl* | linux-uclibc* \ + | uxpv* | beos* | mpeix* | udk* | moxiebox* \ + | interix* | uwin* | mks* | rhapsody* | darwin* \ + | openstep* | oskit* | conix* | pw32* | nonstopux* \ + | storm-chaos* | tops10* | tenex* | tops20* | its* \ + | os2* | vos* | palmos* | uclinux* | nucleus* \ + | morphos* | superux* | rtmk* | windiss* \ + | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ + | skyos* | haiku* | rdos* | toppers* | drops* | es* \ + | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ + | midnightbsd*) # Remember, each alternative MUST END IN *, to match a version number. ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) + qnx*) + case $cpu in + x86 | i*86) ;; *) - os=-nto$os + os=nto-$os ;; esac ;; - -nto-qnx*) + hiux*) + os=hiuxwe2 ;; - -nto*) + nto-qnx*) + ;; + nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; - -sim | -xray | -os68k* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + sim | xray | os68k* | v88r* \ + | windows* | osx | abug | netware* | os9* \ + | macos* | mpw* | magic* | mmixware* | mon960* | lnews*) + ;; + linux-dietlibc) + os=linux-dietlibc + ;; + linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; - -mac*) + lynx*178) + os=lynxos178 + ;; + lynx*5) + os=lynxos5 + ;; + lynx*) + os=lynxos + ;; + mac*) os=`echo "$os" | sed -e 's|mac|macos|'` ;; - -linux-dietlibc) - os=-linux-dietlibc + opened*) + os=openedition ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` + os400*) + os=os400 ;; - -sunos5*) + sunos5*) os=`echo "$os" | sed -e 's|sunos5|solaris2|'` ;; - -sunos6*) + sunos6*) os=`echo "$os" | sed -e 's|sunos6|solaris3|'` ;; - -opened*) - os=-openedition + wince*) + os=wince ;; - -os400*) - os=-os400 + utek*) + os=bsd ;; - -wince*) - os=-wince + dynix*) + os=bsd ;; - -utek*) - os=-bsd + acis*) + os=aos ;; - -dynix*) - os=-bsd + atheos*) + os=atheos ;; - -acis*) - os=-aos + syllable*) + os=syllable ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd + 386bsd) + os=bsd ;; - -ctix* | -uts*) - os=-sysv + ctix* | uts*) + os=sysv ;; - -nova*) - os=-rtmk-nova + nova*) + os=rtmk-nova ;; - -ns2) - os=-nextstep2 + ns2) + os=nextstep2 ;; - -nsk*) - os=-nsk + nsk*) + os=nsk ;; # Preserve the version number of sinix5. - -sinix5.*) + sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; - -sinix*) - os=-sysv4 + sinix*) + os=sysv4 ;; - -tpf*) - os=-tpf + tpf*) + os=tpf ;; - -triton*) - os=-sysv3 + triton*) + os=sysv3 ;; - -oss*) - os=-sysv3 + oss*) + os=sysv3 ;; - -svr4*) - os=-sysv4 + svr4*) + os=sysv4 ;; - -svr3) - os=-sysv3 + svr3) + os=sysv3 ;; - -sysvr4) - os=-sysv4 + sysvr4) + os=sysv4 ;; - # This must come after -sysvr4. - -sysv*) + # This must come after sysvr4. + sysv*) ;; - -ose*) - os=-ose + ose*) + os=ose ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint + *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) + os=mint ;; - -zvmoe) - os=-zvmoe + zvmoe) + os=zvmoe ;; - -dicos*) - os=-dicos + dicos*) + os=dicos ;; - -pikeos*) + pikeos*) # Until real need of OS specific support for # particular features comes up, bare metal # configurations are quite functional. - case $basic_machine in + case $cpu in arm*) - os=-eabi + os=eabi ;; *) - os=-elf + os=elf ;; esac ;; - -nacl*) + nacl*) ;; - -ios) + ios) ;; - -none) + none) ;; - -*-eabi) - case $basic_machine in - arm*) - ;; - esac + *-eabi) ;; *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 exit 1 ;; @@ -1575,254 +1525,261 @@ # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. -case $basic_machine in +case $cpu-$vendor in score-*) - os=-elf + os=elf ;; spu-*) - os=-elf + os=elf ;; *-acorn) - os=-riscix1.2 + os=riscix1.2 ;; arm*-rebel) - os=-linux + os=linux ;; arm*-semi) - os=-aout + os=aout ;; c4x-* | tic4x-*) - os=-coff + os=coff ;; c8051-*) - os=-elf + os=elf + ;; + clipper-intergraph) + os=clix ;; hexagon-*) - os=-elf + os=elf ;; tic54x-*) - os=-coff + os=coff ;; tic55x-*) - os=-coff + os=coff ;; tic6x-*) - os=-coff + os=coff ;; # This must come before the *-dec entry. pdp10-*) - os=-tops20 + os=tops20 ;; pdp11-*) - os=-none + os=none ;; *-dec | vax-*) - os=-ultrix4.2 + os=ultrix4.2 ;; m68*-apollo) - os=-domain + os=domain ;; i386-sun) - os=-sunos4.0.2 + os=sunos4.0.2 ;; m68000-sun) - os=-sunos3 + os=sunos3 ;; m68*-cisco) - os=-aout + os=aout ;; mep-*) - os=-elf + os=elf ;; mips*-cisco) - os=-elf + os=elf ;; mips*-*) - os=-elf + os=elf ;; or32-*) - os=-coff + os=coff ;; *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 + os=sysv3 ;; sparc-* | *-sun) - os=-sunos4.1.1 + os=sunos4.1.1 ;; pru-*) - os=-elf + os=elf ;; *-be) - os=-beos + os=beos ;; *-ibm) - os=-aix + os=aix ;; *-knuth) - os=-mmixware + os=mmixware ;; *-wec) - os=-proelf + os=proelf ;; *-winbond) - os=-proelf + os=proelf ;; *-oki) - os=-proelf + os=proelf ;; *-hp) - os=-hpux + os=hpux ;; *-hitachi) - os=-hiux + os=hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv + os=sysv ;; *-cbm) - os=-amigaos + os=amigaos ;; *-dg) - os=-dgux + os=dgux ;; *-dolphin) - os=-sysv3 + os=sysv3 ;; m68k-ccur) - os=-rtu + os=rtu ;; m88k-omron*) - os=-luna + os=luna ;; *-next) - os=-nextstep + os=nextstep ;; *-sequent) - os=-ptx + os=ptx ;; *-crds) - os=-unos + os=unos ;; *-ns) - os=-genix + os=genix ;; i370-*) - os=-mvs + os=mvs ;; *-gould) - os=-sysv + os=sysv ;; *-highlevel) - os=-bsd + os=bsd ;; *-encore) - os=-bsd + os=bsd ;; *-sgi) - os=-irix + os=irix ;; *-siemens) - os=-sysv4 + os=sysv4 ;; *-masscomp) - os=-rtu + os=rtu ;; f30[01]-fujitsu | f700-fujitsu) - os=-uxpv + os=uxpv ;; *-rom68k) - os=-coff + os=coff ;; *-*bug) - os=-coff + os=coff ;; *-apple) - os=-macos + os=macos ;; *-atari*) - os=-mint + os=mint + ;; + *-wrs) + os=vxworks ;; *) - os=-none + os=none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) +case $vendor in + unknown) case $os in - -riscix*) + riscix*) vendor=acorn ;; - -sunos*) + sunos*) vendor=sun ;; - -cnk*|-aix*) + cnk*|-aix*) vendor=ibm ;; - -beos*) + beos*) vendor=be ;; - -hpux*) + hpux*) vendor=hp ;; - -mpeix*) + mpeix*) vendor=hp ;; - -hiux*) + hiux*) vendor=hitachi ;; - -unos*) + unos*) vendor=crds ;; - -dgux*) + dgux*) vendor=dg ;; - -luna*) + luna*) vendor=omron ;; - -genix*) + genix*) vendor=ns ;; - -mvs* | -opened*) + clix*) + vendor=intergraph + ;; + mvs* | opened*) vendor=ibm ;; - -os400*) + os400*) vendor=ibm ;; - -ptx*) + ptx*) vendor=sequent ;; - -tpf*) + tpf*) vendor=ibm ;; - -vxsim* | -vxworks* | -windiss*) + vxsim* | vxworks* | windiss*) vendor=wrs ;; - -aux*) + aux*) vendor=apple ;; - -hms*) + hms*) vendor=hitachi ;; - -mpw* | -macos*) + mpw* | macos*) vendor=apple ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) vendor=atari ;; - -vos*) + vos*) vendor=stratus ;; esac - basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` ;; esac -echo "$basic_machine$os" +echo "$cpu-$vendor-$os" exit # Local variables: diff -Nru alsa-plugins-1.2.2/configure alsa-plugins-1.2.6/configure --- alsa-plugins-1.2.2/configure 2020-02-19 10:26:52.000000000 +0000 +++ alsa-plugins-1.2.6/configure 2021-12-06 11:44:24.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for alsa-plugins 1.2.2. +# Generated by GNU Autoconf 2.69 for alsa-plugins 1.2.6. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -587,8 +587,8 @@ # Identity of this package. PACKAGE_NAME='alsa-plugins' PACKAGE_TARNAME='alsa-plugins' -PACKAGE_VERSION='1.2.2' -PACKAGE_STRING='alsa-plugins 1.2.2' +PACKAGE_VERSION='1.2.6' +PACKAGE_STRING='alsa-plugins 1.2.6' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -785,6 +785,7 @@ docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -908,6 +909,7 @@ sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1160,6 +1162,15 @@ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1297,7 +1308,7 @@ for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1410,7 +1421,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures alsa-plugins 1.2.2 to adapt to many kinds of systems. +\`configure' configures alsa-plugins 1.2.6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1450,6 +1461,7 @@ --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1480,7 +1492,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of alsa-plugins 1.2.2:";; + short | recursive ) echo "Configuration of alsa-plugins 1.2.6:";; esac cat <<\_ACEOF @@ -1648,7 +1660,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -alsa-plugins configure 1.2.2 +alsa-plugins configure 1.2.6 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2013,7 +2025,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by alsa-plugins $as_me 1.2.2, which was +It was created by alsa-plugins $as_me 1.2.6, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2876,7 +2888,7 @@ # Define the identity of the package. PACKAGE='alsa-plugins' - VERSION='1.2.2' + VERSION='1.2.6' cat >>confdefs.h <<_ACEOF @@ -13019,12 +13031,12 @@ pkg_cv_LIBAV_CFLAGS="$LIBAV_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libavcodec libavutil libavresample\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libavcodec libavutil libavresample") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libavcodec libavutil libswresample\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libavcodec libavutil libswresample") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_LIBAV_CFLAGS=`$PKG_CONFIG --cflags "libavcodec libavutil libavresample" 2>/dev/null` + pkg_cv_LIBAV_CFLAGS=`$PKG_CONFIG --cflags "libavcodec libavutil libswresample" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -13036,12 +13048,12 @@ pkg_cv_LIBAV_LIBS="$LIBAV_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libavcodec libavutil libavresample\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libavcodec libavutil libavresample") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libavcodec libavutil libswresample\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libavcodec libavutil libswresample") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_LIBAV_LIBS=`$PKG_CONFIG --libs "libavcodec libavutil libavresample" 2>/dev/null` + pkg_cv_LIBAV_LIBS=`$PKG_CONFIG --libs "libavcodec libavutil libswresample" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -13062,9 +13074,9 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - LIBAV_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libavcodec libavutil libavresample" 2>&1` + LIBAV_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libavcodec libavutil libswresample" 2>&1` else - LIBAV_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libavcodec libavutil libavresample" 2>&1` + LIBAV_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libavcodec libavutil libswresample" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBAV_PKG_ERRORS" >&5 @@ -14205,7 +14217,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by alsa-plugins $as_me 1.2.2, which was +This file was extended by alsa-plugins $as_me 1.2.6, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14271,7 +14283,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -alsa-plugins config.status 1.2.2 +alsa-plugins config.status 1.2.6 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -15378,7 +15390,9 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. Try re-running configure with the + for automatic dependency tracking. If GNU make was not used, consider + re-running the configure script with MAKE=\"gmake\" (or whatever is + necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking). See \`config.log' for more details" "$LINENO" 5; } diff -Nru alsa-plugins-1.2.2/configure.ac alsa-plugins-1.2.6/configure.ac --- alsa-plugins-1.2.2/configure.ac 2020-02-19 09:35:42.000000000 +0000 +++ alsa-plugins-1.2.6/configure.ac 2021-12-06 10:17:29.000000000 +0000 @@ -1,5 +1,5 @@ AC_PREREQ(2.59) -AC_INIT(alsa-plugins, 1.2.2) +AC_INIT(alsa-plugins, 1.2.6) AM_INIT_AUTOMAKE AC_PREFIX_DEFAULT(/usr) @@ -93,7 +93,7 @@ AS_HELP_STRING([--disable-libav], [Do not build plugins depending on libav/ffmpeg (a52,lavrate...)])) if test "x$enable_libav" != "xno"; then - PKG_CHECK_MODULES(LIBAV, [libavcodec libavutil libavresample], [HAVE_LIBAV=yes], [HAVE_LIBAV=no]) + PKG_CHECK_MODULES(LIBAV, [libavcodec libavutil libswresample], [HAVE_LIBAV=yes], [HAVE_LIBAV=no]) fi if test "x$HAVE_LIBAV" = "xno"; then diff -Nru alsa-plugins-1.2.2/debian/changelog alsa-plugins-1.2.6/debian/changelog --- alsa-plugins-1.2.2/debian/changelog 2020-03-04 08:40:30.000000000 +0000 +++ alsa-plugins-1.2.6/debian/changelog 2024-04-17 01:35:44.000000000 +0000 @@ -1,10 +1,47 @@ -alsa-plugins (1.2.2-1ubuntu1) focal; urgency=medium +alsa-plugins (1.2.6-1~20.04.sav0) focal; urgency=medium - * Resynchronize With Debian, remaining changes - - Drop libavcodec-dev, libavresample-dev and libavutil-dev build-deps, - updated the description according to that. + * Backport to Focal + * Revert "Disable the libav depending options on Ubuntu" + * debian/control: Set debhelper-compat (= 12) BD - -- Sebastien Bacher Wed, 04 Mar 2020 09:40:30 +0100 + -- Rob Savoury Tue, 16 Apr 2024 18:35:44 -0700 + +alsa-plugins (1.2.6-1) unstable; urgency=medium + + * New upstream release. + * Import upstream signing key and configure watch file to check for + sigs. + * Update copyright years. + * Update Standards-Version to 4.6.0, with no changes needed. + * Drop rate-lab-convert-tolibswresample.patch, cherry-picked from + upstream git. + + -- Jordi Mallach Wed, 12 Jan 2022 01:15:34 +0100 + +alsa-plugins (1.2.5-2) unstable; urgency=medium + + [ Sebastian Ramacher ] + * Apply upstream switch to support libswresample in favor of libavresample + (Closes: #971332) + + -- Jordi Mallach Mon, 23 Aug 2021 08:44:51 +0200 + +alsa-plugins (1.2.5-1) unstable; urgency=medium + + * New upstream release. + * Add upstream metadata for bug tracker and repository. + * Update Standards-Version to 4.5.1. + * Bump Build-Deps on libasound2-dev to >= 1.2.5. + * Bump debhelper-compat to v13. + + -- Jordi Mallach Sat, 21 Aug 2021 03:59:24 +0200 + +alsa-plugins (1.2.2-2) unstable; urgency=medium + + [ Sebastien Bacher ] + * Disable the libav depending options on Ubuntu + + -- Jordi Mallach Thu, 20 Aug 2020 21:37:42 +0200 alsa-plugins (1.2.2-1) unstable; urgency=medium diff -Nru alsa-plugins-1.2.2/debian/control alsa-plugins-1.2.6/debian/control --- alsa-plugins-1.2.2/debian/control 2020-03-04 08:40:30.000000000 +0000 +++ alsa-plugins-1.2.6/debian/control 2024-04-17 01:35:44.000000000 +0000 @@ -6,13 +6,16 @@ Elimar Riesebieter , Luke Yelavich Build-Depends: debhelper-compat (= 12), - libasound2-dev (>= 1.1.8), + libasound2-dev (>= 1.2.5), + libavcodec-dev, + libavutil-dev, libdbus-1-dev (>= 1.4.12-3~), libjack-dev (>= 1:0.121.0+svn4538-2~), libpulse-dev (>= 0.99.1-1~), libsamplerate0-dev | libsamplerate-dev, - libspeexdsp-dev -Standards-Version: 4.5.0 + libspeexdsp-dev, + libswresample-dev +Standards-Version: 4.6.0 Homepage: https://www.alsa-project.org/ Vcs-Git: https://salsa.debian.org/alsa-team/alsa-plugins.git Vcs-Browser: https://salsa.debian.org/alsa-team/alsa-plugins diff -Nru alsa-plugins-1.2.2/debian/copyright alsa-plugins-1.2.6/debian/copyright --- alsa-plugins-1.2.2/debian/copyright 2019-11-05 15:55:49.000000000 +0000 +++ alsa-plugins-1.2.6/debian/copyright 2022-01-11 23:36:13.000000000 +0000 @@ -9,13 +9,13 @@ the pkg-alsa project at alioth.debian.org. Files: * -Copyright: 1998-2018 Jarsolav Kysela and others +Copyright: 1998-2022 Jarsolav Kysela and others License: LGPL-2.1+ Files: debian/* Copyright: 1998-1999 Wichert Akkerman 1999-2002 Masato Taruishi - 2002-2017 Debian ALSA Maintainers + 2002-2022 Debian ALSA Maintainers License: LGPL-2.1+ License: LGPL-2.1+ diff -Nru alsa-plugins-1.2.2/debian/upstream/metadata alsa-plugins-1.2.6/debian/upstream/metadata --- alsa-plugins-1.2.2/debian/upstream/metadata 1970-01-01 00:00:00.000000000 +0000 +++ alsa-plugins-1.2.6/debian/upstream/metadata 2021-08-17 22:36:45.000000000 +0000 @@ -0,0 +1,5 @@ +--- +Bug-Database: https://github.com/alsa-project/alsa-plugins/issues +Bug-Submit: https://github.com/alsa-project/alsa-plugins/issues/new +Repository: git://git.alsa-project.org/alsa-plugins.git +Repository-Browse: https://git.alsa-project.org/?p=alsa-plugins.git diff -Nru alsa-plugins-1.2.2/debian/upstream/signing-key.asc alsa-plugins-1.2.6/debian/upstream/signing-key.asc --- alsa-plugins-1.2.2/debian/upstream/signing-key.asc 1970-01-01 00:00:00.000000000 +0000 +++ alsa-plugins-1.2.6/debian/upstream/signing-key.asc 2021-09-09 10:02:16.000000000 +0000 @@ -0,0 +1,29 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQINBF+PBUIBEACQ0eLhY6zJkZCztI3Zj7GiEkGyDYXFr10wMn2BmAxXEOhvGs5C +XtZYokNnYnojU2ehb14pdQiIYVm7YwjNjPhFmc6DnSJ74tlDtzI0ZfZYgU8B3/AU +hHCIe7NeH+uqaS4hQ4gQF3HB19GNQ21keQPtm/cZzNvkAwWQ6wxiIas/odQGt6sg +TULub4gXQw42iCW0jNeliNgeOc/4/2qtznN+Ss5G+Hs+EBh0kFCG4+5RcpgtKmYO +LEy+8qI/UmlgOeT+47eTXm4LjxHfRuKcbvSExfICUB5XLD2ZmeZbFyP48jkDvB7w +A4jNfImtlRfTvoviNlOl08Pk3aJoPR8IZIGw+EQCf3ChXTziadqOg37SAy4yGJ14 +BjirKgBNO4zB+lkLOAknsVKJOKRt3w54MevCuj0GGbfSyErZAeHvliXrfBa1ACLu +c2ynRDR/5j0FA3vPzRsHyOGFC4F34W5BhkXCuJBG2o2VDv/zANzjg/hw+0IbmH3G +kYn73EDIaz5giKJolE32WaWkz39DwuuoUaLLyfxyiN+c0p2/XQFCrOSqHNUMfI5z +Ll62nL1XruF6u9ApLKRv/uDJN7tLgds83rteYJP7/5/JSYCPB8PcUkmhB8OoVdpr +tYI8C/6Y6KREm3Jk4AdkySIFnPXZQCkiOR2qOmAuaQPeesjsrSkUtJYZcwARAQAB +tEVBTFNBIFJlbGVhc2UgVGVhbSAoUGFja2FnZSBTaWduaW5nIEtleSB2MSkgPHJl +bGVhc2VAYWxzYS1wcm9qZWN0Lm9yZz6JAk4EEwEIADgWIQTwTfUHN6waiExLPXGD +gFltpuWckQUCX48FQgIbAwULCQgHAgYVCgkICwIEFgIDAQIeAQIXgAAKCRCDgFlt +puWckRhVD/45DNoD79lHBJEu0Wv93OSlPZDUKR+BnkkdEDgDEhTvk+Bin/EWdb3g +Unc+rEczgAqjqblLH7ndBtFZPNGiQ2nu8eAdN0TrOFQx7bFg4Do7KXNUUqdPUETC +AgkozF3ucsgOcBbv6LwwDfdQDFjkg7CuNGy8CRcLSO5dLK7domq3RxF5mKl1dkOv +4brfw6ssn+pja/jkgM9BKt80ycIDiJtVRuXMBJD19ZB8EzQO9OQBdAPERSG8BwLX +LemTLAZqNd0mixVbn50qCQil64UOkOd5DHVBBokxgtlJEcDujqWaCUYSygSiP2ke +44ArDr7hRwG5KhhbFOigXo3nBYnKyiuWs0jpnrTQD9+uTxcetyBpJ6BW/i/Fy2a9 +NBFNhbDI07rCMXM25cLP8qbI5i6nTSDlkpLP40At9yUVYt8gIO6ZpGpO04/lAhT1 +NxtbZkKMo1nphMHU/MDSusoHyLxUXpppdbXTdMgsuFrXae3gcFDowQbLZqb6ZAJ5 +opX4sDBIdoHDBsI6wCGTV7AAWB8RXWW0RTYMkyIxqixiiB2N2jaau4yHfqv9QWOY +oPcx6ySKqGN0HV50PeRis5eeq7kHIdRrVIOBd0tPIqCKIvyJZk1QXReKvvE84Km2 +dYPusBlhhF7/4WVovlE6HFwyLSOyb32m4qf5dV35op07ew8i4DHpkQ== +=n4lM +-----END PGP PUBLIC KEY BLOCK----- diff -Nru alsa-plugins-1.2.2/debian/watch alsa-plugins-1.2.6/debian/watch --- alsa-plugins-1.2.2/debian/watch 2019-11-05 15:55:49.000000000 +0000 +++ alsa-plugins-1.2.6/debian/watch 2021-09-09 10:23:07.000000000 +0000 @@ -1,2 +1,3 @@ version=4 +opts="pgpsigurlmangle=s/$/.sig/" \ ftp://ftp.alsa-project.org/pub/plugins/alsa-plugins-(.+)\.tar\.bz2 diff -Nru alsa-plugins-1.2.2/depcomp alsa-plugins-1.2.6/depcomp --- alsa-plugins-1.2.2/depcomp 2020-02-19 10:26:51.000000000 +0000 +++ alsa-plugins-1.2.6/depcomp 2021-12-06 11:44:23.000000000 +0000 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff -Nru alsa-plugins-1.2.2/doc/Makefile.in alsa-plugins-1.2.6/doc/Makefile.in --- alsa-plugins-1.2.2/doc/Makefile.in 2020-02-19 10:26:51.000000000 +0000 +++ alsa-plugins-1.2.6/doc/Makefile.in 2021-12-06 11:44:23.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -253,6 +253,7 @@ psdir = @psdir@ pulseaudio_CFLAGS = @pulseaudio_CFLAGS@ pulseaudio_LIBS = @pulseaudio_LIBS@ +runstatedir = @runstatedir@ samplerate_CFLAGS = @samplerate_CFLAGS@ samplerate_LIBS = @samplerate_LIBS@ sbindir = @sbindir@ diff -Nru alsa-plugins-1.2.2/doc/a52.txt alsa-plugins-1.2.6/doc/a52.txt --- alsa-plugins-1.2.2/doc/a52.txt 2020-02-19 09:35:42.000000000 +0000 +++ alsa-plugins-1.2.6/doc/a52.txt 2021-12-06 10:17:29.000000000 +0000 @@ -1,11 +1,17 @@ A52 OUTPUT PLUGIN ================= -This plugin converts S16 linear format to A52 compressed stream and -send to an SPDIF output. It requires libavcodec for encoding the -audio stream. +This plugin converts S16(P), S32P, or FLTP formats to an A52 compressed +stream and sends it to an S/PDIF output. It requires libavcodec for +encoding the audio stream. -A PCM using this plugin can be defined like below: +The input format is determined by the version of libavcodec it is +compiled against and which ac3 codec libavcodec is configured to use. + +A global configuration, /usr/share/alsa/alsa.conf.d/60-a52-encoder.conf +defines a52 PCMs for devices with the IEC958 non-audio status bit set. + +A PCM using this plugin can be manually defined like below: pcm.myout { type a52 @@ -61,5 +67,6 @@ } -The plugin reads always S16 format (i.e. native-endian) as input, so -you'd need plug layer appropriately to covert it. +The plugin only reads the format determined by libavcodec (native- +endian S16(P), S32P or FLTP) as input, so you'll need a plug layer to +appropriately convert it. diff -Nru alsa-plugins-1.2.2/doc/lavrate.txt alsa-plugins-1.2.6/doc/lavrate.txt --- alsa-plugins-1.2.2/doc/lavrate.txt 2020-02-19 09:35:42.000000000 +0000 +++ alsa-plugins-1.2.6/doc/lavrate.txt 2021-12-06 10:17:29.000000000 +0000 @@ -2,7 +2,7 @@ =========================================0 The plugin in rate-lavr subdirectory is an external rate converter using -libavresample library. You can use this rate converter plugin by defining a +libswresample library. You can use this rate converter plugin by defining a rate PCM with "converter" parameter, such as: pcm.my_rate { @@ -16,7 +16,7 @@ Or, more easily, define a global variable "defaults.pcm.rate_converter", which is used as the default converter type by plug and rate plugins: - defaults.pcm.rate_converter "lavcrate" + defaults.pcm.rate_converter "lavrate" Write the above in your ~/.asoundrc or /etc/asound.conf. diff -Nru alsa-plugins-1.2.2/install-sh alsa-plugins-1.2.6/install-sh --- alsa-plugins-1.2.2/install-sh 2020-02-19 10:26:51.000000000 +0000 +++ alsa-plugins-1.2.6/install-sh 2021-12-06 11:44:23.000000000 +0000 @@ -451,7 +451,18 @@ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. - (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + (umask $cp_umask && + { test -z "$stripcmd" || { + # Create $dsttmp read-write so that cp doesn't create it read-only, + # which would cause strip to fail. + if test -z "$doit"; then + : >"$dsttmp" # No need to fork-exec 'touch'. + else + $doit touch "$dsttmp" + fi + } + } && + $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # diff -Nru alsa-plugins-1.2.2/jack/Makefile.am alsa-plugins-1.2.6/jack/Makefile.am --- alsa-plugins-1.2.2/jack/Makefile.am 2020-02-19 09:35:42.000000000 +0000 +++ alsa-plugins-1.2.6/jack/Makefile.am 2021-12-06 10:17:29.000000000 +0000 @@ -12,7 +12,7 @@ AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED) libasound_module_pcm_jack_la_SOURCES = pcm_jack.c -libasound_module_pcm_jack_la_LIBADD = @ALSA_LIBS@ @JACK_LIBS@ +libasound_module_pcm_jack_la_LIBADD = @ALSA_LIBS@ @JACK_LIBS@ -lpthread include ../install-hooks.am diff -Nru alsa-plugins-1.2.2/jack/Makefile.in alsa-plugins-1.2.6/jack/Makefile.in --- alsa-plugins-1.2.2/jack/Makefile.in 2020-02-19 10:26:51.000000000 +0000 +++ alsa-plugins-1.2.6/jack/Makefile.in 2021-12-06 11:44:23.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -336,6 +336,7 @@ psdir = @psdir@ pulseaudio_CFLAGS = @pulseaudio_CFLAGS@ pulseaudio_LIBS = @pulseaudio_LIBS@ +runstatedir = @runstatedir@ samplerate_CFLAGS = @samplerate_CFLAGS@ samplerate_LIBS = @samplerate_LIBS@ sbindir = @sbindir@ @@ -357,7 +358,7 @@ AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ @JACK_CFLAGS@ AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED) libasound_module_pcm_jack_la_SOURCES = pcm_jack.c -libasound_module_pcm_jack_la_LIBADD = @ALSA_LIBS@ @JACK_LIBS@ +libasound_module_pcm_jack_la_LIBADD = @ALSA_LIBS@ @JACK_LIBS@ -lpthread all: all-am .SUFFIXES: diff -Nru alsa-plugins-1.2.2/jack/pcm_jack.c alsa-plugins-1.2.6/jack/pcm_jack.c --- alsa-plugins-1.2.2/jack/pcm_jack.c 2020-02-19 09:35:42.000000000 +0000 +++ alsa-plugins-1.2.6/jack/pcm_jack.c 2021-12-06 10:17:29.000000000 +0000 @@ -28,6 +28,7 @@ #include #include #include +#include #define MAX_PERIODS_MULTIPLE 64 @@ -44,6 +45,8 @@ int fd; int activated; /* jack is activated? */ + pthread_mutex_t running_mutex; + int running; /* jack is running? */ snd_pcm_jack_port_list_t **port_names; unsigned int num_ports; @@ -51,6 +54,7 @@ snd_pcm_uframes_t hw_ptr; unsigned int sample_bits; snd_pcm_uframes_t min_avail; + int use_period_alignment; snd_pcm_channel_area_t *areas; @@ -158,6 +162,7 @@ free(jack->port_names); jack->port_names = NULL; } + pthread_mutex_destroy (&jack->running_mutex); if (jack->fd >= 0) close(jack->fd); if (jack->io.poll_fd >= 0) @@ -206,6 +211,18 @@ snd_pcm_jack_t *jack = io->private_data; snd_pcm_uframes_t xfer = 0; unsigned int channel; + + if (pthread_mutex_trylock (&jack->running_mutex) == EBUSY) { + /* Note that locking should only ever fail if + * snd_pcm_jack_start or snd_pcm_jack_stop is called at the + * same time, in which case dropping the current buffer is not + * an issue. */ + return 0; + } + if (!jack->running) { + pthread_mutex_unlock (&jack->running_mutex); + return 0; + } for (channel = 0; channel < io->channels; channel++) { jack->areas[channel].addr = @@ -267,6 +284,8 @@ pcm_poll_unblock_check(io); /* unblock socket for polling if needed */ + pthread_mutex_unlock (&jack->running_mutex); + return 0; } @@ -364,7 +383,10 @@ static int snd_pcm_jack_start(snd_pcm_ioplug_t *io) { - (void)io; + snd_pcm_jack_t *jack = io->private_data; + pthread_mutex_lock (&jack->running_mutex); + jack->running = 1; + pthread_mutex_unlock (&jack->running_mutex); /* * Since the processing of jack_activate() and jack_connect() take a * while longer, snd_pcm_jack_start() was blocked. @@ -381,7 +403,10 @@ static int snd_pcm_jack_stop(snd_pcm_ioplug_t *io) { - (void)io; + snd_pcm_jack_t *jack = io->private_data; + pthread_mutex_lock (&jack->running_mutex); + jack->running = 0; + pthread_mutex_unlock (&jack->running_mutex); return 0; } @@ -450,8 +475,9 @@ jack->num_ports, jack->num_ports)) < 0 || (err = snd_pcm_ioplug_set_param_minmax(&jack->io, SND_PCM_IOPLUG_HW_RATE, rate, rate)) < 0 || - (err = snd_pcm_ioplug_set_param_list(&jack->io, SND_PCM_IOPLUG_HW_PERIOD_BYTES, - ARRAY_SIZE(psize_list), psize_list)) < 0 || + (err = jack->use_period_alignment ? + snd_pcm_ioplug_set_param_list(&jack->io, SND_PCM_IOPLUG_HW_PERIOD_BYTES, ARRAY_SIZE(psize_list), psize_list) : + snd_pcm_ioplug_set_param_minmax(&jack->io, SND_PCM_IOPLUG_HW_PERIOD_BYTES, 128, 64*1024) ) < 0 || (err = snd_pcm_ioplug_set_param_minmax(&jack->io, SND_PCM_IOPLUG_HW_PERIODS, 2, 64)) < 0) return err; @@ -532,6 +558,7 @@ const char *client_name, snd_config_t *playback_conf, snd_config_t *capture_conf, + int use_period_alignment, snd_pcm_stream_t stream, int mode) { snd_pcm_jack_t *jack; @@ -545,8 +572,11 @@ if (!jack) return -ENOMEM; + pthread_mutex_init (&jack->running_mutex, NULL); + jack->fd = -1; jack->io.poll_fd = -1; + jack->use_period_alignment = use_period_alignment; err = parse_ports(jack, stream == SND_PCM_STREAM_PLAYBACK ? playback_conf : capture_conf); @@ -635,6 +665,7 @@ snd_config_t *capture_conf = NULL; const char *client_name = NULL; int err; + int align_jack_period = 1; /*by default we allow only JACK aligned period size*/ snd_config_for_each(i, next, conf) { snd_config_t *n = snd_config_iterator_entry(i); @@ -663,11 +694,18 @@ capture_conf = n; continue; } + if (strcmp(id, "align_psize") == 0) { + err = snd_config_get_bool(n); + if (err < 0) + return err; + align_jack_period = err ? 1 : 0; + continue; + } SNDERR("Unknown field %s", id); return -EINVAL; } - err = snd_pcm_jack_open(pcmp, name, client_name, playback_conf, capture_conf, stream, mode); + err = snd_pcm_jack_open(pcmp, name, client_name, playback_conf, capture_conf, align_jack_period, stream, mode); return err; } diff -Nru alsa-plugins-1.2.2/maemo/Makefile.in alsa-plugins-1.2.6/maemo/Makefile.in --- alsa-plugins-1.2.2/maemo/Makefile.in 2020-02-19 10:26:51.000000000 +0000 +++ alsa-plugins-1.2.6/maemo/Makefile.in 2021-12-06 11:44:23.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -351,6 +351,7 @@ psdir = @psdir@ pulseaudio_CFLAGS = @pulseaudio_CFLAGS@ pulseaudio_LIBS = @pulseaudio_LIBS@ +runstatedir = @runstatedir@ samplerate_CFLAGS = @samplerate_CFLAGS@ samplerate_LIBS = @samplerate_LIBS@ sbindir = @sbindir@ diff -Nru alsa-plugins-1.2.2/missing alsa-plugins-1.2.6/missing --- alsa-plugins-1.2.2/missing 2020-02-19 10:26:51.000000000 +0000 +++ alsa-plugins-1.2.6/missing 2021-12-06 11:44:23.000000000 +0000 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify diff -Nru alsa-plugins-1.2.2/mix/Makefile.in alsa-plugins-1.2.6/mix/Makefile.in --- alsa-plugins-1.2.2/mix/Makefile.in 2020-02-19 10:26:51.000000000 +0000 +++ alsa-plugins-1.2.6/mix/Makefile.in 2021-12-06 11:44:23.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -345,6 +345,7 @@ psdir = @psdir@ pulseaudio_CFLAGS = @pulseaudio_CFLAGS@ pulseaudio_LIBS = @pulseaudio_LIBS@ +runstatedir = @runstatedir@ samplerate_CFLAGS = @samplerate_CFLAGS@ samplerate_LIBS = @samplerate_LIBS@ sbindir = @sbindir@ diff -Nru alsa-plugins-1.2.2/mix/pcm_upmix.c alsa-plugins-1.2.6/mix/pcm_upmix.c --- alsa-plugins-1.2.2/mix/pcm_upmix.c 2020-02-19 09:35:42.000000000 +0000 +++ alsa-plugins-1.2.6/mix/pcm_upmix.c 2021-12-06 10:17:29.000000000 +0000 @@ -516,9 +516,9 @@ SND_PCM_EXTPLUG_HW_CHANNELS, 3, chlist); snd_pcm_extplug_set_param(&mix->ext, SND_PCM_EXTPLUG_HW_FORMAT, - SND_PCM_FORMAT_S16); + UPMIX_PCM_FORMAT); snd_pcm_extplug_set_slave_param(&mix->ext, SND_PCM_EXTPLUG_HW_FORMAT, - SND_PCM_FORMAT_S16); + UPMIX_PCM_FORMAT); *pcmp = mix->ext.pcm; return 0; diff -Nru alsa-plugins-1.2.2/oss/50-oss.conf alsa-plugins-1.2.6/oss/50-oss.conf --- alsa-plugins-1.2.2/oss/50-oss.conf 2020-02-19 09:35:42.000000000 +0000 +++ alsa-plugins-1.2.6/oss/50-oss.conf 2021-12-06 10:17:29.000000000 +0000 @@ -5,7 +5,7 @@ default "/dev/dsp" } type oss - port $DEVICE + device $DEVICE hint { show { @func refer diff -Nru alsa-plugins-1.2.2/oss/Makefile.in alsa-plugins-1.2.6/oss/Makefile.in --- alsa-plugins-1.2.2/oss/Makefile.in 2020-02-19 10:26:51.000000000 +0000 +++ alsa-plugins-1.2.6/oss/Makefile.in 2021-12-06 11:44:23.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -344,6 +344,7 @@ psdir = @psdir@ pulseaudio_CFLAGS = @pulseaudio_CFLAGS@ pulseaudio_LIBS = @pulseaudio_LIBS@ +runstatedir = @runstatedir@ samplerate_CFLAGS = @samplerate_CFLAGS@ samplerate_LIBS = @samplerate_LIBS@ sbindir = @sbindir@ diff -Nru alsa-plugins-1.2.2/pph/Makefile.in alsa-plugins-1.2.6/pph/Makefile.in --- alsa-plugins-1.2.2/pph/Makefile.in 2020-02-19 10:26:51.000000000 +0000 +++ alsa-plugins-1.2.6/pph/Makefile.in 2021-12-06 11:44:23.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -351,6 +351,7 @@ psdir = @psdir@ pulseaudio_CFLAGS = @pulseaudio_CFLAGS@ pulseaudio_LIBS = @pulseaudio_LIBS@ +runstatedir = @runstatedir@ samplerate_CFLAGS = @samplerate_CFLAGS@ samplerate_LIBS = @samplerate_LIBS@ sbindir = @sbindir@ diff -Nru alsa-plugins-1.2.2/pulse/Makefile.in alsa-plugins-1.2.6/pulse/Makefile.in --- alsa-plugins-1.2.2/pulse/Makefile.in 2020-02-19 10:26:51.000000000 +0000 +++ alsa-plugins-1.2.6/pulse/Makefile.in 2021-12-06 11:44:24.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -356,6 +356,7 @@ psdir = @psdir@ pulseaudio_CFLAGS = @pulseaudio_CFLAGS@ pulseaudio_LIBS = @pulseaudio_LIBS@ +runstatedir = @runstatedir@ samplerate_CFLAGS = @samplerate_CFLAGS@ samplerate_LIBS = @samplerate_LIBS@ sbindir = @sbindir@ diff -Nru alsa-plugins-1.2.2/pulse/pcm_pulse.c alsa-plugins-1.2.6/pulse/pcm_pulse.c --- alsa-plugins-1.2.2/pulse/pcm_pulse.c 2020-02-19 09:35:42.000000000 +0000 +++ alsa-plugins-1.2.6/pulse/pcm_pulse.c 2021-12-06 10:17:29.000000000 +0000 @@ -522,16 +522,22 @@ if (frag_length == 0) break; - src_buf = (char *) src_buf + pcm->offset; - frag_length -= pcm->offset; + if (src_buf) { + src_buf = (char *) src_buf + pcm->offset; + frag_length -= pcm->offset; - if (frag_length > remain_size) { - pcm->offset += remain_size; - frag_length = remain_size; - } else - pcm->offset = 0; + if (frag_length > remain_size) { + pcm->offset += remain_size; + frag_length = remain_size; + } else + pcm->offset = 0; - memcpy(dst_buf, src_buf, frag_length); + memcpy(dst_buf, src_buf, frag_length); + } else { + /* If there is a hole in the stream, generate silence. */ + int sample_size = snd_pcm_format_physical_width(io->format) / 8; + snd_pcm_format_set_silence(io->format, dst_buf, frag_length / sample_size); + } if (pcm->offset == 0) pa_stream_drop(pcm->stream); diff -Nru alsa-plugins-1.2.2/rate/Makefile.in alsa-plugins-1.2.6/rate/Makefile.in --- alsa-plugins-1.2.2/rate/Makefile.in 2020-02-19 10:26:51.000000000 +0000 +++ alsa-plugins-1.2.6/rate/Makefile.in 2021-12-06 11:44:24.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -336,6 +336,7 @@ psdir = @psdir@ pulseaudio_CFLAGS = @pulseaudio_CFLAGS@ pulseaudio_LIBS = @pulseaudio_LIBS@ +runstatedir = @runstatedir@ samplerate_CFLAGS = @samplerate_CFLAGS@ samplerate_LIBS = @samplerate_LIBS@ sbindir = @sbindir@ diff -Nru alsa-plugins-1.2.2/rate/rate_samplerate.c alsa-plugins-1.2.6/rate/rate_samplerate.c --- alsa-plugins-1.2.2/rate/rate_samplerate.c 2020-02-19 09:35:42.000000000 +0000 +++ alsa-plugins-1.2.6/rate/rate_samplerate.c 2021-12-06 10:17:29.000000000 +0000 @@ -40,9 +40,12 @@ #include struct rate_src { + unsigned int version; double ratio; int converter; unsigned int channels; + int in_int; + int out_int; float *src_buf; float *dst_buf; SRC_STATE *state; @@ -109,6 +112,13 @@ rate->data.src_ratio = rate->ratio; rate->data.end_of_input = 0; +#if SND_PCM_RATE_PLUGIN_VERSION >= 0x010003 + if (rate->version >= 0x010003) { + rate->in_int = info->in.format == SND_PCM_FORMAT_S32; + rate->out_int = info->out.format == SND_PCM_FORMAT_S32; + } +#endif + return 0; } @@ -128,24 +138,56 @@ src_reset(rate->state); } -static void pcm_src_convert_s16(void *obj, int16_t *dst, unsigned int dst_frames, - const int16_t *src, unsigned int src_frames) +static void do_convert(struct rate_src *rate, + void *dst, unsigned int dst_frames, + const void *src, unsigned int src_frames) { - struct rate_src *rate = obj; unsigned int ofs; rate->data.input_frames = src_frames; rate->data.output_frames = dst_frames; rate->data.end_of_input = 0; - src_short_to_float_array(src, rate->src_buf, src_frames * rate->channels); + if (rate->in_int) + src_int_to_float_array(src, rate->src_buf, src_frames * rate->channels); + else + src_short_to_float_array(src, rate->src_buf, src_frames * rate->channels); src_process(rate->state, &rate->data); if (rate->data.output_frames_gen < dst_frames) ofs = dst_frames - rate->data.output_frames_gen; else ofs = 0; - src_float_to_short_array(rate->dst_buf, dst + ofs * rate->channels, - rate->data.output_frames_gen * rate->channels); + if (rate->out_int) + src_float_to_int_array(rate->dst_buf, dst + ofs * rate->channels * 4, + rate->data.output_frames_gen * rate->channels); + else + src_float_to_short_array(rate->dst_buf, dst + ofs * rate->channels * 2, + rate->data.output_frames_gen * rate->channels); +} + +#if SND_PCM_RATE_PLUGIN_VERSION >= 0x010003 +static void pcm_src_convert(void *obj, + const snd_pcm_channel_area_t *dst_areas, + snd_pcm_uframes_t dst_offset, + unsigned int dst_frames, + const snd_pcm_channel_area_t *src_areas, + snd_pcm_uframes_t src_offset, + unsigned int src_frames) +{ + struct rate_src *rate = obj; + const void *src = snd_pcm_channel_area_addr(src_areas, src_offset); + void *dst = snd_pcm_channel_area_addr(dst_areas, dst_offset); + + do_convert(rate, dst, dst_frames, src, src_frames); +} +#endif + +static void pcm_src_convert_s16(void *obj, int16_t *dst, unsigned int dst_frames, + const int16_t *src, unsigned int src_frames) +{ + struct rate_src *rate = obj; + + do_convert(rate, dst, dst_frames, src, src_frames); } static void pcm_src_close(void *obj) @@ -167,12 +209,28 @@ } #endif +#if SND_PCM_RATE_PLUGIN_VERSION >= 0x010003 +static int get_supported_formats(void *obj, uint64_t *in_formats, + uint64_t *out_formats, + unsigned int *flags) +{ + *in_formats = *out_formats = + (1ULL << SND_PCM_FORMAT_S16) | + (1ULL << SND_PCM_FORMAT_S32); + *flags = SND_PCM_RATE_FLAG_INTERLEAVED; + return 0; +} +#endif + static snd_pcm_rate_ops_t pcm_src_ops = { .close = pcm_src_close, .init = pcm_src_init, .free = pcm_src_free, .reset = pcm_src_reset, .adjust_pitch = pcm_src_adjust_pitch, +#if SND_PCM_RATE_PLUGIN_VERSION >= 0x010003 + .convert = pcm_src_convert, +#endif .convert_s16 = pcm_src_convert_s16, .input_frames = input_frames, .output_frames = output_frames, @@ -181,6 +239,9 @@ .get_supported_rates = get_supported_rates, .dump = dump, #endif +#if SND_PCM_RATE_PLUGIN_VERSION >= 0x010003 + .get_supported_formats = get_supported_formats, +#endif }; static int pcm_src_open(unsigned int version, void **objp, @@ -188,24 +249,27 @@ { struct rate_src *rate; -#if SND_PCM_RATE_PLUGIN_VERSION < 0x010002 - if (version != SND_PCM_RATE_PLUGIN_VERSION) { - fprintf(stderr, "Invalid rate plugin version %x\n", version); - return -EINVAL; - } -#endif rate = calloc(1, sizeof(*rate)); if (! rate) return -ENOMEM; + + rate->version = version; rate->converter = type; *objp = rate; #if SND_PCM_RATE_PLUGIN_VERSION >= 0x010002 - if (version == 0x010001) + if (version == 0x010001) { memcpy(ops, &pcm_src_ops, sizeof(snd_pcm_rate_old_ops_t)); - else + return 0; + } +#endif +#if SND_PCM_RATE_PLUGIN_VERSION >= 0x010003 + if (version == 0x010002) { + memcpy(ops, &pcm_src_ops, sizeof(snd_pcm_rate_v2_ops_t)); + return 0; + } #endif - *ops = pcm_src_ops; + *ops = pcm_src_ops; return 0; } diff -Nru alsa-plugins-1.2.2/rate-lav/Makefile.in alsa-plugins-1.2.6/rate-lav/Makefile.in --- alsa-plugins-1.2.2/rate-lav/Makefile.in 2020-02-19 10:26:51.000000000 +0000 +++ alsa-plugins-1.2.6/rate-lav/Makefile.in 2021-12-06 11:44:24.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -339,6 +339,7 @@ psdir = @psdir@ pulseaudio_CFLAGS = @pulseaudio_CFLAGS@ pulseaudio_LIBS = @pulseaudio_LIBS@ +runstatedir = @runstatedir@ samplerate_CFLAGS = @samplerate_CFLAGS@ samplerate_LIBS = @samplerate_LIBS@ sbindir = @sbindir@ diff -Nru alsa-plugins-1.2.2/rate-lav/rate_lavrate.c alsa-plugins-1.2.6/rate-lav/rate_lavrate.c --- alsa-plugins-1.2.2/rate-lav/rate_lavrate.c 2020-02-19 09:35:42.000000000 +0000 +++ alsa-plugins-1.2.6/rate-lav/rate_lavrate.c 2021-12-06 10:17:29.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Rate converter plugin using libavresample + * Rate converter plugin using libswresample * Copyright (c) 2014 by Anton Khirnov * * This library is free software; you can redistribute it and/or @@ -17,7 +17,7 @@ #include #include -#include +#include #include #include #include @@ -25,15 +25,15 @@ static unsigned int filter_size = 16; -static unsigned int phase_shift = 10; /* auto-adjusts */ -static double cutoff = 0; /* auto-adjusts */ struct rate_src { - AVAudioResampleContext *avr; + SwrContext *avr; unsigned int in_rate; unsigned int out_rate; unsigned int channels; + + unsigned int version; }; static snd_pcm_uframes_t input_frames(void *obj ATTRIBUTE_UNUSED, @@ -51,51 +51,67 @@ static void pcm_src_free(void *obj) { struct rate_src *rate = obj; - avresample_free(&rate->avr); + swr_free(&rate->avr); +} + +static int to_av_format(snd_pcm_format_t f) +{ + switch (f) { + case SND_PCM_FORMAT_FLOAT: + return AV_SAMPLE_FMT_FLT; + case SND_PCM_FORMAT_U8: + return AV_SAMPLE_FMT_U8; + case SND_PCM_FORMAT_S16: + return AV_SAMPLE_FMT_S16; + case SND_PCM_FORMAT_S32: + default: + return AV_SAMPLE_FMT_S32; + } +} + +static int support_multi_format(struct rate_src *rate) +{ +#if SND_PCM_RATE_PLUGIN_VERSION >= 0x010003 + return rate->version >= 0x010003; +#else + return 0; +#endif } static int pcm_src_init(void *obj, snd_pcm_rate_info_t *info) { struct rate_src *rate = obj; - int i, ir, or; + int fmt; if (!rate->avr || rate->channels != info->channels) { int ret; pcm_src_free(rate); rate->channels = info->channels; - ir = rate->in_rate = info->in.rate; - or = rate->out_rate = info->out.rate; - i = av_gcd(or, ir); - if (or > ir) { - phase_shift = or/i; - } else { - phase_shift = ir/i; - } - if (cutoff <= 0.0) { - cutoff = 1.0 - 1.0/filter_size; - if (cutoff < 0.80) - cutoff = 0.80; - } + rate->in_rate = info->in.rate; + rate->out_rate = info->out.rate; - rate->avr = avresample_alloc_context(); + rate->avr = swr_alloc(); if (!rate->avr) return -ENOMEM; - av_opt_set_int(rate->avr, "in_sample_rate", info->in.rate, 0); - av_opt_set_int(rate->avr, "out_sample_rate", info->out.rate, 0); - av_opt_set_int(rate->avr, "in_sample_format", AV_SAMPLE_FMT_S16, 0); - av_opt_set_int(rate->avr, "out_sample_format", AV_SAMPLE_FMT_S16, 0); - av_opt_set_int(rate->avr, "in_channel_layout", av_get_default_channel_layout(rate->channels), 0); - av_opt_set_int(rate->avr, "out_channel_layout", av_get_default_channel_layout(rate->channels), 0); - - av_opt_set_int(rate->avr, "filter_size", filter_size, 0); - av_opt_set_int(rate->avr, "phase_shift", phase_shift, 0); - av_opt_set_double(rate->avr, "cutoff", cutoff, 0); + av_opt_set_channel_layout(rate->avr, "in_channel_layout", + av_get_default_channel_layout(rate->channels), 0); + av_opt_set_channel_layout(rate->avr, "out_channel_layout", + av_get_default_channel_layout(rate->channels), 0); + av_opt_set_int(rate->avr, "in_sample_rate", rate->in_rate, 0); + av_opt_set_int(rate->avr, "out_sample_rate", rate->out_rate, 0); + fmt = support_multi_format(rate) ? info->in.format : SND_PCM_FORMAT_S16; + av_opt_set_sample_fmt(rate->avr, "in_sample_fmt", + to_av_format(fmt), 0); + fmt = support_multi_format(rate) ? info->out.format : SND_PCM_FORMAT_S16; + av_opt_set_sample_fmt(rate->avr, "out_sample_fmt", + to_av_format(fmt), 0); - ret = avresample_open(rate->avr); + ret = swr_init(rate->avr); if (ret < 0) { - avresample_free(&rate->avr); + SNDERR("sw_init() error %d\n", ret); + swr_free(&rate->avr); return -EINVAL; } } @@ -118,26 +134,51 @@ if (rate->avr) { #if 0 - avresample_close(rate->avr); - avresample_open(rate->avr); + swr_free(rate->avr); + swr_init(rate->avr); #endif } } +static void do_convert(struct rate_src *rate, + void *dst, unsigned int dst_frames, + const void *src, unsigned int src_frames) +{ + unsigned int total_in = swr_get_delay(rate->avr, rate->in_rate) + src_frames; + + swr_convert(rate->avr, (uint8_t **)&dst, dst_frames, + (const uint8_t **)&src, src_frames); + + swr_set_compensation(rate->avr, + total_in - src_frames > filter_size ? 0 : 1, + src_frames); +} + +#if SND_PCM_RATE_PLUGIN_VERSION >= 0x010003 +static void pcm_src_convert(void *obj, + const snd_pcm_channel_area_t *dst_areas, + snd_pcm_uframes_t dst_offset, + unsigned int dst_frames, + const snd_pcm_channel_area_t *src_areas, + snd_pcm_uframes_t src_offset, + unsigned int src_frames) +{ + struct rate_src *rate = obj; + const void *src = snd_pcm_channel_area_addr(src_areas, src_offset); + void *dst = snd_pcm_channel_area_addr(dst_areas, dst_offset); + + do_convert(rate, dst, dst_frames, src, src_frames); +} +#endif + static void pcm_src_convert_s16(void *obj, int16_t *dst, unsigned int dst_frames, const int16_t *src, unsigned int src_frames) { struct rate_src *rate = obj; - int chans = rate->channels; - unsigned int total_in = avresample_get_delay(rate->avr) + src_frames; - avresample_convert(rate->avr, (uint8_t **)&dst, dst_frames * chans * 2, dst_frames, - (uint8_t **)&src, src_frames * chans * 2, src_frames); - - avresample_set_compensation(rate->avr, - total_in - src_frames > filter_size ? 0 : 1, src_frames); + do_convert(rate, dst, dst_frames, src, src_frames); } static void pcm_src_close(void *obj) @@ -156,7 +197,21 @@ static void dump(void *obj ATTRIBUTE_UNUSED, snd_output_t *out) { - snd_output_printf(out, "Converter: libavr\n"); + snd_output_printf(out, "Converter: libswresample\n"); +} +#endif + +#if SND_PCM_RATE_PLUGIN_VERSION >= 0x010003 +static int get_supported_formats(void *obj, uint64_t *in_formats, + uint64_t *out_formats, + unsigned int *flags) +{ + *in_formats = *out_formats = + (1ULL << SND_PCM_FORMAT_U8) | + (1ULL << SND_PCM_FORMAT_S16) | + (1ULL << SND_PCM_FORMAT_S32); + *flags = SND_PCM_RATE_FLAG_INTERLEAVED; + return 0; } #endif @@ -166,6 +221,9 @@ .free = pcm_src_free, .reset = pcm_src_reset, .adjust_pitch = pcm_src_adjust_pitch, +#if SND_PCM_RATE_PLUGIN_VERSION >= 0x010003 + .convert = pcm_src_convert, +#endif .convert_s16 = pcm_src_convert_s16, .input_frames = input_frames, .output_frames = output_frames, @@ -174,31 +232,35 @@ .get_supported_rates = get_supported_rates, .dump = dump, #endif +#if SND_PCM_RATE_PLUGIN_VERSION >= 0x010003 + .get_supported_formats = get_supported_formats, +#endif }; int pcm_src_open(unsigned int version, void **objp, snd_pcm_rate_ops_t *ops) - { struct rate_src *rate; -#if SND_PCM_RATE_PLUGIN_VERSION < 0x010002 - if (version != SND_PCM_RATE_PLUGIN_VERSION) { - fprintf(stderr, "Invalid rate plugin version %x\n", version); - return -EINVAL; - } -#endif rate = calloc(1, sizeof(*rate)); if (!rate) return -ENOMEM; *objp = rate; rate->avr = NULL; + rate->version = version; #if SND_PCM_RATE_PLUGIN_VERSION >= 0x010002 - if (version == 0x010001) + if (version == 0x010001) { memcpy(ops, &pcm_src_ops, sizeof(snd_pcm_rate_old_ops_t)); - else + return 0; + } +#endif +#if SND_PCM_RATE_PLUGIN_VERSION >= 0x010003 + if (version == 0x010002) { + memcpy(ops, &pcm_src_ops, sizeof(snd_pcm_rate_v2_ops_t)); + return 0; + } #endif - *ops = pcm_src_ops; + *ops = pcm_src_ops; return 0; } diff -Nru alsa-plugins-1.2.2/speex/Makefile.in alsa-plugins-1.2.6/speex/Makefile.in --- alsa-plugins-1.2.2/speex/Makefile.in 2020-02-19 10:26:51.000000000 +0000 +++ alsa-plugins-1.2.6/speex/Makefile.in 2021-12-06 11:44:24.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -336,6 +336,7 @@ psdir = @psdir@ pulseaudio_CFLAGS = @pulseaudio_CFLAGS@ pulseaudio_LIBS = @pulseaudio_LIBS@ +runstatedir = @runstatedir@ samplerate_CFLAGS = @samplerate_CFLAGS@ samplerate_LIBS = @samplerate_LIBS@ sbindir = @sbindir@ diff -Nru alsa-plugins-1.2.2/usb_stream/Makefile.in alsa-plugins-1.2.6/usb_stream/Makefile.in --- alsa-plugins-1.2.2/usb_stream/Makefile.in 2020-02-19 10:26:51.000000000 +0000 +++ alsa-plugins-1.2.6/usb_stream/Makefile.in 2021-12-06 11:44:24.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -339,6 +339,7 @@ psdir = @psdir@ pulseaudio_CFLAGS = @pulseaudio_CFLAGS@ pulseaudio_LIBS = @pulseaudio_LIBS@ +runstatedir = @runstatedir@ samplerate_CFLAGS = @samplerate_CFLAGS@ samplerate_LIBS = @samplerate_LIBS@ sbindir = @sbindir@ diff -Nru alsa-plugins-1.2.2/usb_stream/pcm_usb_stream.c alsa-plugins-1.2.6/usb_stream/pcm_usb_stream.c --- alsa-plugins-1.2.2/usb_stream/pcm_usb_stream.c 2020-02-19 09:35:42.000000000 +0000 +++ alsa-plugins-1.2.6/usb_stream/pcm_usb_stream.c 2021-12-06 10:17:29.000000000 +0000 @@ -50,9 +50,8 @@ #define FRAME_SIZE 6 -#define LCARD 32 struct user_usb_stream { - char card[LCARD]; + int card; unsigned use; struct usb_stream *s; void *write_area; @@ -79,14 +78,14 @@ static struct user_usb_stream *uus; static pthread_mutex_t uus_mutex = PTHREAD_MUTEX_INITIALIZER; -static struct user_usb_stream *get_uus(const char *card) +static struct user_usb_stream *get_uus(int card) { pthread_mutex_lock(&uus_mutex); struct user_usb_stream **l_uus = &uus, *r_uus = NULL; while (*l_uus) { - if (strcmp((*l_uus)->card, card) == 0) { + if ((*l_uus)->card == card) { r_uus = *l_uus; r_uus->use++; goto unlock; @@ -96,7 +95,7 @@ r_uus = calloc(1, sizeof(*r_uus)); if (r_uus) { r_uus->use = 1; - strcpy(r_uus->card, card); + r_uus->card = card; *l_uus = r_uus; } @@ -399,7 +398,7 @@ } static int snd_pcm_us_open(snd_pcm_t **pcmp, const char *name, - const char *card, + int card, snd_pcm_stream_t stream, int mode, snd_pcm_uframes_t period_size, unsigned int rate) @@ -408,15 +407,12 @@ int err; char us_name[32]; - if (strlen(card) >= LCARD) - return -EINVAL; - assert(pcmp); us = calloc(1, sizeof(*us)); if (!us) return -ENOMEM; - if (snprintf(us_name, sizeof(us_name), "hw:%s", card) + if (snprintf(us_name, sizeof(us_name), "hw:%d", card) >= (int)sizeof(us_name)) { fprintf(stderr, "%s: WARNING: USB_STREAM client name '%s' truncated to %d characters, might not be unique\n", __func__, us_name, (int)strlen(us_name)); @@ -469,8 +465,7 @@ SND_PCM_PLUGIN_DEFINE_FUNC(usb_stream) { snd_config_iterator_t i, next; - const char *card; - int err; + int err, card = -1; long period_size = 0, rate = 0; snd_config_for_each(i, next, conf) { @@ -479,14 +474,14 @@ if (snd_config_get_id(n, &id) < 0) continue; - if (strcmp(id, "comment") == 0 || strcmp(id, "type") == 0) + if (strcmp(id, "comment") == 0 || strcmp(id, "type") == 0 || strcmp(id, "hint") == 0) continue; if (strcmp(id, "card") == 0) { - if (snd_config_get_type(n) != SND_CONFIG_TYPE_STRING) { - SNDERR("Invalid type for %s", id); + card = snd_config_get_card(n); + if (card < 0) { + SNDERR("Invalid card '%s'", id); return -EINVAL; } - snd_config_get_string(n, &card); continue; } if (strcmp(id, "period_size") == 0) { diff -Nru alsa-plugins-1.2.2/version alsa-plugins-1.2.6/version --- alsa-plugins-1.2.2/version 2020-02-19 10:26:56.000000000 +0000 +++ alsa-plugins-1.2.6/version 2021-12-06 11:44:28.000000000 +0000 @@ -1 +1 @@ -1.2.2 +1.2.6