Commit graph

101 commits

Author SHA1 Message Date
Hans de Goede
be91b595f8 conf/ucm: bytcr-rt5651: Add bytcr-rt5651-mono-spk-in2-mic-hp-swapped config
Add a longname profile for devices with a mono speaker, the Internal Mic
hooked up to IN2 and the left and right channels of their headphones
output swapped.

Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2018-08-08 11:44:13 +02:00
Hans de Goede
bd770a44b2 conf/ucm: bytcr-rt5651: Add long-name UCM profiles
After recent kernel work, the kernel now sets a long-name for bytcr-rt5651
boards which indicates if a single (mono) speaker or stereo speakers are
used and if in1, in2, or in1 and 2 are used for the internal mic(s) (the
headset mic sofar is always on in3).

This commit adds UCM profiles for bytcr-rt5651 boards using these new
long-names, based on the generic bytcr-rt5651 profile.

Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2018-08-08 11:44:13 +02:00
Hans de Goede
1bcb531923 conf/ucm: bytcr-rt5651: Use generic SSP enable + disable sequence, support SSP0
Use the generic SSP enable sequence from bytcr/PlatformEnableSeq.conf,
for boards using SSP2 this is identical the code it replaces and this
adds support for boards using SSP0.

This fixes sound not working on Bay Trail CR tablets with a rt5651 codec.

This commit also calls the generic disable sequence on shutdown
(this is new).

Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2018-08-08 11:44:13 +02:00
Hans de Goede
e6754783f7 conf/ucm: chtnau8824: Add Cube iWork8 Air and Pipo W2S specific profiles
The Cube iWork8 Air and Pipo W2S tablets both only have a single speaker.
Add long-name profiles for them which are identical to the default
chtnau8824 profile, except that they include the nau8824/MonoSpeaker.conf
snippet instead of the nau8824/Speaker.conf one.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2018-05-31 17:55:44 +02:00
Hans de Goede
f3b26e3b8d conf/ucm: chtnau8824: Add UCM profile for chtnau8824 boards
Add UCM profile for chtnau8824 boards based on:
https://github.com/plbossart/UCM/blob/master/chtnau8824

Split into multiple files in the same way as this was done for the
bytcr-rt5640 support, re-using the existing ucm/PlatformEnableSeq.conf
and ucm/PlatformDisableSeq.conf files for the SST mixer settings.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2018-05-31 17:55:44 +02:00
Hans de Goede
a5343f6fb6 conf/ucm: bytcr-rt5640: Add long-name UCM profiles
With a recently merged kernel commit, the kernel now sets a long-name for
bytcr-rt5640 boards which indicates if a single (mono) speaker or stereo
speakers are used and wether dmic1, in1 or in3 is used for the internal
mic (the headset mic sofar is always in2).

This commit adds UCM profiles for bytcr-rt5640 boards using these new
long-names, based on the generic bytcr-rt5640 profile.

The added profiles have the unnecessary input / output options from the
generic profile removed leaving only 2 input and 2 output options, which
are automatically switched between by e.g. pulse based on jack-detect.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2018-05-31 17:55:44 +02:00
Hans de Goede
0f6f2a854f conf/ucm: bytcr-rt5640: Add generic bytcr-rt5640 UCM profile
This commit adds the generic UCM profile for bytcr-rt5640 boards from:
https://github.com/plbossart/UCM, plus the fixes from this pull-req:
https://github.com/plbossart/UCM/pull/31

The profile has been split up into separate per input / output files to
allow for creation of long-name profiles with the specific input / output
combinations found on a board without needing to copy and paste things.

