Commit graph

3152 commits

Author SHA1 Message Date
Heiko Stübner
f449a29943 conf/ucm: ROCKCHIP-I2S: rename to VEYRON-I2S
Commit a192f52fc6 introduced an ucm profile for Rockchip Veyron-
Chromebooks by taking the ucm profile from the ChromeOS userspace.

But similarly to DAISY-I2S, PAZ00 and most other profiles, the audio
setup is pretty specific to a board type, so hogging the Rockchip name
will make it harder for future Rockchip based boards to fit in nicely.

And while Veyron also is a family of boards, all of them share the
same audio setup. The ucm profile was not released with any official
alsa release and the audio setup also isn't in the mainline kernel yet,
so such a rename should be easily possible.

Fixes: a192f52fc6 ("conf/ucm: ROCKCHIP-I2S: add Rockchip I2S UCM config.")
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-06-09 08:19:04 +02:00
Eliot Miranda
d39e1879b9 async: Handle previously installed signal handler
The issue is with the signal handler installed and deinstalled in
alsa-lib async handler.  This code makes no attempt to remember any
previously installed signal handlers for SIGIO, if SIGIO is used.
Consequently it does not call any previous handlers from its own
handler once installed, and does not reinstall any previous handler
when deinstalling its handler.  Consequently, use of also-lib within
applications that depend on SIGIO will break those applications,
rendering them inoperative once alsa-lib is running because their
signal handlers are no longer called.

This patch does remember and restore any previous handler, and chains
calls to the handler if it exists.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-06-01 08:16:31 +02:00
Takashi Iwai
614ce73d3d pcm: dmix: Return error when slave is in OPEN or DISCONNECTED
A slave PCM in OPEN or DISCONNECTED state can't be used properly at
all, so the best option is to return -EBADFD error.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-06-01 07:57:54 +02:00
Takashi Iwai
8feb96ed9b pcm: dmix: Prepare slave when it's in SETUP, too
SETUP is an unusual state, but it's still possible.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-06-01 07:57:40 +02:00
Takashi Iwai
6d1d620ead pcm: dmix: resume workaround for buggy driver
The previous commit removed the whole handling of resume in dmix, but
this seems causing another regression; some buggy drivers assume that
the device-resume needs to be triggered before transitioning to
PREPARED state.  As an ugly workaround, in this patch, when the slave
PCM supports resume, snd_pcm_direct_resume() does resume of the slave
PCM but immediately drop the stream after that.  In that way, the
device is brought to the sane active state, then the apps can prepare
and restart the stream properly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-05-31 12:45:26 +02:00
Takashi Iwai
2fa36eb03c pcm: Fix secondary retry in dsnoop and dshare
The commit [fdba9e1bad: pcm: Fallback open as the first instance for
dmix & co] introduced a mechanism to retry the open of slave PCM for
the secondary streams, but this also introduced a regression in dsnoop
and dshare plugins: since the retry goto-tag was placed at a wrong
position, it retries to re-fetch the shm unnecessarily and eventually
leads to the fatal error.

The bug can be easily reproduced by starting arecord and killing it
via SIGKILL, then starting arecord again.  The second arecord fails.

The fix is obviously to move the wrong retry goto-tags to the right
positions.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-05-28 10:37:26 +02:00
Takashi Iwai
d942498bfb pcm: Remove resume support from dmix & co
PCM dmix and other plugins inherit the resume behavior from the slave
PCM.  However, the resume on dmix can't work reliably even if the
slave PCM may do resume.  The running state of each dmix stream is
individual and may be PREPARED or RUN_PENDING while the slave PCM is
already in RUNNING.  And, when the slave PCM is resumed, the whole
samples that have been already mapped are also played back, even if
the corresponding dmix stream is still in SUSPENDED.  Such
inconsistencies can't be avoided as long as we manage each stream
individually.

That said, dmix & co can't provide the proper resume support "by
design".  For aligning with it, we should drop the whole resume code
and clear the PCM SND_PCM_INFO_RESUME flag.

