Sync from SUSE:SLFO:Main spandsp revision 111817a8160b4a8c074f1c89aac2c33e

This commit is contained in:
Adrian Schröter 2024-05-04 00:46:30 +02:00
commit 24ba5c6701
9 changed files with 546 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

15
_service Normal file
View File

@ -0,0 +1,15 @@
<services>
<service name="tar_scm" mode="disabled">
<param name="filename">spandsp</param>
<param name="scm">git</param>
<param name="url">https://github.com/freeswitch/spandsp</param>
<param name="revision">master</param>
<param name="parent-tag">f995f452ee79d03c4afa90b10e86a5f9c553920c</param>
<param name="versionformat">3.0.0+g@TAG_OFFSET@</param>
</service>
<service name="recompress" mode="disabled">
<param name="file">*.tar</param>
<param name="compression">xz</param>
</service>
<service name="set_version" mode="disabled"/>
</services>

1
baselibs.conf Normal file
View File

@ -0,0 +1 @@
libspandsp3

24
no-sse.diff Normal file
View File

@ -0,0 +1,24 @@
---
configure.ac | 2 ++
1 file changed, 2 insertions(+)
Index: spandsp-3.0.0.g15/configure.ac
===================================================================
--- spandsp-3.0.0.g15.orig/configure.ac
+++ spandsp-3.0.0.g15/configure.ac
@@ -350,6 +350,7 @@ gnu)
if test x"$ac_cv_gcc_unused_but_set_variable" = xyes ; then
COMP_VENDOR_CFLAGS="-Wunused-but-set-variable $COMP_VENDOR_CFLAGS"
fi
+if false; then
AX_CHECK_ARM_NEON([$host],
[AC_DEFINE([SPANDSP_USE_ARM_NEON], [1], [Use the ARM NEON instruction set])])
if test "$enable_neon" = "yes" ; then
@@ -382,6 +383,7 @@ gnu)
if test "$enable_mmx" = "yes" ; then
COMP_VENDOR_CFLAGS="-mmmx $COMP_VENDOR_CFLAGS"
fi
+fi
case $host_os in
cygwin*)
COMP_VENDOR_LDFLAGS="-no-undefined"