Note this profile exports all inputs and both stereo/mono speaker setups
even though a typical device will not use all. Ideally a long-name based
device specific profile made up of the various parts should be used
instead.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2018-05-31 17:55:28 +02:00
Takashi Iwai
44f499bb22 configure: Fix forgotten ucm entry
The previous commit forgot to add to configure.ac.  Fix it.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-03 08:40:20 +02:00
Hans de Goede
5a2df9449d conf/ucm: chtrt5645: At config for the Lenovo Ideapad Miix 320
The Lenovo Ideapad Miix 320 uses a digital mic connected to the DMIC2 input
(unlike the Asus T100HA which has it connected to the DMIC1 input), add a
long-name config specific for the Miix 320, which is a copy of the standard
chtrt5645 config with the internal analog mic section replaced with one
for a digital mic connected to the DMIC2 input.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-02 09:11:36 +02:00
Hans de Goede
c22a7f423d conf/ucm: chtrt5645: At config for the Asus T100HA
The Asus T100HA uses a digital mic rather then an analog one, add
long-name config specific for the T100HA, which is a copy of the standard
chtrt5645 config with the internal analog mic section replaced with one
for the digital mic found on the Asus T100HA.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-02 09:11:00 +02:00
Jaroslav Kysela
17bc74d3a2 configure: remove src/conf/alsa.conf.d/Makefile
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2018-04-10 08:57:07 +02:00
Jaroslav Kysela
1a95a63524 Release v1.1.6
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2018-04-03 09:01:36 +02:00
Jaroslav Kysela
345843fc24 modules: smixer_python - add support for python3
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2018-03-27 14:51:39 +02:00
Hans de Goede
60ed28999a conf/ucm: Add chtrt5645-mono-speaker-analog-mic configuration
Add a configuration for Cherry Trail boards which use a rt5645 codec
connected to a mono speaker and with an analog mic on IN2N + IN2P.

The chtrt5645-mono-speaker-analog-mic/HiFi.conf for this is based on the
latest version from https://github.com/plbossart/UCM/tree/master/chtrt5645
with all the unused input options removed and some changes made to make
the analog mic work.

This commit also adds 2 ucm dirs with the longname of 2 boards known to use
this setup, which simply contain a symlink to the generic
chtrt5645-mono-speaker-analog-mic entry.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-01-09 08:56:27 +01:00
Takashi Iwai
d1e08d2db3 conf/ucm: Add Gigabyte mobo UCM profile with dual HD-audio codecs
Like the previous Lenovo laptops, some Gigabyte mobos have dual
HD-audio codecs and need to switch dynamically via UCM profile.
Reuse the same profile as Lenovo dual codecs, so far.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-12-05 23:33:37 +01:00
Takashi Iwai
b7e56af82a conf/ucm: Add dual HD-audio codecs config for Lenovo
Some recent Lenovo laptops have dual codecs and we need to switch them
accordingly.  The kernel side already contains a fix and gives the
unique longname string for identifying the board, and here we hook up
the corresponding UCM profile.

The profile was corrected and tested by Hui Wang on Lenovo p520.

Tested-by: Kailang <kailang@realtek.com>
Tested-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-12-05 23:33:37 +01:00
Takashi Iwai
91896be6bc conf/ucm: Rearrange Makefile.am
Just rearrange and split to multiple lines to make future patches
cleaner.  No actual code change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-12-05 23:33:37 +01:00
Jaroslav Kysela
32ceab2100 configure.ac: do not enable alisp code by default
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2017-11-27 21:48:20 +01:00
Jaroslav Kysela
fab28ba1b1 configure.ac: build extra mixer modules conditionally
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2017-11-27 21:48:20 +01:00
Jaroslav Kysela
2bacd7042b Release v1.1.5
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2017-11-14 08:52:09 +01:00
Carlo Caione
b22a506511 conf/ucm: rt5651: Add UCM config for bytcr-rt5651
Add a UCM configuration for the rt5651 codec on Intel's Cherry-Trail
platform. Adapted from [0].

[0] https://github.com/plbossart/UCM/tree/master/bytcr-rt5651

Signed-off-by: Carlo Caione <carlo@endlessm.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-10-25 12:03:00 +02:00
Natanael Copa
cb34cee0d8 snd_user_file: avoid use wordexp
As suggested in POSIX[1], wordexp might execute the shell. If the libc
implementation does so, it will break the firefox sandbox which does
not allow exec. This happened on Alpine Linux with musl libc[2].

Since we cannot guarantee that the system wordexp implementation does
not execute shell, we cannot really use it, and need to implement the
~/ expansion ourselves.