Reported-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-05-18 10:49:06 +02:00
Takashi Iwai
c9a0d7d601 conf: Add thread-safe global tree reference
Most of open functions in alsa-lib have the call pattern:
  snd_config_update();
  return snd_xxx_open(x, snd_config, ...);

This means that the toplevel config gets updated, and passed to a
local open function.  Although snd_config_update() itself has a
pthread mutex to be thread safe, the whole procedure above isn't
thread safe.  Namely, the global snd_config tree may be deleted and
recreated at any time while the open function is being processed.
This may lead to a data corruption and crash of the program.

For avoiding the corruption, this patch introduces a refcount to
config tree object.  A few new helper functions are introduced as
well:
- snd_config_update_ref() does update and take the refcount of the
  toplevel tree.   The obtained config tree has to be freed via
  snd_config_unref() below.
- snd_config_ref() and snd_config_unref() manage the refcount of the
  config object.  The latter eventually deletes the object when all
  references are gone.

Along with these additions, the caller of snd_config_update() and
snd_config global tree in alsa-lib are replaced with the new helpers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-05-17 15:51:20 +02:00
Takashi Iwai
5fb3fe1724 pcm: Define namehint for single directional PCM types
The PCM namehint for some PCM types like dmix, dsnoop and surround51
should be defined as single directional.

Reported-by: Trent Reed <treed0803@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-05-12 16:35:16 +02:00
Takashi Iwai
8cdbdae731 namehint: Don't enumerate as duplex if only a single direction is defined
When a hint description has only either device_input or device_output,
we shouldn't handle it as a full duplex but rather a single
direction.  In that way, we can avoid to list up a playback stream
like dmix or surround51 as a capture stream in the namehint.

Reported-by: Trent Reed <treed0803@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-05-12 16:30:44 +02:00
Takashi Iwai
5610b356b5 pcm: dmix: Fix doubly resume of slave PCM
The dmix plugin and co may trigger the resume for each instance in
snd_pcm_direct_resume().  It means that the slave PCM gets resumed or
re-prepared/started by each opened dmix stream, and this may end up
with the doubly triggers even though the slave PCM has been already
resumed by another dmix stream.

For avoiding this conflicts, check the slave PCM state and resume only
when it's still in the suspended state.  Meanwhile we keep the shadow
state updated no matter whether the slave was triggered or not.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-05-11 13:06:25 +02:00
Takashi Iwai
c14b0a08f0 pcm: Fix suspend/resume regression with dmix & co
The recent fix commit [8985742d91: pcm: dmix: Handle slave PCM xrun
and unexpected states properly] caused a regression in dmix and other
plugins regarding suspend/resume.  For example, aplay endlessly prints
"Suspended. Trying resume. Done." message if suspend and resume are
performed in the middle of playback.

The reason is that the commit above changed the shadow PCM state
(dmix->state) to SUSPENDED when the slave PCM is in suspend, while it
doesn't restore the shadow state upon resume.  Thus it appears as if
it's always suspended even after the resume is invoked.

The fix is just to add the proper update of the shadow state in
snd_pcm_direct_resume().

Reported-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-05-11 09:06:47 +02:00
Enric Balletbo i Serra
a192f52fc6 conf/ucm: ROCKCHIP-I2S: add Rockchip I2S UCM config.
Taken from the ChromeOS sources, this configuration was tested on Veyron
Jerry based Chromebook from Google.

[Added missing Makefile changes by tiwai]

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-05-09 14:58:42 +02:00
Jörg Krause
85bf991598 pcm: softvol: fix conversion of TLVs min_db and max_dB value
Both, min_dB and max_dB, are floating type whereas the TLV is (always)
unsigned.

The problem with the conversion of a negative floating-point number into an
unsigned integer is, that the behavior is undefined. This may, depending on
the platform, result in a wrong TLV, i.e. for the default values of min_dB
(-51dB) and max_dB (0dB), alsactl generates the following state on an ARM
cpu build with GCC:

	control.1 {
                iface MIXER
                name Master
                value.0 255
                value.1 255
                comment {
                        access 'read write user'
                        type INTEGER
                        count 2
                        range '0 - 255'
                        tlv '00000001000000080000000000000014'
                        dbmin 0
                        dbmax 5100
                        dbvalue.0 5100
                        dbvalue.1 5100
                }
        }

