Commit graph

61 commits

Author SHA1 Message Date
Jaroslav Kysela
5b9041bced Change FSF address (Franklin Street)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2017-11-14 14:29:26 +01:00
Takashi Iwai
8ef3805f1b pcm: hw: Call USER_PVERSION ioctl at open
Up from the new PCM protocol 2.0.14, user-space can inform the
protocol version it supports to kernel, so that the kernel may switch
its behavior depending on it.  Add this ioctl call in the PCM hw
plugin at opening.

The patch contains also the addition of SNDRV_PCM_INFO_SYNC_APPLPTR
carried from the upstream kernel commit 42f945970af9 ("ALSA: pcm: Add
the explicit appl_ptr sync support"), as well as the trivial change
(an addition of comma) to sync with the kernel asound.h.

Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Tested-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-06-27 11:45:22 +02:00
Takashi Sakamoto
fbc18ec771 hwdep: add support for MOTU FireWire series and RME Fireface series
Drivers for MOTU FireWire series and RME Fireface series were newly added
to v4.12 kernel. Like the other drivers in ALSA firewire stack, they also
support HwDep interface.

This commit add entries for the drivers.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-04-21 17:57:57 +02:00
Takashi Sakamoto
9307575d14 hwdep: add Line6 USB series support
Drivers for Line6 USB series was firstly added to staging directory at
development period of v2.6.30 kernel. At v4.9 kernel development, they
were moved to sound directory. The drivers include HwDep interface, while
header in user space library has never been updated for an entry
corresponding to the drivers.

This commit adds the entry.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-04-21 17:57:56 +02:00
Takashi Sakamoto
d1777a503d timer: obsolete legacy rtctimer instance
At v4.7 development, ALSA timer interface dropped device instance based on
legacy rtctimer implementation. User space applications should not use the
device instance.

This commit adds comments to notify a corresponding macro should not be
used anymore.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-04-21 17:57:56 +02:00
Takashi Iwai
2c68581c50 Update include/sound/asound.h from 4.6-pre kernel uapi
The inclusion of <linux/*.h> is done conditionally for Linux in order
to improve portability.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-03-04 10:57:21 +01:00
Takashi Sakamoto
08c4b3b0ad hwdep: add FireWire digi00x/tascam driver support
Linux 4.4 newly support these drivers. Their hardware dependent interfaces
give functionalities to get hardware information, to lock/unlock kernel
streaming and to receive lock status event.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-10-05 23:43:29 +02:00
Takashi Iwai
b07de7c26b Sync include/sound/asound.h with 4.1 kernel
This adds the new ABI for timestamp stuff and minor fixes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-21 12:49:29 +02:00
Takashi Sakamoto
93b0e9ca85 hwdep: add OXFW driver support
Linux 3.19 newly support this driver. By hardware dependent interface,
userspace applications can get hardware information, lock/unlock kernel
streaming and receive lock status event.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-10 11:56:03 +01:00
Jussi Laako
b14c49ab3d pcm: Fix DSD sample format endianess and add big-endian format
This patch adds big-endian DSD sample format and fixes return value of DSD
formats for snd_pcm_format_little_endian().

Signed-off-by: Jussi Laako <jussi@sonarnerd.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-21 15:11:05 +01:00
Jurgen Kramer
e59ffbf30e pcm: add new 32-bit DSD sample format
Add the new DSD_U32_LE sample format to alsa-lib.

NB include/pcm.h and include/sound/asound.h are updated so a new sync with the
kernel headers is not needed

Signed-off-by: Jurgen Kramer <gtmkramer@xs4all.nl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-10 09:10:50 +02:00
Takashi Iwai
717ae3dd90 Sync include/sound/asound.h with 3.17-rc1 kernel
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-11 11:51:29 +02:00
Jurgen Kramer
87df9f3b7a pcm: Fix DSD formats userland usability
Support for DSD sample formats has been added a while ago. This patch makes
those sample formats beter usable from userland (e.g. aplay).

[These implementation details have been forgotten in the previous DSD
 support patch -- tiwai]

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-11 11:51:04 +02:00
Takashi Iwai
55c5362521 pcm: Fill sw_params proto field
Fill the new proto field introduced to sw_params with the current PCM
protocol version.  This makes tstamp_type evaluated properly in the
kernel.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-22 12:14:49 +02:00
Takashi Iwai
5250a8e212 Add timestamp type to sw_params (internal only)
This patch is just the udpate of sound/asound.h taken from the kernel
commit.  The API changes and PCM structure changes will follow after
this.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-14 17:35:07 +02:00
Mark Brown
85e4704151 pcm: Provide a CLOCK_MONOTONIC_RAW timestamp type
For applications which need to synchronise with external timebases such
as broadcast TV applications the kernel monotonic time is not optimal as
it includes adjustments from NTP and so may still include discontinuities
due to that. A raw monotonic time which does not include any adjustments
is available in the kernel from getrawmonotonic() so provide userspace with
a new timestamp type SNDRV_PCM_TSTAMP_TYPE_MONOTONIC_RAW which provides
timestamps based on this as an option.

Reported-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-14 17:35:07 +02:00
Takashi Iwai
67d692af48 PCM: Add more chmap definitions for UAC2
The new PCM chmap positions have been added in (to be) 3.8-rc1 kernel,
and now updated alsa-lib, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-26 18:10:26 +01:00
Takashi Iwai
9b5beef1dd Merge kernel uapi/sound/asound.h and asequencer.h
Instead of keeping modified asound.h and asequencer.h, copy the files
in the kernel include/uapi/sound as is, and give some renames for
avoiding conflicts with alsa-lib's definitions.

Some structs, unions and typedefs in asound.h and asequencer.h are
once renamed in local.h before inclusion, then renamed back again.

A bonus by this action is that some local codes don't have to refer to
sndrv_xxx any longer.  However, some codes like src/seq/seq.c need
explicit cast because of unavoidable conflicts of struct types.

Another significant change is that now snd_pcm_sw_params.period_event
field is removed.  Instead, try to access the last reserved field
internally.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-26 18:02:17 +01:00
Clemens Ladisch
2b49df0c55 pcm: fix 64-bit SNDRV_PCM_IOCTL_STATUS ABI breakage
Commit cf40ea169a (pcm: support for audio timestamps) added the new
audio_tstamp field to struct sndrv_pcm_status.  However, struct timespec
requires 64-bit alignment, so the 64-bit compiler would insert
32 bits of padding before this field, which broke SNDRV_PCM_IOCTL_STATUS
with error messages like this:

      kernel: unknown ioctl = 0x80984120

To solve this, insert the padding explicitly so that it can be taken
into account when calculating the ABI structure size.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2012-10-28 12:30:29 +01:00
Pierre-Louis Bossart
cf40ea169a pcm: support for audio timestamps
add new snd_pcm_status_get_audio_htstamp() routine to
query the audio timestamps provided by the kernel.

This change provides applications with better ways
to track elapsed time. Before this patch, applications
would subtract queued samples (delay) from written samples,
resulting in a 1-2 sample error.

Also add snd_pcm_hw_params_supports_audio_wallclock_ts()
to query what the hardware supports.

TODO: check protocol compatibility?

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-10-25 00:13:51 +02:00
Takashi Iwai
f7300682dc PCM: Define MONO and other channel map positions
Follow the new definitions in the kernel side.  MONO and others have
been added, and the order of position table was changed again.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-09-13 08:24:59 +02:00
Takashi Iwai
48c2c90f19 Add SND_CHMAP_NA and bit flag definitions
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-09-13 08:24:58 +02:00
Takashi Iwai
0f36270dd3 Follow channel position definitions to mixer channel in mixer.h
mixer.h already contains some channel position definitions.
To be more consistent over all systems, better to follow the same
order for the new channel map, too.  But since UNKNOWN channel must be
zero but the definition in mixer.h contains -1 as UNKNOWN, simply
shift the value with 1.

If the conversion is required between SND_CHMAP and SND_MIXER_SCHN,
just increment/decrement 1.  Eventually I'll provide helper functions
for that...

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-09-13 08:24:47 +02:00
Takashi Iwai
3c4a22ea49 Implement the channel mapping API
Added new channel-mapping API functions.
Not all plugins are covered, especially the route, multi and external
plugins don't work yet.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-09-11 11:34:50 +02:00
Clemens Ladisch
15c6f83296 control: add snd_ctl_elem_add_enumerated()
Handling of user control elements was implemented for all types except
BYTES and ENUMERATED.  Enumerated user controls will be needed for the
device-specific mixers of upcoming FireWire drivers.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2011-10-07 23:38:55 +02:00
Clemens Ladisch
567cc19a88 asound.h: cosmetic changes for consistency with kernel asound.h
Change some whitespace and comments to remove spurious differences
between the alsa-lib and kernel versions of asound.h.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2011-10-05 11:01:38 +02:00
Clemens Ladisch
9736511b36 asound.h: update for latest kernel
Refresh asound.h to be up to date with its kernel source.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2011-10-05 11:01:33 +02:00
Clemens Ladisch
7c99bd24bc support for period wakeup disabling
Add API to disable period wakeups.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@intel.com>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2010-11-15 10:43:13 +01:00
Pedro Lopez-Cabanillas
ef2d3cf747 Defined symbols exposing the hrtimer to applications.
Signed-off-by: Pedro Lopez-Cabanillas <pedro.lopez.cabanillas@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-08 09:21:56 +01:00
Takashi Iwai
c821f2e7f2 Fix off_t in kernel struct
The off_t in kernel struct (for ioctls) is actually different from the
definition of user-space off_t.  The kernel off_t is equial with long
while user-space off_t depends on the large-file support.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-28 15:00:35 +01:00
Takashi Iwai
ce3df03135 Increase the components array size
Increase the components array size from 80 to 128 chars.
The string there is supposed to be null-terminated, so it can cover
the smaller array size in the older version, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-10-07 12:08:29 +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
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
Jaroslav Kysela
6814d23d29 SND_PCM_TSTAMP_MMAP -> SND_PCM_TSTAMP_ENABLE change 2008-01-11 08:54:07 +01:00
Takashi Iwai
e1e9e3ff82 Remove indirect control access
The indirect control access is removed from the kernel.
This patch cleans the corresponding alsa-lib part.
2008-01-08 18:34:36 +01:00
Jaroslav Kysela
7562320e3b Added SNDRV_PCM_IOCTL_TTSTAMP and updated PCM API version to 2.0.9 2007-12-17 09:04:42 +01:00
Jaroslav Kysela
d25e281230 Changed Jaroslav Kysela's e-mail from perex@suse.cz to perex@perex.cz 2007-10-15 10:24:55 +02:00
Jaroslav Kysela
c7a0708a23 Control API - add TLV support
snd_ctl_elem_tlv_read
snd_ctl_elem_tlv_write
snd_ctl_elem_tlv_command
snd_ctl_elem_info_is_tlv_readable
snd_ctl_elem_info_is_tlv_writable
snd_ctl_elem_info_is_tlv_commandable
snd_hctl_elem_tlv_read
snd_hctl_elem_tlv_write
snd_hctl_elem_tlv_command
2006-07-05 17:42:16 +02:00
Takashi Iwai
06e3df0549 Remove enum from kernel API
Remove enum in structs from kernel API headers.
The enum is not always equivalent with int on some architectures.

From: Hans-Christian Egtvedt <hcegtvedt@atmel.com>
2006-05-10 16:27:14 +02:00
Jaroslav Kysela
bac9a7de83 direct plugins (dmix) - suspend/resume fixes
- this patch adds support for suspend & result for dmix and other
  direct plugins
- the timer detection / initialization (TREAD support) was redesigned and
  the check for proper driver version was moved to the timer_hw.c
2005-08-16 12:19:15 +00:00
Jaroslav Kysela
1400f04ee3 sync with alsa-kernel - timer SUSPEND / RESUME events 2005-08-16 10:09:34 +00:00
Takashi Iwai
4d7c53d280 Add snd_pcm_hw_params_get/set_export_buffer()
Add snd_pcm_hw_params_get/set_export_buffer() API functions.
They control to ensure the buffer export to other processes.
If this flag is set, the local buffer of a plugin is exported over IPC shm.
Otherwise the buffer can be handled only locally (no shm).

Also fixed Version file for 1.0.9.
2005-05-19 16:59:04 +00:00
Takashi Iwai
0d0e1a55c2 Change some timer ioctls due to confliction
Change values of some timer ioctls to avoid confliction with FIO* ioctls.
Use old ioctls if the timer protocol version doesn't match.
2005-05-15 14:47:03 +00:00
Clemens Ladisch
0b4e5e095d usb-audio - add Extigy/Audigy 2 NX remote control support
Add an hwdep interface that supports reading remote control data from
Sound Blaster Extigy and Audigy 2 NX devices.
2005-04-29 15:29:29 +00:00
Takashi Iwai
ca67f32848 Increase timer protocol number
Increase the timer protocl number (to distinguish the fix for TREAD ioctls).
2005-04-14 15:28:23 +00:00
Jaroslav Kysela
f65d9f3108 Added snd_pcm_hw_params_set_rate_resample function
- snd_pcm_hw_params_set_rate_resample()
- snd_pcm_hw_params_get_rate_resample()
2005-04-12 12:09:55 +00:00
Clemens Ladisch
2570bfc7ad add HPET support
add a wrapper for the HPET driver
2005-03-21 08:17:26 +00:00
Jaroslav Kysela
b2e8c7fd49 Added SNDRV_HWDEP_IFACE_BLUETOOTH 2004-11-09 13:08:24 +00:00
Takashi Iwai
6ed5c58dce Remove the obsolete NONATOMIC ops bit.
SNDRV_PCM_INFO_NONATOMIC_OPS bit is removed.  It's obsolete now.
2004-09-21 10:36:54 +00:00
Jaroslav Kysela
eafb492512 - added SYNC_PTR ioctl support for pcm_hw plugin 2004-05-22 10:14:32 +00:00