Commit graph

2556 commits

Author SHA1 Message Date
Takashi Iwai
d31fd52e74 test/pcm.c: Fix SND_PCM_FORMAT_S24 support
The program uses snd_pcm_format_width() wrongly to calculate the sample
size.  It must be snd_pcm_format_physical_width() instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-07-10 18:45:23 +02:00
Takashi Iwai
af2c3fbe7d Fix type-punning in test/pcm.c
The cast won't work well with strict aliasing.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-07-10 18:44:15 +02:00
Jaroslav Kysela
5e91207586 pcm: fix comment for snd_pcm_avail_update()
In some cases, value might be used for r/w ops, too.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-06-16 13:23:22 +02:00
Jaroslav Kysela
68641714a8 Release v1.0.17rc2
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-06-16 09:40:42 +02:00
Josh Green
2076b88a77 Fix segfault with dmix of 3-bytes formats
The i386 and x86-64 dmix may cause segfaults when 3-bytes formats are used
due to btsl asm code, which may overcome the buffer end-boundary.
The patch changes btsl to btsw so that it doesn't happen.

ALSA bug#3341:
	https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3341

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-06-07 10:10:49 +02:00
Takashi Iwai
1467f4e238 PCM: allow mmap-access conversion in plug
The plug plugin has a long-standing problem that it can handle only
slaves that support mmap because of format/rate/access conversions
(these corresponding plugins work only with mmap).

This patch adds the support of automatic mmap->rw conversion via
mmap_emul plugin.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-06-06 17:10:41 +02:00
Takashi Iwai
538726cc55 Export __snd_pcm_mmap_emul_open()
Export __snd_pcm_mmap_emul_open() for plug layer.  This isn't exported
globally, though.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-06-06 17:09:07 +02:00
Takashi Iwai
8843cf11e0 pcm_mmap_emul: clean up
A little bit of code clean up.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-06-06 17:07:45 +02:00
Takashi Iwai
2db108cc72 pcm_mmap_emul: Fix invalid check
The check in snd_pcm_mmap_emul_refine() is bogus and buggy.

Since the changed access type is took back at snd_pcm_mmap_emul_refine
again, it has to check the availability of mmap at each time.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-06-06 17:05:56 +02:00
Takashi Iwai
b6af5e1822 Fix compile warnings in pcm_hw.c
Two trivial compile warning fixes:

- Add a missing return to snd_pcm_hw_clear_timer_queue()
- params->info is no long but int

The second one might have hit already on 64bit machine, but alas,
no one didn't notice it.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-06-06 16:59:47 +02:00
Takashi Iwai
fce17b8c47 Fix cast warning
int64_t and long long isn't strictly identical, and thus gcc gives us
a heartful warning.  Suppress the warning by a pointer cast.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-06-06 16:58:02 +02:00
Jaroslav Kysela
6d4c09346a Release v1.0.17rc1
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-06-03 10:18:14 +02:00
Jaroslav Kysela
d7534b2cee hgcompile -> gitcompile 2008-06-03 10:17:48 +02:00
Jaroslav Kysela
fd61794399 removed .hg files and renamed hgcompile to gitcompile 2008-05-20 13:29:44 +02:00
Jaroslav Kysela
8aaccc9484 Implemented snd_pcm_sw_params_(set|get)_period_event for interrupt wakeup like behaviour
Actually, PCM timer is used as source for poll(). It might be optimized
in the kernel code later.
2008-05-09 16:02:02 +02:00
Jaroslav Kysela
c88672d86f implemented snd_pcm_rewindable() and snd_pcm_forwardable(), removed can_rewind and can_forward 2008-04-21 12:46:50 +02:00
Jaroslav Kysela
058dde8b7d implemented integer volume <-> dB volume conversion functions for simple mixer 2008-04-21 11:44:20 +02:00
Jaroslav Kysela
82af1df465 added snd_pcm_hw_params_is_monotonic/can_forward/can_rewind functions 2008-04-11 14:11:04 +02:00
Jaroslav Kysela
d4250517f0 PCM API - explain more trigger timestamp 2008-04-10 09:46:10 +02:00
Jaroslav Kysela
d555b15914 fix compilation in pcm/pcm_hw.c - monotonic clock 2008-04-10 09:08:08 +02:00
Stas Sergeev
542b12b888 pcsp: remove downsampling
apply softvol before plug as softvol doesn't support U8 as of now.
This also improves the sound quality.