With the fix applied, alsactl stores the correct TLV:

	control.1 {
                iface MIXER
                name Master
                value.0 255
                value.1 255
                comment {
                        access 'read write user'
                        type INTEGER
                        count 2
                        range '0 - 255'
                        tlv '0000000100000008ffffec1400000014'
                        dbmin -5100
                        dbmax 0
                        dbvalue.0 0
                        dbvalue.1 0
                }
        }

Also tested for different combinations of min_dB and max_dB other than the
default values.

Replaces:
http://mailman.alsa-project.org/pipermail/alsa-devel/2016-May/107733.html

Fixes:
http://mailman.alsa-project.org/pipermail/alsa-devel/2016-May/107628.html

Cc: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-05-09 14:52:04 +02:00
Mengdong Lin
76af5bf833 topology: Update PCM configurations in Broadwell text conf file
To make this conf file a better example, update the name & ID of PCMs
(front-end DAI link) and their cpu DAI (front-end DAI), same as those
defined by Broadwell upstream driver.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-05-09 10:30:40 +02:00
Mengdong Lin
25d6f8e6a8 topology: Parse front-end DAI name and ID for the PCM
These two fields are necessary to create the front-end DAIs
in kernel but the support is missing in text conf previously.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-05-09 10:30:40 +02:00
Mengdong Lin
5d23c406d1 topology: Fix pcm ID & name parsing
The name and ID of SectionPCM should be set to pcm_name and pcm_id,
for a front-end DAI link in the kernel, not for the front-end DAI
of the link.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-05-09 10:30:40 +02:00
Mengdong Lin
0935e32d40 topology: Use generic pointer to realloc buffer for private data
Many element types have private data. So use the generic obj pointer
instead of the type-specific pointer when reallocating the object to
accommodate the private data.

Empty private data will be overlooked.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-05-09 10:30:39 +02:00
Mengdong Lin
86ec8b4900 topology: Refactor functions to parse and build streams
Previously these functions are only used by pcm elements (front-end DAI
& DAI link) to parse stream capablities. Now refactor them to be reused
by back-end DAI elements later.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-05-09 10:30:39 +02:00
Mengdong Lin
e64334df2b topology: Set manifest size for ABI
The topology kernel driver will check the size of manifest struct, and
will stop loading topology info if size mismatch is detected.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-05-09 10:30:38 +02:00
Takashi Iwai
a0acd51d8c Add src/conf/topology/sklrt286/data/pvt_data to .gitignore
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-04-28 16:16:08 +02:00
Shreyas NC
65b271034a conf: topology: Generate Private data binary blobs
The DSP modules need private data and that is provided as binary
blob. These blobs are compiled from C structures which specify module
configuration.

Signed-off-by: Shreyas NC <shreyas.nc@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-04-28 16:15:30 +02:00
Shreyas NC
a8ca6d1c4b Add u8 in type_compat.h
Skylake headers use u8 data types which were not present in
type_compat so add them.

Signed-off-by: Shreyas NC <shreyas.nc@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-04-28 16:14:49 +02:00
Shreyas NC
f5c313eae5 conf: topology: Add Skylake i2s conf
The Skylake topology configuration for simple topology graph is
provided. This exposes the PCM capabilities of the DSP.

Signed-off-by: Shreyas NC <shreyas.nc@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-04-28 16:14:39 +02:00
Takashi Iwai
fdba9e1bad pcm: Fallback open as the first instance for dmix & co
dmix and other PCM plugins tries to open a secondary stream with
O_APPEND flag when the shmem was already attached by another.
However, when another streams have been already closed after the
shmem check, this open may return the error EBADFD, since the kernel
accepts O_APPEND only for the secondary streams.

This patch adds a workaround for such a case.  It just retries opening
the stream as the first instance (i.e. without O_APPEND flag).
This is basically safe behavior (the kernel takes care of races), even
we may do this even unconditionally.  But it's bad from the
performance POV, so we do it only when really needed.