We provide a configure option --with-wordexp for users that still may
need it, but we leave this off by default because wordexp is a large
attack vector and it is better to avoid it.

[1]: http://pubs.opengroup.org/onlinepubs/9699919799/functions/wordexp.html#tag_16_684_08
[2]: http://bugs.alpinelinux.org/issues/7454#note-2

Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-07-15 09:57:46 +02:00
Jaroslav Kysela
5bcf449df5 Release v1.1.4.1
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2017-06-01 08:27:36 +02:00
Takashi Iwai
e757a95fc9 conf: Check the availability of PTHREAD_MUTEX_RECURSIVE
Check the availability of PTHREAD_MUTEX_RECURSIVE in configure script
and use it only when possible.  A fairly old version of glibc still
seems working, but just to be sure.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-05-16 16:26:20 +02:00
Jaroslav Kysela
e7bf93f7e9 Release v1.1.4
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2017-05-12 10:01:45 +02:00
Vinod Koul
360c976aaa conf/ucm: broxton: add broxton-rt298 conf files
This adds the UCM conf files for broxton enabling with rt298 codec on
I2S audio, HDMI and DMIC ports.

Signed-off-by: Nishit Sharma <nishitx.sharma@intel.com>
Signed-off-by: G Kranthi <gudishax.kranthikumar@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-01-12 11:21:33 +01:00
Jaroslav Kysela
7e86c8c56f Release v1.1.3
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2016-12-20 15:43:20 +01:00
Vinod Koul
4dfae1adb3 conf/ucm: skylake: add skylake-rt286 conf files
This add the UCM conf files for skylake enabling I2S audio, HDMI and DMIC
ports.

Signed-off-by: Karthik D M <karthik.d.m@intel.com>
Signed-off-by: Nishit Sharma <nishitx.sharma@intel.com>
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>
2016-10-10 11:59:44 +02:00
Shreyas NC
3b08152f68 conf: bxtrt298: Add topology conf file for bxt
Add the conf file for bxt platform as well to define module
private data.

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-08-30 16:34:08 +02:00
Shreyas NC
47116358cc conf: sklrt286: Remove tool to generate private data blobs
Since tuples are used to define driver private data, the private data
blobs are no longer required.

So, remove the source files required to generate the private
data blobs and the private data blobs.

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-08-30 16:33:48 +02:00
Srinivas Kandagatla
daafa45158 ucm: Add ucm files for DB410c board.
DB410c board has support for both Digital and Analog audio. Digital
audio is over HDMI and analog is over codec chip integrated inside the
APQ8016 SOC.

It can support:
 -  3 Microphones: Primary Mic(Handset mic), Headset Mic and Secondary
 - 2 Digital Microphones.
 - Earpiece.
 - Headset.
 - Loud Speaker.
 - HDMI.

