This commit is contained in:
committed by
Git OBS Bridge
parent
ddf17d0ddf
commit
685362d20f
77
alsa-utils-hg-fixes.diff
Normal file
77
alsa-utils-hg-fixes.diff
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
diff -r 16f32be6b8b9 aplay/aplay.c
|
||||||
|
--- a/aplay/aplay.c Tue Feb 05 10:08:11 2008 +0100
|
||||||
|
+++ b/aplay/aplay.c Wed Feb 13 12:53:18 2008 +0100
|
||||||
|
@@ -745,8 +745,9 @@ static ssize_t test_wavefile(int fd, u_c
|
||||||
|
check_wavefile_space(buffer, len, blimit);
|
||||||
|
test_wavefile_read(fd, buffer, &size, len, __LINE__);
|
||||||
|
f = (WaveFmtBody*) buffer;
|
||||||
|
- if (LE_SHORT(f->format) != WAV_PCM_CODE) {
|
||||||
|
- error(_("can't play not PCM-coded WAVE-files"));
|
||||||
|
+ if (LE_SHORT(f->format) != WAV_FMT_PCM &&
|
||||||
|
+ LE_SHORT(f->format) != WAV_FMT_IEEE_FLOAT) {
|
||||||
|
+ error(_("can't play WAVE-file format 0x%04x which is not PCM or FLOAT encoded"), LE_SHORT(f->format));
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
if (LE_SHORT(f->modus) < 1) {
|
||||||
|
@@ -788,7 +789,10 @@ static ssize_t test_wavefile(int fd, u_c
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 32:
|
||||||
|
- hwparams.format = SND_PCM_FORMAT_S32_LE;
|
||||||
|
+ if (LE_SHORT(f->format) == WAV_FMT_PCM)
|
||||||
|
+ hwparams.format = SND_PCM_FORMAT_S32_LE;
|
||||||
|
+ else if (LE_SHORT(f->format) == WAV_FMT_IEEE_FLOAT)
|
||||||
|
+ hwparams.format = SND_PCM_FORMAT_FLOAT_LE;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
error(_(" can't play WAVE-files with sample %d bits wide"),
|
||||||
|
@@ -1778,6 +1782,7 @@ static void begin_wave(int fd, size_t cn
|
||||||
|
bits = 16;
|
||||||
|
break;
|
||||||
|
case SND_PCM_FORMAT_S32_LE:
|
||||||
|
+ case SND_PCM_FORMAT_FLOAT_LE:
|
||||||
|
bits = 32;
|
||||||
|
break;
|
||||||
|
case SND_PCM_FORMAT_S24_LE:
|
||||||
|
@@ -1796,7 +1801,10 @@ static void begin_wave(int fd, size_t cn
|
||||||
|
cf.type = WAV_FMT;
|
||||||
|
cf.length = LE_INT(16);
|
||||||
|
|
||||||
|
- f.format = LE_SHORT(WAV_PCM_CODE);
|
||||||
|
+ if (hwparams.format == SND_PCM_FORMAT_FLOAT_LE)
|
||||||
|
+ f.format = LE_SHORT(WAV_FMT_IEEE_FLOAT);
|
||||||
|
+ else
|
||||||
|
+ f.format = LE_SHORT(WAV_FMT_PCM);
|
||||||
|
f.modus = LE_SHORT(hwparams.channels);
|
||||||
|
f.sample_fq = LE_INT(hwparams.rate);
|
||||||
|
#if 0
|
||||||
|
diff -r 16f32be6b8b9 aplay/formats.h
|
||||||
|
--- a/aplay/formats.h Tue Feb 05 10:08:11 2008 +0100
|
||||||
|
+++ b/aplay/formats.h Wed Feb 13 12:53:18 2008 +0100
|
||||||
|
@@ -64,7 +64,11 @@ typedef struct voc_ext_block {
|
||||||
|
#define WAV_WAVE COMPOSE_ID('W','A','V','E')
|
||||||
|
#define WAV_FMT COMPOSE_ID('f','m','t',' ')
|
||||||
|
#define WAV_DATA COMPOSE_ID('d','a','t','a')
|
||||||
|
-#define WAV_PCM_CODE 1
|
||||||
|
+
|
||||||
|
+/* WAVE fmt block constants from Microsoft mmreg.h header */
|
||||||
|
+#define WAV_FMT_PCM 0x0001
|
||||||
|
+#define WAV_FMT_IEEE_FLOAT 0x0003
|
||||||
|
+#define WAV_FMT_DOLBY_AC3_SPDIF 0x0092
|
||||||
|
|
||||||
|
/* it's in chunks like .voc and AMIGA iff, but my source say there
|
||||||
|
are in only in this combination, so I combined them in one header;
|
||||||
|
diff -r 16f32be6b8b9 configure.in
|
||||||
|
--- a/configure.in Tue Feb 05 10:08:11 2008 +0100
|
||||||
|
+++ b/configure.in Wed Feb 13 12:53:18 2008 +0100
|
||||||
|
@@ -27,9 +27,7 @@ dnl AC_PROG_CXX
|
||||||
|
dnl AC_PROG_CXX
|
||||||
|
AC_PROG_INSTALL
|
||||||
|
AC_PROG_LN_S
|
||||||
|
-AM_PATH_ALSA(1.0.15)
|
||||||
|
-AC_CHECK_FUNC(snd_tlv_get_dB_range,,
|
||||||
|
- AC_ERROR([No TLV support code in alsa-lib]))
|
||||||
|
+AM_PATH_ALSA(1.0.16)
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(alsamixer,
|
||||||
|
[ --disable-alsamixer Disable alsamixer compilation],
|
@@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Feb 13 12:52:06 CET 2008 - tiwai@suse.de
|
||||||
|
|
||||||
|
- clean up configure script
|
||||||
|
- add support of IEEE float in aplay/arecord
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Feb 8 12:17:24 CET 2008 - tiwai@suse.de
|
Fri Feb 8 12:17:24 CET 2008 - tiwai@suse.de
|
||||||
|
|
||||||
|
@@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
# norootforbuild
|
# norootforbuild
|
||||||
|
|
||||||
|
|
||||||
Name: alsa-utils
|
Name: alsa-utils
|
||||||
BuildRequires: alsa-devel ncurses-devel
|
BuildRequires: alsa-devel ncurses-devel
|
||||||
%define package_version 1.0.16
|
%define package_version 1.0.16
|
||||||
@@ -20,9 +21,9 @@ Requires: dialog pciutils
|
|||||||
AutoReqProv: on
|
AutoReqProv: on
|
||||||
Summary: Advanced Linux Sound Architecture Utilities
|
Summary: Advanced Linux Sound Architecture Utilities
|
||||||
Version: 1.0.16
|
Version: 1.0.16
|
||||||
Release: 7
|
Release: 10
|
||||||
Source: ftp://ftp.alsa-project.org/pub/util/alsa-utils-%{package_version}.tar.bz2
|
Source: ftp://ftp.alsa-project.org/pub/util/alsa-utils-%{package_version}.tar.bz2
|
||||||
# Patch: alsa-utils-hg-fixes.diff
|
Patch: alsa-utils-hg-fixes.diff
|
||||||
Url: http://www.alsa-project.org/
|
Url: http://www.alsa-project.org/
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
@@ -39,9 +40,8 @@ Authors:
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{package_version}
|
%setup -q -n %{name}-%{package_version}
|
||||||
# %patch -p1
|
%patch -p1
|
||||||
mv alsamixer/README alsamixer/README-alsamixer
|
mv alsamixer/README alsamixer/README-alsamixer
|
||||||
%{?suse_update_config:%{suse_update_config -f .}}
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
autoreconf -fi
|
autoreconf -fi
|
||||||
@@ -69,6 +69,9 @@ make DESTDIR=$RPM_BUILD_ROOT install
|
|||||||
%{_datadir}/alsa
|
%{_datadir}/alsa
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Feb 13 2008 tiwai@suse.de
|
||||||
|
- clean up configure script
|
||||||
|
- add support of IEEE float in aplay/arecord
|
||||||
* Fri Feb 08 2008 tiwai@suse.de
|
* Fri Feb 08 2008 tiwai@suse.de
|
||||||
- updated to version 1.0.16-final:
|
- updated to version 1.0.16-final:
|
||||||
* just a version bump
|
* just a version bump
|
||||||
|
Reference in New Issue
Block a user