Signed-off-by: Stas Sergeev <stsp@aknet.ru>
2008-03-22 17:40:57 +01:00
Takashi Iwai
87ae12214b Use defaults.pcm.file_format for the default file format of file plugin
Use "defaults.pcm.file_format" for the default file format of
file plugin.  It's set to "raw" as default for compatibility.
2008-03-17 16:11:57 +01:00
Takashi Iwai
fe95bc237a Add the support of WAV format in PCM file plugin
Added the support of WAV format in PCM file plugin.
The infile is still only in raw format.
2008-03-17 16:02:56 +01:00
Takashi Iwai
5c5f135812 Use slave PCM as a timing-source for file ifile
When ifile option is used for the file plugin, it ignores the slave PCM
and just feeds the input data.
This patch changes the behavior a bit - it uses the slave PCM as the
timing source (just read and throw data away) so that the input data
can be read in the right sample rate.
2008-03-14 14:03:54 +01:00
Takashi Iwai
3d0dae9099 Add truncate option to PCM file plugin
Addeed a new option "truncate" to indicate the behavior of creating
the output file.  When it's true (the default), the file is overwritten
and truncated at creation.  When false, the plugin tries to open a
unique file with a number suffix.

The global behavior of "file" and "tee" PCMs is defined via
defaults.pcm.file_truncate option.  You can overwrite it in ~/.asoundrc.
2008-03-12 16:30:26 +01:00
Takashi Iwai
fe8bb13400 dmix skipping first set of samples
There was a change in alsa-lib 1.0.16 which looks like it was designed to
make dmix skip samples in the case of underruns, but it causes the first
sample to be skipped since dmix->slave_hw_ptr == dmix->slave_appl_ptr.
The following patch fixes this and fixes a small typo in the comment.

From: Mike Gorse <mgorse@mgorse.dhs.org>
2008-03-10 12:02:26 +01:00
Pawel MOLL
d587383d6b Fix for alsa-lib cross-compilation problems with ALSA_CONFIG_DIR and ALSA_PLUGIN_DIR
"./configure" options for selecting ALSA configuration (default
/usr/share/alsa) and plugin (/usr/lib/alsa-lib) directories introduced
by alsa-hg/alsa-lib changeset 2284 cause problems with cross-compilation
and packaging - there is no way to redefine them in runtime, during
installation phase.

This patch adds a level of indirection between constants and their
usage - alsaconfigdir for ALSA_CONFIG_DIR and alsaplugindir for
ALSA_PLUGIN_DIR - which can be redefined during "make install" stage.

Signed-off-by: Pawel MOLL <pawel.moll@st.com>
2008-03-07 17:18:16 +01:00
Takashi Iwai
df87a4be3d Add PCM "hdmi"
Added the new PCM "hdmi" for HDA-Intel.
It's still experimental.
2008-03-07 17:15:10 +01:00
Takashi Iwai
363b7f8289 Don't show non-existing devices in snd_device_name_hint()
Suppress the non-existing devices in snd_device_name_hint().
2008-03-07 17:01:56 +01:00
Takashi Iwai
e58bd6762f Fix device number assignment in hints
Handle the device number properly if given in hints.
The current code resets the device number to -1 wrongly.
2008-03-07 17:00:45 +01:00
Takashi Iwai
91726ddf83 Fix the build with old glibc
The old systems don't support CLOCK_MONOTONIC although clock_gettime() API
itself exists.  This causes compile errors.
2008-03-07 14:35:25 +01:00
Pawel MOLL
12944a024f IEC958 definitions for consumer status channel, byte 4
Added definition for byte 4 of SPDIF channel status, according to
second edition of IEC 60958-3 (consumer) spec.

Signed-off-by: Pawel MOLL <pawel.moll@st.com>
2008-02-29 12:42:57 +01:00
Takashi Iwai
6e0b0e7c6a Fix the state in snd_pcm_ioplug_pause()
The states[] in snd_pcm_ioplug_pause() has wrong values.  They should be
swapped.  ALSA bug#3796:
	https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3796
2008-02-25 15:11:46 +01:00
Takashi Iwai
b2bd775375 Add test binaries to hgignore 2008-02-25 14:58:45 +01:00
Takashi Iwai
cc80a8954c Add doxygen.cfg to hgignore 2008-02-25 14:57:31 +01:00
Takashi Iwai
6ab63388d1 Create doxgen.cfg dynamically
The patch from bug#3799
	https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3799