[Riku: squashed Srinivas's patches together and converted spaces to tabs]

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Cc: nicolas.dechesne@linaro.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-08-10 12:11:36 +02:00
Jaroslav Kysela
1bf144013c Release v1.1.2
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2016-08-02 19:48:38 +02:00
Takashi Iwai
54931e5a54 pcm: Add thread-safety to PCM API
Traditionally, many of ALSA library functions are supposed to be
thread-unsafe, and applications are required to take care of thread
safety by themselves.  However, people never be careful enough, and
almost all applications fail in this regard.

This patch is an attempt to harden the thread safety in exported PCM
functions in a simplistic way: just wrap some of exported functions
with the pthread mutex of each PCM object.  Not all API functions are
wrapped by the mutex since it doesn't make sense.  Instead, the
patchset covers only the functions that may be likely called
concurrently.  The supposedly thread-safe API functions are marked in
the document.

For achieving the feature, two new fields are added snd_pcm_t when the
option is enabled: thread_safe and lock.  The former indicates that
the plugin is thread-safe that doesn't need this workaround and the
latter is the pthread mutex.  Currently only hw plugin have
thread_safe=1.  So, the most of real-time sensitive apps won't be
influenced by this patchset.

Although the patch covers most of PCM ops, a few snd_pcm_fast_ops are
left without the extra mutex locking: namely, the ones that may have
blocking behavior, i.e. resume, drain, readi, writei, readn and
writen.  These are supposed to handle own locking in the callbacks.

Also, if anyone wants to disable this new thread-safe API feature, it
can be still turned off via --disable-thread-safety configure option.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-07-11 15:25:30 +02:00
Stephen Just
b6c69d7067 conf/ucm: chtrt5645: Add UCM config for chtrt5645
Add a UCM configuration for the rt5645 codec on Intel's Cherry-Trail
platform. Tested on the Microsoft Surface 3.

Signed-off-by: Stephen Just <stephenjust@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-07-08 15:05:48 +02:00
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
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
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
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
Jaroslav Kysela
6a610e56ae Release v1.1.1
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2016-03-31 15:10:39 +02:00
Jaroslav Kysela
fe6b51c77a Release v1.1.0
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2015-11-09 08:39:18 +01:00
Mike Frysinger
561df6fda0 support building w/out System V shared memory
Some systems, like Android/Bionic, do not support SysV at all.
Let the configure script detect if the header is available, and
if not, automatically disable the pieces that require it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-11-05 14:37:11 +01:00
Mike Frysinger
99dc70f023 fix _GNU_SOURCE handling & header inclusion
The configure script blindly adds -D_GNU_SOURCE to all build settings,
even on non-GNU systems.  This isn't too much of a big deal (even if
it uses the wrong variable -- CFLAGS instead of CPPFLAGS), except that
the alsa-lib source itself determines whether to use GNU features when
this is defined (such as versionsort).  So when we build on non-glibc
systems, we get build failures like:
src/ucm/parser.c:1268:18: error: 'versionsort' undeclared (first use in this function)
 #define SORTFUNC versionsort
                  ^
src/ucm/parser.c:1272:54: note: in expansion of macro 'SORTFUNC'
  err = scandir(filename, &namelist, filename_filter, SORTFUNC);
                                                      ^

The correct way to add these flags is to use the autoconf helper
AC_USE_SYSTEM_EXTENSIONS.  Unfortunately, that triggers some more
bugs in the alsa build.  This macro adds defines to config.h and
not directly to CPPFLAGS, so it relies on files correctly including
config.h before anything else.  A number of alsa files do not do
this leading to build failures.  The fix there is to shuffle the
includes around so that the local ones come first.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-10-12 10:36:15 +02:00
Khem Raj
c82417650a build: Do not try to detect cross-compiler
cross compilers are passed via path may not be a gcc based cross
compiler in such cases this check fails and try's to force gcc based
cross compiler detection, This code is a convenience that limits the
build system

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-09-23 10:39:01 +02:00
Liam Girdwood
00a51b5bac conf: topology: Add topology file for broadwell audio DSP
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-30 17:10:32 +02:00
Liam Girdwood
fec1e8f253 topology: autotools: Add build support for topology core
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-30 17:10:14 +02:00
Takashi Iwai
9d649add08 conf/ucm: Add Makefile.am for broadwell-rt286 ucm config
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-05 11:04:47 +01:00
Jaroslav Kysela
16c956e598 Release v1.0.29
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2015-02-26 13:34:52 +01:00
Tomeu Vizoso
3b5fac6d10 conf/ucm: GoogleNyan: Add configuration
Taken from the ChromeOS sources, this configuration should apply to all
Nyan boards from Google, so far HP Chromebook 14 (nyan-blaze) and Acer
Chromebook 13 (nyan-big).

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-19 10:02:46 +01:00
zombah
24b4e86ddc conf/ucm: PAZ00: add Toshiba AC100/Dynabook AZ new config
Recent mainline kernels threat Toshiba AC100 audio hardware as hw:PAZ00
vs old hw:tegraalc5632.

This patch adds config files for new hw name and include them to
makefiles.

Signed-off-by: zombah <zombah@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-07 18:13:27 +02:00
Jaroslav Kysela
c2f8ef7ab0 Release v1.0.28
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2014-06-17 14:34:19 +02:00