Reported-by: Lars Lindqvist <lars.lindqvist@yandex.ru>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-04-14 17:39:19 +02:00
Hsin-Yu Chao
e57b521c61 ucm: add cset-tlv
This patch enables UCM to set a file in TLV format to kcontrol by:
cset-tlv "name='<kcontrol-name>' <path-to-file>"
This new 'cset-tlv' command will be used to write audio DSP to
specific alsa control, where the driver expectes a file in TLV
format.
The TLV file to set to kcontrol will be checked first by file size
not larger than 16 MB, and then examine if the length field reports
correct number of bytes in the TLV file.

Signed-off-by: Hsin-Yu Chao <hychao@chromium.org>
Reviewed-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-04-13 15:40:17 +02:00
Mengdong Lin
0c5e5c1801 topology: Build data objects with tuples
For data objects with tuples, the parser will bind the vendor tuples
and tokens, copy the tuples to the private buffer of its parent data
object. Then later the builder will export the vendor tuples as private
binary data for the control or widgets objects.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-04-07 16:57:22 +02:00
Mengdong Lin
fdb9a6d19f topology: Add support for parsing vendor tuples
Vendor can define several tuple arrays in 'SectionVendorTuples', as
well as the reference to a vendor token list object.

A later patche will copy vendor tuples in ABI format to the private
buffer of its parent data object in the building phase.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-04-07 16:57:22 +02:00
Mengdong Lin
9b751b38cb topology: Add support for vendor tokens
Vendor can define a token list in SectionVendorTokens. Each token element
is a pair of string ID and integer value. And both the ID and value are
vendor-specific.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-04-07 16:57:22 +02:00
Mengdong Lin
768a006089 topology: ABI - Define types for vendor tuples
Tuples, a pair of token and value, can be used to define vendor specific
data, for controls and widgets. This can avoid importing binary data blob
from other files.

Vendor specific tuple arrays will be embeded in the private data buffer
of a control or widget object. To be backward compatible, union is used
to define the tuple arrays in the existing private data ABI object
'struct snd_soc_tplg_private'.

Vendors need to make sure the token values defined by the topology conf
file match those defined by their driver.

Now supported tuple types are uuid, string, bool, byte, short and word.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-04-07 16:57:21 +02:00
Mengdong Lin
2fd8d388f5 topology: Add doc for vendor tuples
Describe how to define vendor tokens and tuples in the text conf file.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-04-07 16:57:21 +02:00
Mengdong Lin
6b31bf8edb topology: Define a free handler for the element
This handler is defined for type-specific destruction of an element.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-04-07 16:57:21 +02:00
Mengdong Lin
374c5fa9c5 topology: Use the generic pointer to free an element's object
The element is a wrapper for different types of objects.So use the
generic pointer 'obj' instead of the type-specific pointer to free
the object.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-04-07 16:57:21 +02:00
Takashi Iwai
503a285ed6 pcm: Clean up error paths in snd_pcm_plugin_*() helpers
Minor code refactoring to unify the error return paths.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-04-07 16:29:41 +02:00
Shengjiu Wang
7c424edd11 pcm_plugin: fix appl pointer not correct when mmap_commit() return error
When snd_pcm_mmap_commit() return error, the appl pointer is also updated.
which cause the avail_update()'s result wrong.
This patch move the snd_pcm_mmap_appl_forward() to the place when
snd_pcm_mmap_commit() is successfully returned.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-04-07 16:19:01 +02:00
Jaroslav Kysela
6a610e56ae Release v1.1.1
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2016-03-31 15:10:39 +02:00
Liam Girdwood
8372062357 topology: Add support for widget byte controls
Add support for DAPM widgets to include bytes controls.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-03-14 16:57:38 +01:00
Liam Girdwood
f5e0062258 topology: add support for CTL access flags to config file
Allow the config files to define CTL access flags.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-03-14 16:57:05 +01:00
Liam Girdwood
d1784ad804 topology: add support for pasring external ops in conf files
Parsing external ops was missing from the conf files but was in the
C API. Fix this now by making sure we also check for external ops.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-03-14 16:56:44 +01:00
Liam Girdwood
65cb4ffe3c topology: Add ops to bytes control.
Byte controls can also support ops. Add them to the parser.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-03-14 16:56:26 +01:00
Qing Cai
dec428c352 pcm: fix 'unable to create IPC shm instance' caused by fork from a thread
As stated in manpage SHMCTL(2), shm_nattch is "No. of current attaches"
(i.e., number of processes attached to the shared memeory). If an
application uses alsa-lib and invokes fork() from a thread of the
application, there may be the following execution sequence:
 1. execute the following statement:
      pcm_direct.c:110: dmix->shmptr = shmat(dmix->shmid, 0, 0)
    (shm_nattch becomes 1)
 2. invoke fork() in some thread.
    (shm_nattch becomes 2)
 3. execute the following statement:
      pcm_direct.c:122: if (buf.shm_nattch == 1)
 4. execute the following statement:
      pcm_direct.c:131: if (dmix->shmptr->magic != SND_PCM_DIRECT_MAGIC)
    (As stated in manpage SHMGET(2), "When a new shared memory segment
     is created, its contents are initialized to zero values", so
     dmix->shmptr->magic is 0)
 5. execute the following statements:
      pcm_direct.c:132: snd_pcm_direct_shm_discard(dmix)
      pcm_direct.c:133: return -EINVAL