The "doc" target in doc/Makefile.am assumes the build directory and
the source directory are the same and fails if they differ ... this is
because the doxygen.cfg contains relative paths (such as ../) that
only work when building in the source tree

The attached patch against hg replaces all relative paths with
@top_srcdir@ and changes doxygen.cfg to a generated file so that
configure replaces @top_srcdir@ with the appropriate configure-time
path.

Assuming people like being able to do `make -f Makefile.am doc` on
an unconfigured and having it work, i added a small `test&&sed`
that'll generate an appropriate default doxygen.cfg for them.
2008-02-25 14:56:51 +01:00
Aldrin Martoq
2cec6e2653 mark snd_seq_client_info_{get,set}_event_filter deprecated
Mark snd_seq_client_info_{get,set}_event_filter deprecated

Signed-off-by: Aldrin Martoq <amartoq@dcc.uchile.cl>
2008-02-22 17:51:05 +01:00
Aldrin Martoq
72ffc6db77 use snd_seq_client_info_event_filter_*() functions
Change snd_seq_set_client_event_filter to use the new
snd_seq_client_info_event_filter_* API

Signed-off-by: Aldrin Martoq <amartoq@dcc.uchile.cl>
2008-02-22 17:50:01 +01:00
Aldrin Martoq
83c5a60778 add a test code for snd_seq_client_info_event_filter_*()
Added test code for
snd_seq_client_info_event_filter_{clear,add,del,check}

Signed-off-by: Aldrin Martoq <amartoq@dcc.uchile.cl>
2008-02-22 17:49:01 +01:00
Aldrin Martoq
75ecdac6f4 add snd_seq_client_info_event_filter_*() functions
Added snd_seq_client_info_event_filter_{clear,add,del,check} to alsa
sequencer API

Signed-off-by: Aldrin Martoq <amartoq@dcc.uchile.cl>
2008-02-22 17:46:50 +01:00
Aldrin Martoq
882f93ac26 add snd_seq_unset_bit()
Added snd_seq_unset_bit() to alsa sequencer API

Signed-off-by: Aldrin Martoq <amartoq@dcc.uchile.cl>
2008-02-22 17:42:56 +01:00
Takashi Iwai
0e5b2a006a Fix snd_seq_change_bit()
snd_seq_change_bit() doesn't change but only set.

From: Aldrin Martoq <amartoq@dcc.uchile.cl>
2008-02-21 12:31:18 +01:00
Takashi Iwai
ac10483b21 Add atomic operation for super-H(sh3,4) architectures
This patch adds atomic operation for super-H(sh3,sh4) architecture.
See ALSA bug#3789
	https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3789
2008-02-18 13:15:55 +01:00
Takashi Iwai
c622965472 Add surround71 definition to NFORCE.conf
Now the board with ALC850 can work with 8-channel outputs.
2008-02-18 12:25:02 +01:00
Takashi Iwai
c96984f181 Fix conflict of obsoleted snd_pcm_hw_* definitions
When only SND_PCM_OLD_HW_PARAMS_API is defined but no
SND_PCM_OLD_SW_PARAMS_API, the declerations of some obsoleted functions
conflict.  Although the apps should define both at the same time, it's
not good to break.  Fixed the ifdef now.
2008-02-11 14:19:32 +01:00
Jaroslav Kysela
6772540f32 Added tag v1.0.16 for changeset b1dfac5a4d55 2008-02-05 10:08:10 +01:00
Jaroslav Kysela
aa924b6b41 release 1.0.16
Patch-level: Merged
2008-02-05 10:08:09 +01:00
Takashi Iwai
a51118bb62 Fix build with --disable-hwdep and co
control.h has function declarations with hwdep or rawmidi types
that aren't included when built without the corresponding supports.

Add ifdef appropriately to fix this.
2008-02-04 16:00:16 +01:00
Takashi Iwai
742fe3c110 Remove obsolete instr check in configure 2008-02-04 15:59:07 +01:00
Takashi Iwai
b2f43ced1c Fix wrong exported functions
The internal functions (as alias of 0.9.0rc4 variants) must be
exported but they were wrongly listed in Versions file.
Fixed the function names now.
2008-02-04 14:15:44 +01:00