BIN
spandsp-3.0.0+g21.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,47 @@
---
src/at_interpreter.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
Index: spandsp-3.0.0.g15/src/at_interpreter.c
===================================================================
--- spandsp-3.0.0.g15.orig/src/at_interpreter.c
+++ spandsp-3.0.0.g15/src/at_interpreter.c
@@ -921,6 +921,7 @@ static const char *at_cmd_A(at_state_t *
static const char *at_cmd_D(at_state_t *s, const char *t)
{
+ int first = true;
char *u;
char num[100 + 1];
char ch;
@@ -940,6 +941,7 @@ static const char *at_cmd_D(at_state_t *
{
/* V.250 6.3.1.1 Basic digit set */
*u++ = ch;
+ first = false;
}
else
{
@@ -953,7 +955,10 @@ static const char *at_cmd_D(at_state_t *
case '#':
/* V.250 6.3.1.1 Full DTMF repertoire */
if (!s->p.pulse_dial)
+ {
*u++ = ch;
+ first = false;
+ }
break;
case ' ':
case '-':
@@ -963,7 +968,10 @@ static const char *at_cmd_D(at_state_t *
break;
case '+':
/* V.250 6.3.1.1 International access code */
- /* TODO: */
+ /* Allow + as first symbol in a dial string. */
+ if (first)
+ *u++ = ch;
+ first = false;
break;
case ',':
/* V.250 6.3.1.2 Pause */

View File

@ -0,0 +1,25 @@
Raise v17 training time tolerance, as found in iaxmodem supplied spandsp.
---
src/v17rx.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Index: spandsp-3.0.0.g15/src/v17rx.c
===================================================================
--- spandsp-3.0.0.g15.orig/src/v17rx.c
+++ spandsp-3.0.0.g15/src/v17rx.c
@@ -1064,10 +1064,10 @@ static void process_half_baud(v17_rx_sta
s->carrier_track_i = 100.0f;
s->carrier_track_p = 500000.0f;
#endif
- /* TODO: This was increased by a factor of 10 after studying real world failures.
- However, it is not clear why this is an improvement, If something gives
- a huge training error, surely it shouldn't decode too well? */
- if (s->training_error < (V17_TRAINING_SHORT_SEG_2_LEN - 8)*FP_SCALE(4.0f)*FP_SCALE(1.0f)*constellation_spacing[s->space_map])
+ /* We need to be liberally accepting of poor fast-train training errors here.
+ Doing this affords the DTE the opportunity to make some use of whatever
+ valid Phase C data can be decoded. */
+ if (s->training_error < (V17_TRAINING_SHORT_SEG_2_LEN - 8)*FP_SCALE(10.0f)*FP_SCALE(1.0f)*constellation_spacing[s->space_map])
{
s->training_count = 0;
if (s->bits_per_symbol == 2)

275
spandsp.changes Normal file
View File

@ -0,0 +1,275 @@
-------------------------------------------------------------------
Sun Jun 25 05:42:17 UTC 2023 - Jan Engelhardt <jengelh@inai.de>
- Update to snapshot 3.0.0+g21 (0d2e6ac6)
* Ensure we never copy too much from pitch_overlap
to the output buffer.
-------------------------------------------------------------------
Tue Mar 28 05:17:02 UTC 2023 - Martin Liška <mliska@suse.cz>
- Enable LTO as it builds with now (boo#1136056).
-------------------------------------------------------------------
Mon Apr 18 07:38:15 UTC 2022 - Jan Engelhardt <jengelh@inai.de>
- Add no-sse.diff
-------------------------------------------------------------------
Sat Apr 2 07:34:40 UTC 2022 - Jan Engelhardt <jengelh@inai.de>
- Update to snapshot 3.0.0.g15
* Add ARMv7 NEON support
* Add V.32bis and V.34 support
- Remove spandsp-autoconf.diff
-------------------------------------------------------------------
Sun Sep 6 14:04:36 UTC 2020 - Jan Engelhardt <jengelh@inai.de>
- More specfile modernization.
-------------------------------------------------------------------
Mon Sep 9 17:16:20 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
- Modernized the specfile.
-------------------------------------------------------------------
Thu May 23 11:06:20 UTC 2019 - Martin Liška <mliska@suse.cz>
- Disable LTO (boo#1136056).
-------------------------------------------------------------------
Tue Sep 11 09:29:34 UTC 2018 - Hans-Peter Jansen <hpj@urpla.net>
- add patch spandsp-handle-international-dialstring-prefix.diff
in order to support the international dialing prefix
-------------------------------------------------------------------
Mon Sep 10 12:17:35 UTC 2018 - Hans-Peter Jansen <hpj@urpla.net>
- apply patch spandsp-raise-traintime-tolerance.diff
as supplied with iaxmodem
-------------------------------------------------------------------
Wed Mar 25 17:33:40 UTC 2015 - p.drouand@gmail.com
- Update to version 0.0.6 (finale)
* Unupdated changelog
- Remove obsolete patches
* spandsp-pkgconfig1.diff
* spandsp-path.diff
* spandsp-lrint.diff
- Update spandsp-autoconf.diff
- Use download Url as source
- Remove xz require
-------------------------------------------------------------------
Fri Jan 25 04:27:45 UTC 2013 - jengelh@inai.de
- Update to new upstream release 0.0.6pre21
* No upstream changelog has been specified
-------------------------------------------------------------------
Sun Mar 11 12:41:13 UTC 2012 - jengelh@medozas.de
- Update to new upstream release 0.0.6pre20
* No upstream changelog has been specified
* Protect against T.38 stuff arriving after document has finished
-------------------------------------------------------------------
Sun Mar 11 12:37:18 UTC 2012 - jengelh@medozas.de
- License clarifications (bnc#731943)
-------------------------------------------------------------------
Sat Nov 19 16:02:00 UTC 2011 - coolo@suse.com
- add libtool as buildrequire to avoid implicit dependency
-------------------------------------------------------------------
Thu Oct 27 15:16:40 UTC 2011 - kkeil@linux-pingi.de
- Upstream did change the license to LGPL 2.1 in 2008
-------------------------------------------------------------------
Sat Oct 8 16:23:09 UTC 2011 - jengelh@medozas.de
- updated to new upstream release 0.0.6pre18
* no changelog was provided by upstream
- put documentation into its own subpackage
- enable SSE2 on x86_64, since it's part of the x86_64 ABI anyway
- add patches to resolve autoconf warnings (spandsp-autoconf.diff),
failure to properly find lrint (spandsp-lrint.diff), a typo
(spandsp-path.diff), and faulty dependencies
(spandsp-pkgconfig1.diff)
- Separate build and test dependencies
- Enable parallel build
-------------------------------------------------------------------
Sat Mar 13 20:33:19 UTC 2010 - chris@computersalat.de
- added baselibs.conf
- cleanup spec
o sort TAGS
o fix build warnig
build without RPM_OPT_FLAGS
o macro usage
o removed data from changelog
-------------------------------------------------------------------
Wed Sep 24 12:22:20 CEST 2008 - ro@suse.de
- fix debug package requires again
-------------------------------------------------------------------
Wed Sep 17 02:14:21 CEST 2008 - mrueckert@suse.de
- fix requires of the debug package
-------------------------------------------------------------------
Thu Sep 11 15:20:12 CEST 2008 - max@suse.de
- New version: 0.0.5pre4
- Packages renamed to comply with the package naming conventions.
- Added libxslt and docbook-xsl-stylesheets to build the
T.34 documentation.
-------------------------------------------------------------------
Fri May 2 23:05:28 CEST 2008 - crrodriguez@suse.de
- fix Error: shlib-with-non-pic-code /usr/lib/libspandsp.so.0.0.2 in PPC
_ some files not built with RPM_OPT_FLAGS
-------------------------------------------------------------------
Mon Feb 25 07:12:47 CET 2008 - crrodriguez@suse.de
- fix library-without-ldconfig* errors
- fix -devel package dependencies
-------------------------------------------------------------------
Wed Jan 23 15:28:20 CET 2008 - max@suse.de
- New version: 0.0.4pre16
- It is said to be more stable for faxing (#347599).
- Added API documentation to the devel subpackage.
- Enabled MMX for i586 and i686.
- Removed the static library.
-------------------------------------------------------------------
Thu Aug 2 14:37:03 CEST 2007 - max@suse.de
- Update to final 0.0.3 version (obsoletes our previous patches)
- Split off a devel package
-------------------------------------------------------------------
Tue Mar 13 16:25:38 CET 2007 - pgajdos@suse.cz
- fixed 'warning: array subscript is above array bounds' (#239958)
- array-subscript.patch
-------------------------------------------------------------------
Fri Oct 20 18:47:51 CEST 2006 - max@suse.de
- New version: 0.0.3pre24
- Improved fax handling.
-------------------------------------------------------------------
Mon Mar 20 17:14:46 CET 2006 - max@suse.de
- New version: 0.0.2pre25
- fixed an error in T.4 processing, causing a sideways shift with some
sending FAX machines (e.g. some Canons).
- fixed an error in the generation of single tones.
-------------------------------------------------------------------
Wed Jan 25 21:41:45 CET 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
-------------------------------------------------------------------
Mon Jan 23 17:19:51 CET 2006 - max@suse.de
- New version: 0.0.2pre23
-------------------------------------------------------------------
Fri Dec 16 16:41:21 CET 2005 - max@suse.de
- New version: 0.0.2pre21
-------------------------------------------------------------------
Mon May 23 18:09:47 CEST 2005 - max@suse.de
- New version: 0.0.2pre18
-------------------------------------------------------------------
Wed May 4 09:49:56 CEST 2005 - max@suse.de
- New version: 0.0.2pre17
-------------------------------------------------------------------
Fri Apr 22 18:31:47 CEST 2005 - max@suse.de
- New version: 0.0.2pre15
- Fixed building with gcc4 and reduced warnings.
-------------------------------------------------------------------
Thu Apr 14 17:17:06 CEST 2005 - sbrabec@suse.cz
- Added audiofile-devel to neededforbuild.
-------------------------------------------------------------------
Mon Feb 28 18:07:21 CET 2005 - max@suse.de
- New version: 0.0.2pre10
-------------------------------------------------------------------
Mon Feb 28 16:40:04 CET 2005 - max@suse.de
- New version: 0.0.2pre9
-------------------------------------------------------------------
Thu Jan 13 15:49:19 CET 2005 - max@suse.de
- New version: 0.0.2pre8
-------------------------------------------------------------------
Wed Jan 12 15:27:23 CET 2005 - max@suse.de
- New version: 0.0.2pre7
-------------------------------------------------------------------
Mon Nov 29 12:10:47 CET 2004 - max@suse.de
- New version: 0.0.2pre6
-------------------------------------------------------------------
Thu Nov 18 02:02:40 CET 2004 - ro@suse.de
- fixed file list
-------------------------------------------------------------------
Fri Nov 5 14:02:49 CET 2004 - max@suse.de
- New version: 0.0.2pre4
-------------------------------------------------------------------
Tue Jul 6 14:44:08 CEST 2004 - max@suse.de
- autoreconf needs --install to get the names of shared libs right.
-------------------------------------------------------------------
Mon Jul 5 15:32:34 CEST 2004 - max@suse.de
- Don't use x86-speciffic assembler code.
-------------------------------------------------------------------
Wed Jun 23 18:44:07 CEST 2004 - max@suse.de
- New package: spandsp (0.0.1k)
- SpanDSP is a library of DSP functions for telephony, in the
8000 sample per second world of E1s, T1s, and higher order
PCM channels. It contains low level functions, such as basic
filters. It also contains higher level functions, such as
cadenced supervisory tone detection, and a complete software
FAX machine.

133
spandsp.spec Normal file
View File

@ -0,0 +1,133 @@
#
# spec file for package spandsp
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: spandsp
%define lname libspandsp3
Version: 3.0.0+g21
Release: 0
Summary: A DSP library for Telephony and SoftFAX
License: GPL-2.0-only AND LGPL-2.1-only
Group: Development/Libraries/C and C++
URL: https://github.com/freeswitch/spandsp
Source: %name-%version.tar.xz
Source2: baselibs.conf
Patch1: no-sse.diff
Patch2: spandsp-raise-traintime-tolerance.diff
Patch3: spandsp-handle-international-dialstring-prefix.diff
BuildRequires: docbook-xsl-stylesheets
BuildRequires: doxygen
BuildRequires: libjpeg-devel
BuildRequires: libtiff-devel
BuildRequires: libtool
BuildRequires: libxslt
BuildRequires: pkg-config
%define tests 0
%if 0%{?tests}
BuildRequires: fftw3-devel
BuildRequires: fltk-devel
BuildRequires: gcc-c++
BuildRequires: libpcap-devel
BuildRequires: pkgconfig(audiofile)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(sndfile)
BuildRequires: pkgconfig(xproto)
%endif
%description
SpanDSP is a library of DSP functions for telephony, in the 8000 sample
per second world of E1s, T1s, and higher order PCM channels. It
contains low level functions, such as basic filters. It also contains
higher level functions, such as cadenced supervisory tone detection,
and a complete software FAX machine.
%package devel
Summary: Development files for the SpanDSP library
License: LGPL-2.1-only
Group: Development/Libraries/C and C++
Requires: %lname = %version
Requires: libjpeg-devel
Requires: libtiff-devel
%description devel
This package contains files that are needed for developing or compiling
software that uses the spandsp library.
%package -n %lname
Summary: A DSP library for Telephony and SoftFAX
License: LGPL-2.1-only
Group: System/Libraries
%description -n %lname
SpanDSP is a library of DSP functions for telephony, in the 8000 sample
per second world of E1s, T1s, and higher order PCM channels. It
contains low level functions, such as basic filters. It also contains
higher level functions, such as cadenced supervisory tone detection,
and a complete software FAX machine.
%package doc
Summary: Documentation for the libspandsp API
License: GPL-2.0-only AND LGPL-2.1-only
Group: Documentation/HTML
BuildArch: noarch
%description doc
This package contains documentation for the libspandsp API.
%prep
%autosetup -p1
# The cpuid calls in the source code only apply to a test program.
# The library itself is (was) statically enabling -msse during configure, which
# is now removed.
%build
autoreconf -fiv
%configure \
--disable-static \
--enable-doc
%make_build
%check
%if 0%{?tests}
%make_build check
%endif
%install
%make_install
mkdir -p "%buildroot%_docdir/%name"
cp -a NEWS README DueDiligence ChangeLog doc/api/html \
"%buildroot/%_docdir/%name"
rm -f "%buildroot/%_libdir"/*.la
ln -s ../spandsp.h "%buildroot/%_includedir/spandsp/spandsp.h"
%post -n %lname -p /sbin/ldconfig
%postun -n %lname -p /sbin/ldconfig
%files devel
%license COPYING
%_includedir/*
%_libdir/lib%name.so
%_libdir/pkgconfig/*.pc
%files -n %lname
%_libdir/lib%name.so.3*
%files doc
%_docdir/%name/
%changelog