The above execution sequence will cause the following error:
  unable to create IPC shm instance
This error causes multimedia application has no sound. This error rarely
occurs, probability is about 1%.

More notes about this patch:
this patch tries to address the race above by changing the condition
to identify "the first user".  Until now, the first user was
identified by checking shm_nattch.  But this is racy, as stated in the
above.

In this version, we try to assign a shm at first without IPC_CREAT.
If this succeeds, we are not alone, so we must not be the first user.
Only when this fails, try to get a shmem with IPC_CREAT and IPC_EXCL.
If this succeeds, we are the first user.  And, one more notable point
is that the race of this function call itself is protected by
semaphore in the caller side.  The only point to avoid is the race
after shmget() and the first initialization, and this method should
work around that.

Signed-off-by: Qing Cai <bsiice@msn.com>
Signed-off-by: Qing Cai <caiqing@neusoft.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-03-10 15:34:36 +01:00
Martin Koegler
e0e3ce5f71 seq: Provide sequencer sound card number / PID via alsa-lib
rawmidi devices expose the card number via IOCTLs, which allows to
find the corresponding device in sysfs.

The sequencer provides no identifing data. Chromium works around this
issue by scanning rawmidi as well as sequencer devices and matching
them by using assumtions, how the kernel register sequencer devices.

This changes adds support for exposing the card number for kernel clients
as well as the PID for user client.

It supports kernels with and without the required support.

Signed-off-by: Martin Koegler <martin.koegler@chello.at>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-03-08 10:57:18 +01:00
Takashi Iwai
3adfa1b3eb Update include/sound/asequencer.h from 4.6-pre kernel uapi
A few unimplemented ioctl definitions have been removed.  Also
<sound/asound.h> is included locally, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-03-04 10:57:32 +01: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
Thomas Klausner
19fbcb7ce4 topology: Remove unnecessary includes
Headers are already included in local.h.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-03-04 10:57:21 +01:00
Thomas Klausner
52a9649437 Use alphasort where versionsort is not available.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-03-03 16:19:06 +01:00
Thomas Klausner
0e3e574012 Only use F_SETSIG fcntl where it exists.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-03-03 16:19:00 +01:00
Thomas Klausner
31230b2427 Add more compatibility defines.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-03-03 16:18:54 +01:00
Thomas Klausner
e0d52fdd8a Introduce bswap.h for portable definitions of byte swap macros.
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-03-03 16:18:10 +01:00
Thomas Klausner
25e6b5b473 Define some types if missing
Include Linux headers on Linux only.
For portability with non-Linux.

Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-03-03 10:59:52 +01:00