summaryrefslogtreecommitdiff
path: root/include/uapi/sound
AgeCommit message (Collapse)AuthorFilesLines
2014-07-21ALSA: pcm: Introduce protocol version field to sw_paramsTakashi Iwai1-2/+2
For controlling the new fields more strictly, add sw_params.proto field indicating the protocol version of the user-space. User-space should fill the SNDRV_PCM_VERSION value it's built with, then kernel can know whether the new fields should be evaluated or not. And now tstamp_type field is evaluated only when the valid value is set there. This avoids the wrong override of tstamp_type to zero, which is SNDRV_PCM_TSTAMP_TYPE_GETTIMEOFDAY. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-10ALSA: pcm: Add timestamp type to sw_paramsTakashi Iwai1-2/+4
For allowing adjusting the timestamp type on the fly, add it to sw_params. The existing ioctl is still kept for compatibility. Along with this, increment the PCM protocol version. The extension was suggested by Clemens Ladisch. Acked-by: Jaroslav Kysela <perex@perex.cz> Reviewed-by: Mark Brown <broonie@linaro.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-10ALSA: Provide a CLOCK_MONOTONIC_RAW timestamp typeMark Brown1-1/+2
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. [dropped tstamp_type assignment code, as it's no longer needed -- tiwai] Reported-by: Daniel Thompson <daniel.thompson@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org> Acked-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-06-23ALSA: compress: fix the struct alignment to 4 bytesVinod Koul2-14/+14
In 64bit systems the compiler can default align to 8bytes causing mis-match with 32bit usermode. Avoid this is future by ensuring all the structures shared with usermode are packed and aligned to 4 bytes irrespective of arch used [coding style fixes by tiwai] Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-06-12ALSA: compress: Cancel the optimization of compiler and fix the size of ↵Wang, Xiaoming1-1/+1
struct for all platform. Cancel the optimization of compiler for struct snd_compr_avail which size will be 0x1c in 32bit kernel while 0x20 in 64bit kernel under the optimizer. That will make compaction between 32bit and 64bit. So add packed to fix the size of struct snd_compr_avail to 0x1c for all platform. Signed-off-by: Zhang Dongxing <dongxing.zhang@intel.com> Signed-off-by: xiaoming wang <xiaoming.wang@intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-26ALSA: bebob: Add hwdep interfaceTakashi Sakamoto2-1/+3
This interface is designed for mixer/control application. By using hwdep interface, the application can get information about firewire node, can lock/unlock kernel streaming and can get notification at starting/stopping kernel streaming. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-26ALSA: fireworks: Add command/response functionality into hwdep interfaceTakashi Sakamoto1-0/+19
This commit adds two functionality for hwdep interface, adds two parameters for this driver, add a node for proc interface. To receive responses from devices, this driver already allocate own callback into initial memory space in host controller. This means no one can allocate its own callback to the address. So this driver must give a way for user applications to receive responses. This commit adds a functionality to receive responses via hwdep interface. The application can receive responses to read from this interface. To achieve this, this commit adds a buffer to queue responses. The default size of this buffer is 1024 bytes. This size can be changed to give preferrable size to 'resp_buf_size' parameter for this driver. The application should notice rest of space in this buffer because this driver don't push responses when this buffer has no space. Additionaly, this commit adds a functionality to transmit commands via hwdep interface. The application can transmit commands to write into this interface. I note that the application can transmit one command at once, but can receive as many responses as possible untill the user-buffer is full. When using these interfaces, the application must keep maximum number of sequence number in command within the number in firewire.h because this driver uses this number to distinguish the response is against the command by the application or this driver. Usually responses against commands which the application transmits are pushed into this buffer. But to enable 'resp_buf_debug' parameter for this driver, all responses are pushed into the buffer. When using this mode, I reccomend to expand the size of buffer. Finally this commit adds a new node into proc interface to output status of the buffer. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-26ALSA: fireworks: Add hwdep interfaceTakashi Sakamoto2-2/+4
This interface is designed for mixer/control application. To use hwdep interface, the application can get information about firewire node, can lock/unlock kernel streaming and can get notification at starting/stopping kernel streaming. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-07ALSA: compress: add num_sample_rates in snd_codec_descVinod Koul1-0/+2
this gives ability to convey the valid values of supported rates in sample_rates array Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-05ALSA: compress: update struct snd_codec_desc for sample rateVinod Koul1-1/+2
Now that we don't use SNDRV_PCM_RATE_xxx bit fields for sample rate, we need to change the description to an array for describing the sample rates supported by the sink/source Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-05ALSA: compress: update comment for sample rate in snd_codecVinod Koul1-1/+2
Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-12-16ALSA: compress: change the way sample rates are sent to kernelVinod Koul1-1/+1
The usage of SNDRV_RATES is not effective as we can have rates like 12000 or some other ones used by decoders. This change the usage of this to use the raw Hz values to be sent to kernel Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-12-10ALSA: compress: Fix 64bit ABI incompatibilityTakashi Iwai1-3/+3
snd_pcm_uframes_t is defined as unsigned long so it would take different sizes depending on 32 or 64bit architectures. As we don't want this ABI incompatibility, and there is no real 64bit user yet, let's make it the fixed size with __u32. Also bump the protocol version number to 0.1.2. Acked-by: Vinod Koul <vinod.koul@intel.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-07ALSA: include/uapi/sound/firewire.h: use "_UAPI" instead of "UAPI"Chen Gang1-3/+3
When installing, "scripts/headers_install.sh" will strip guard macro' "_UAPI" to prevent from appearing it to users. And also, all another files which need uapi prefix always use "_UAPI", not "UAPI". So use "_UAPI" instead of "UAPI" on the guard macro, and also give a comment for "#endif". Signed-off-by: Chen Gang <gang.chen@asianux.com> Acked-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-22Merge branch 'dice-driver-playback-only' of ↵Takashi Iwai3-1/+54
git://git.alsa-project.org/alsa-kprivate into for-next
2013-10-17ALSA: add DICE driverClemens Ladisch3-1/+54
As a start point for further development, this is an incomplete driver for DICE devices: - only playback (so no clock source except the bus clock) - only 44.1 kHz - no MIDI - recovery after bus reset is slow - hwdep device is created, but not actually implemented Contains compilation fixes by Stefan Richter. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2013-08-19ALSA: hdspm - Fix SNDRV_HDSPM_IOCTL_GET_LTCAdrian Knoth1-1/+1
Use struct hdspm_ltc to query the LTC, using a mixer struct is just plain wrong. Due to the wrong struct, this ioctl was never working, so we're free to fix it without breaking userspace compatibility. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-06-28ALSA: Replace the magic number 44 with constTakashi Iwai1-0/+2
The char arrays with size 44 are for the name string of snd_ctl_elem_id. Define the constant and replace the raw numbers with it for clarifying better. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-04-18ALSA: add DSD formatsDaniel Mack1-1/+3
This patch adds two formats for Direct Stream Digital (DSD), a pulse-density encoding format which is described here: https://en.wikipedia.org/wiki/Direct_Stream_Digital DSD operates on 2.8, 5.6 or 11.2MHz sample rates and as a 1-bit stream. The two new types added by this patch describe streams that are capable of handling DSD samples in DOP format as 8-bit or in 16-bit (or at a x8 or x16 data rate, respectively). DSD itself specifies samples in *bit*, while DOP and ALSA handle them as *bytes*. Hence, a factor of 8 or 16 has to be applied for the sample rare configuration, according to the following table: configured hardware 176.4KHz 352.8kHz 705.6KHz <---- sample rate 8-bit 2.8MHz 5.6MHz 16-bit 2.8Mhz 5.6MHz 11.2MHz `-----------------------------' actual DSD sample rates Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-14ALSA: compress: add support for gapless playbackJeeja KP1-1/+30
this add new API for sound compress to support gapless playback. As noted in Documentation change, we add API to send metadata of encoder and padding delay to DSP. Also add API for indicating EOF and switching to subsequent track Also bump the compress API version Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-26ALSA: Extend chmap definitions for UAC2Takashi Iwai1-1/+11
USB audio class 2 has more channel map positions than we currently have. Let's add missing definitions. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-10-28ALSA: core: fix 64-bit SNDRV_PCM_IOCTL_STATUS ABI breakageClemens Ladisch1-1/+2
Commit 4eeaaeaea (ALSA: core: add hooks for audio timestamps) added the new audio_tstamp field to struct snd_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> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-10-23ALSA: core: add hooks for audio timestampsPierre-Louis Bossart1-2/+5
ALSA did not provide any direct means to infer the audio time for A/V sync and system/audio time correlations (eg. PulseAudio). Applications had to track the number of samples read/written and add/subtract the number of samples queued in the ring buffer. This accounting led to small errors, typically several samples, due to the two-step process. Computing the audio time in the kernel is more direct, as all the information is available in the same routines. Also add new .audio_wallclock routine to enable fine-grain synchronization between monotonic system time and audio hardware time. Using the wallclock, if supported in hardware, allows for a much better sub-microsecond precision and a common drift tracking for all devices sharing the same wall clock (master clock). Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-10-09UAPI: (Scripted) Disintegrate include/soundDavid Howells11-0/+3322
Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Michael Kerrisk <mtk.manpages@gmail.com> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Acked-by: Dave Jones <davej@redhat.com>
2012-10-02UAPI: (Scripted) Set up UAPI Kbuild filesDavid Howells1-0/+1
Set up empty UAPI Kbuild files to be populated by the header splitter. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Acked-by: Dave Jones <davej@redhat.com>