Guenter Roeck [Thu, 24 May 2018 19:49:22 +0000 (12:49 -0700)]
ASoC: topology: Move v4 manifest header data structures to uapi
Topology manifest v4 is still part of the ABI. Move its data structures
into the uapi header file.
No functional change.
Signed-off-by: Guenter Roeck <groeck@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Guenter Roeck [Thu, 24 May 2018 19:49:21 +0000 (12:49 -0700)]
ASoC: topology: Improve backwards compatibility with v4 topology files
Commit
dc31e741db49 ("ASoC: topology: ABI - Add the types for BE
DAI") introduced sound topology files version 5. Initially, this
change made the topology code incompatible with v4 topology files.
Backwards compatibility with v4 configuration files was
subsequently added with commit
288b8da7e992 ("ASoC: topology:
Support topology file of ABI v4").
Unfortunately, backwards compatibility was never fully implemented.
First, the manifest size in (Skylake) v4 configuration files is set
to 0, which causes manifest_new_ver() to bail out with error messages
similar to the following.
snd_soc_skl 0000:00:1f.3: ASoC: invalid manifest size
snd_soc_skl 0000:00:1f.3: tplg component load failed-22
snd_soc_skl 0000:00:1f.3: Failed to init topology!
snd_soc_skl 0000:00:1f.3: ASoC: failed to probe component -22
skl_n88l25_m98357a skl_n88l25_m98357a: ASoC: failed to instantiate card -22
skl_n88l25_m98357a: probe of skl_n88l25_m98357a failed with error -22
After this problem is fixed, the following error message is seen instead.
snd_soc_skl 0000:00:1f.3: ASoC: old version of manifest
snd_soc_skl 0000:00:1f.3: Invalid descriptor token
1093938482
snd_soc_skl 0000:00:1f.3: ASoC: failed to load widget media0_in cpr 0
snd_soc_skl 0000:00:1f.3: tPlg component load failed-22
This message is seen because backwards compatibility for loading widgets
was never implemented.
The lack of audio support when running the upstream kernel on recent
Chromebooks has been reported in various forums, and can be traced back
to this problem. Attempts to fix the problem, usually by providing v5
configuration files, were only partially successful.
Let's implement backward compatibility properly to solve the problem
for good.
Signed-off-by: Guenter Roeck <groeck@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Steven Eckhoff [Thu, 31 May 2018 20:24:07 +0000 (15:24 -0500)]
ASoC: TSCS454: Add Support
Currently there is no support for Tempo Semiconductor's TSCS454 CODEC.
Add support for it.
Signed-off-by: Steven Eckhoff <steven.eckhoff.opensource@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Mac Chiang [Thu, 31 May 2018 17:18:32 +0000 (01:18 +0800)]
ASoC: Intel: kbl: Move codec sysclk config to codec_init function
On APL, commit
fd0f237572ad
("ASoC: Intel: bxt: Move codec sysclk config to codec_init function")
fixed an issue related to jack detection.
The MCLK for DA7219 does not change in this platform, but is
currently being configured everytime as part of the platform_clock
event handler for DAPM. The upshot of this is that we have
unnecessary calls to this function, and it also means that if
a stream hasn't yet been started, DA7219 driver does not have the
correct MCLK rates programmed and so the HP detection feature does
not operate as expected.
The same fix is needed on KBL.
This patch rectifies this issue by moving the sysclk call to
codec_init function so it's only called once at initialisation.
Signed-off-by: Mac Chiang <mac.chiang@intel.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Daniel Mack [Wed, 30 May 2018 19:45:56 +0000 (21:45 +0200)]
ASoC: simple-card: set cpu dai clk in hw_params
The simple-card driver currently accepts a clock node in the cpu dai
sub-node and only uses it as an alternative to the
'system-clock-frequency' property to get the current frequency.
This patch adds another use of the passed clock node. If mclk-fs is
specified, the clocks in cpu and codec dai sub-nodes will be set to
the calculated rate (stream rate * mclk_fs) in hw_params.
This allows platforms to pass tuneable clocks as phandle that will
automatically be set to the right rates.
Signed-off-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Xie Yisheng [Thu, 31 May 2018 11:11:23 +0000 (19:11 +0800)]
ASoC: dapm: use match_string() helper
match_string() returns the index of an array for a matching string,
which can be used instead of open coded variant.
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>
Cc: alsa-devel@alsa-project.org
Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Xie Yisheng [Thu, 31 May 2018 11:11:22 +0000 (19:11 +0800)]
ASoC: max98095: use match_string() helper
match_string() returns the index of an array for a matching string,
which can be used instead of open coded variant.
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>
Cc: alsa-devel@alsa-project.org
Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Xie Yisheng [Thu, 31 May 2018 11:11:21 +0000 (19:11 +0800)]
ASoC: max98088: use match_string() helper
match_string() returns the index of an array for a matching string,
which can be used instead of open coded variant.
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>
Cc: alsa-devel@alsa-project.org
Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Hans de Goede [Fri, 18 May 2018 19:35:06 +0000 (21:35 +0200)]
ASoC: Intel: bytcr_rt5651: Set card long_name based on quirks
Many X86 devices using a BYT SoC + RT5651 codec are cheap devices with
generic DMI strings, causing snd_soc_set_dmi_name() to fail to set a
long_name, making it impossible for userspace to have a correct UCM
profile which knowns which input is connected to the internal mic,
which input is connected to the hsmic (for correct jack-based switching)
and which inputs are unused.
Our quirks already specify which inputs the internal and headset mic
are connected to.
This commit sets a long_name based on the quirks so that userspace can
have UCM profiles doing the right thing based on the long_name.
Note that if we ever encounter the need for a special UCM profile for
some device we can add a quirk to set a specific long_name for the
device,
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Kai Chieh Chuang [Thu, 31 May 2018 01:26:21 +0000 (09:26 +0800)]
ASoC: mt6797-mt6351: add hostless phone call path
Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Kai Chieh Chuang [Thu, 31 May 2018 01:26:20 +0000 (09:26 +0800)]
ASoC: mt6797: add Hostless DAI
add path for hosltess lpbk from ADDA Capture to ADDA Playback
add path for hostless phone call between ADDA DAI and PCM DAI
Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Kai Chieh Chuang [Thu, 31 May 2018 01:26:19 +0000 (09:26 +0800)]
ASoC: mt6797: add PCM interface
Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Arnd Bergmann [Wed, 30 May 2018 22:00:35 +0000 (00:00 +0200)]
ASoC: mediatek: export mtk-afe symbols as needed
The new mt6797-afe driver uses some functions in a common file, which
works for a built-in driver but fails for a loadable module:
ERROR: "mtk_afe_pcm_free" [sound/soc/mediatek/mt6797/snd-soc-mt6797-afe.ko] undefined!
ERROR: "mtk_afe_add_sub_dai_control" [sound/soc/mediatek/mt6797/snd-soc-mt6797-afe.ko] undefined!
ERROR: "mtk_afe_pcm_new" [sound/soc/mediatek/mt6797/snd-soc-mt6797-afe.ko] undefined!
ERROR: "mtk_afe_combine_sub_dai" [sound/soc/mediatek/mt6797/snd-soc-mt6797-afe.ko] undefined!
ERROR: "mtk_afe_pcm_ops" [sound/soc/mediatek/mt6797/snd-soc-mt6797-afe.ko] undefined!
This exports the five symbols above for modules.
Fixes: b3c702f56bf5 ("ASoC: mt6797: combine DAI to register component")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Arnd Bergmann [Wed, 30 May 2018 21:53:45 +0000 (23:53 +0200)]
ASoC: codecs: PCM1789: include gpio/consumer.h
When CONFIG_GPIOLIB is disabled, this codec fails to build
because gpio/consumer.h is not included implicitly.
sound/soc/codecs/pcm1789.c: In function 'pcm1789_common_init':
sound/soc/codecs/pcm1789.c:247:19: error: implicit declaration of function 'devm_gpiod_get_optional'; did you mean 'devm_gpio_request_one'? [-Werror=implicit-function-declaration]
pcm1789->reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH);
^~~~~~~~~~~~~~~~~~~~~~~
Fixes: 4ae340d1be36 ("ASoC: codecs: Add support for PCM1789")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Jon Hunter [Wed, 30 May 2018 15:15:19 +0000 (16:15 +0100)]
ASoC: core: Fix return code shown on error for hw_params
When the call to hw_params for a component fails, the error code is held
by the variable '__ret' but the error message displays the value held by
the variable 'ret'. Fix the return code shown when hw_params fails for
a component.
Fixes: b8135864d4d3 ("ASoC: snd_soc_component_driver has snd_pcm_ops")
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Philipp Zabel [Wed, 23 May 2018 09:43:00 +0000 (11:43 +0200)]
ASoC: imx-audmux: add RXFS/RXCLK defines for 6-wire connections
In asynchronous mode, a RxFS and RxClk connection needs to be made between
two ports. Add a define for the bit to be set in the *SEL fields.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
[m.felsch@pengutronix.de: fixed comment to include i.MX21 and 35]
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Tue, 29 May 2018 23:30:02 +0000 (18:30 -0500)]
ASoC: fix 0-day warnings with snd_soc_new_compress()
All conditionally-defined routines in include/sound/soc.h expose a
static inline fallback to avoid 0-day warnings and compilation issues,
except snd_soc_new_compress().
Fixes: 5db6aab6f36f ('ASoC: topology: Add support for compressed PCMs')
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cyrille Pitchen [Fri, 25 May 2018 12:34:26 +0000 (15:34 +0300)]
ASoC: atmel-i2s: add driver for the new Atmel I2S controller
This patch adds support for the Atmel I2S controller embedded into
sama5d2x SoCs.
Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com>
Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cyrille Pitchen [Fri, 25 May 2018 12:34:25 +0000 (15:34 +0300)]
ASoC: atmel-i2s: dt-bindings: add DT bindings for I2S controller
This patch adds DT bindings for the new Atmel I2S controller embedded
inside sama5d2x SoCs.
Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com>
Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla [Tue, 29 May 2018 10:18:33 +0000 (11:18 +0100)]
ASoC: qdsp6: q6routing: Add support to all TDM Mixers
This patch adds TX and RX TDM mixers for 40 TDM ports.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla [Tue, 29 May 2018 10:18:32 +0000 (11:18 +0100)]
ASoC: qdsp6: q6routing: Add macros for mixers
All the mixer controls are pretty much same from all the afe ports.
Make these as proper macros for 2 reasons.
1> To avoid any typos in adding new mixer controls for each port.
2> Easy to edit from single place, easy to add new ports
This also prepares the routing driver to accomdate 40 tdm dais.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla [Tue, 29 May 2018 10:18:31 +0000 (11:18 +0100)]
ASoC: qdsp6: q6afe-dai: add support to tdm dais
This patch adds support to 40 TDM ports supported in AFE.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla [Tue, 29 May 2018 10:18:30 +0000 (11:18 +0100)]
ASoC: qdsp6: q6afe-dai: use q6afe_dai_prepare() for MI2S
Use common q6afe_dai_prepare() for MI2S dais, this will remove
some code duplication. Also make the if statement to switch to
make the code look neater.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla [Tue, 29 May 2018 10:18:29 +0000 (11:18 +0100)]
ASoC: qdsp6: qdafe: add support to tdm ports
This patch adds support to tdm ports in AFE.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla [Tue, 29 May 2018 10:18:28 +0000 (11:18 +0100)]
ASoC: qdsp6: dt-bindings: Add q6afe tdm dt binding
This patch adds bindings required for TDM ports on AFE.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Kai Chieh Chuang [Mon, 28 May 2018 02:18:19 +0000 (10:18 +0800)]
ASoC: dpcm: symmetry constraint on FE substream
We should set BE symmetric constraint on FE substream.
in case one BE is used by two FE1/FE2,
the first BE runtime will use FE1's substream->runtime.
hence the FE1's will be constrained by BE symmetry property.
Though, second FE2 call dpcm_apply_symmetry,
the be_substream->runtime == FE1's substream->runtime.
The FE2's substream->runtime will not be constrained
by BE's symmetry property.
Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Kai Chieh Chuang [Mon, 28 May 2018 02:18:18 +0000 (10:18 +0800)]
ASoC: dpcm: fix BE dai not hw_free and shutdown
In case, one BE is used by two FE1/FE2
FE1--->BE-->
|
FE2----]
when FE1/FE2 call dpcm_be_dai_hw_free() together
the BE users will be 2 (> 1), hence cannot be hw_free
the be state will leave at, ex. SND_SOC_DPCM_STATE_STOP
later FE1/FE2 call dpcm_be_dai_shutdown(),
will be skip due to wrong state.
leaving the BE not being hw_free and shutdown.
The BE dai will be hw_free later when calling
dpcm_be_dai_shutdown() if still in invalid state.
Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Agrawal, Akshu [Mon, 28 May 2018 03:48:22 +0000 (11:48 +0800)]
ASoC: AMD: make channel 1 dma as circular
channel 1: SYSMEM<->ACP
channel 2: ACP<->I2S
Instead of waiting on period interrupt of ch 2 and then starting
dma on ch1, we make ch1 dma as circular.
This removes dependency of period granularity on hw pointer.
Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Hans de Goede [Mon, 28 May 2018 20:26:49 +0000 (22:26 +0200)]
ASoC: Intel: bytcr_rt5640: Add quirk for the ARCHOS 80 Cesium 8" windows tablet
Add a quirk for the ARCHOS 80 Cesium 8" windows tablet, this device mostly
works with the default settings, except that it has only one speaker.
So add a quirk with the default settings + the mono-speaker flag.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
KaiChieh Chuang [Fri, 25 May 2018 03:48:18 +0000 (11:48 +0800)]
ASoC: mt6797: combine DAI to register component
Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
KaiChieh Chuang [Fri, 25 May 2018 03:48:17 +0000 (11:48 +0800)]
ASoC: mt6797: extract DAI adda in separate file
Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
KaiChieh Chuang [Fri, 25 May 2018 03:48:16 +0000 (11:48 +0800)]
ASoC: mediatek: add sub dai to mtk_base_afe
In MediaTek SoC chip we have multiple DAI,
such as I2S, ADDA, PCM, etc.
Organize each DAI in to one sub dai,
with its dai driver, controls, widgets, routes.
add mtk_afe_combine_sub_dai() to combine
dai driver from each DAI.
add mtk_afe_add_sub_dai_control() to register
the control, widget, routes to component.
Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Arnd Bergmann [Fri, 25 May 2018 16:02:32 +0000 (18:02 +0200)]
ASoC: omap: fix compile-test building
The newly introduced driver causes a harmless Kconfig warning when
compile-testing random configurations:
WARNING: unmet direct dependencies detected for SND_SDMA_SOC
Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && DMA_OMAP [=n]
Selected by [y]:
- SND_OMAP_SOC [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && (ARCH_OMAP [=y] && DMA_OMAP [=n] || ARM [=y] && COMPILE_TEST [=y])
By simply allow build testing without DMA_OMAP, we can shut up that warning.
Fixes: dde637f2daf1 ("ASoC: omap: Introduce the generic_dmaengine_pcm based sdma-pcm")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Hans de Goede [Mon, 21 May 2018 12:42:51 +0000 (14:42 +0200)]
ASoC: Intel: cht_bsw_nau8824: Fix jack_type to include SND_JACK_MICROPHONE
The nau8824 codec can detect whether a headset or plain headphones is
inserted (as well as button presses on the headset) as such the jack_type
passed to snd_soc_card_jack_new() should include SND_JACK_MICROPHONE.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Lin Huang [Tue, 22 May 2018 08:53:42 +0000 (16:53 +0800)]
ASoC: rockchip: cdn-dp sound output use spdif
some monitors care about the parity bit in the sub-frame of I2S,
but the cdn-dp always set this bit to "1", so these monitors
do not have sound output if use i2s, use spdif can fix this issue.
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Signed-off-by: Lin Huang <hl@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Fabio Estevam [Sun, 20 May 2018 15:22:48 +0000 (12:22 -0300)]
ASoC: codec: realtek: Make the node name generic
"The name of a node should be somewhat generic, reflecting the function
of the device and not its precise programming model."
Do as suggested in the bindings examples.
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Fabio Estevam [Sun, 20 May 2018 12:53:41 +0000 (09:53 -0300)]
ASoC: codec: wolfson: Make the node name generic
According to Devicetree Specification v0.2 document:
"The name of a node should be somewhat generic, reflecting the function
of the device and not its precise programming model."
Do as suggested in the bindings examples.
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Daniel Mack [Mon, 21 May 2018 21:54:50 +0000 (23:54 +0200)]
ASoC: make wm8782 codec selectable in Kconfig
FOr platforms that use the simple-card driver, the codec cannot be selected
through 'select' magic in Kconfig. So turn this into a real config option.
Signed-off-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Daniel Mack [Mon, 21 May 2018 21:54:49 +0000 (23:54 +0200)]
ASoC: wm8782: add device-tree matching table
This is needed when the codec is instanciated from from a device tree.
Signed-off-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Daniel Mack [Mon, 21 May 2018 21:50:17 +0000 (23:50 +0200)]
ASoC: pxa-ssp: simplify pxa_ssp_set_dai_sysclk()
There's no need to read the register again prior to writing it, we did
that in the beginning of the function.
Signed-off-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Daniel Mack [Mon, 21 May 2018 21:50:16 +0000 (23:50 +0200)]
ASoC: pxa-ssp: allow more flexible setup order
The pxa-ssp driver currently assumes that .set_fmt() is called before
.set_clkdiv(), .set_pll() etc.
Commit
a8bd0ee558714 ("ASoC: raumfeld: Use static DAI format setup") broke
support for Raumfeld hardware (and possible other PXA based ones) because
it effectively changed the order of these calls. Also, as the call to
.set_fmt() is now done at probe time, the port clock is not yet enabled.
To fix this, strip all hardware register access code from the .set_fmt()
callback and memorize the desired value, so we can use it from the
.hw_params() callback. Also make the .set_fmt() callback less destructive
by reading all registers that it writes to in the beginning and only
masking out the bits that it possibly fiddles with.
Signed-off-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla [Fri, 18 May 2018 12:56:10 +0000 (13:56 +0100)]
ASoC: qcom: apq8096: Add db820c machine driver
This patch adds support to DB820c machine driver.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla [Fri, 18 May 2018 12:56:09 +0000 (13:56 +0100)]
ASoC: qdsp6: dt-bindings: Add apq8096 machine bindings
Add devicetree bindings documentation file for Qualcomm apq8096 sound card.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla [Fri, 18 May 2018 12:56:08 +0000 (13:56 +0100)]
ASoC: qdsp6: q6asm: Add q6asm dai driver
This patch adds support to q6asm dai driver which configures Q6ASM streams
to pass pcm data.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-and-tested-by: Rohit kumar <rohitkr@codeaurora.org>
Reviewed-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla [Fri, 18 May 2018 12:56:07 +0000 (13:56 +0100)]
ASoC: qdsp6: q6afe: Add q6afe dai driver
This patch adds support to q6afe backend dais driver.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-and-tested-by: Rohit kumar <rohitkr@codeaurora.org>
Reviewed-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla [Fri, 18 May 2018 12:56:06 +0000 (13:56 +0100)]
ASoC: qdsp6: q6routing: Add support to MI2S Mixers
This patch add support to MI2S mixers required to select path between
ASM stream and AFE ports.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-and-tested-by: Rohit kumar <rohitkr@codeaurora.org>
Reviewed-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla [Fri, 18 May 2018 12:56:05 +0000 (13:56 +0100)]
ASoC: qdsp6: q6routing: Add support to all SLIMBus Mixers
This patch adds support to SLIMBus related mixers to control mux between
ASM stream and AFE port.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-and-tested-by: Rohit kumar <rohitkr@codeaurora.org>
Reviewed-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla [Fri, 18 May 2018 12:56:04 +0000 (13:56 +0100)]
ASoC: qdsp6: q6routing: Add q6routing driver
This patch adds support to q6 routing driver which configures route
between ASM and AFE module using ADM apis.
This driver uses dapm widgets to setup the matrix between AFE ports and
ASM streams.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-and-tested-by: Rohit kumar <rohitkr@codeaurora.org>
Reviewed-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla [Fri, 18 May 2018 12:56:03 +0000 (13:56 +0100)]
ASoC: qdsp6: q6asm: Add support to audio stream apis
This patch adds support to open, write and media format commands
in the q6asm module.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-and-tested-by: Rohit kumar <rohitkr@codeaurora.org>
Reviewed-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla [Fri, 18 May 2018 12:56:02 +0000 (13:56 +0100)]
ASoC: qdsp6: q6asm: Add support to memory map and unmap
This patch adds support to memory map and unmap regions commands in
q6asm module.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-and-tested-by: Rohit kumar <rohitkr@codeaurora.org>
Reviewed-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla [Fri, 18 May 2018 12:56:01 +0000 (13:56 +0100)]
ASoC: qdsp6: q6asm: Add q6asm driver
This patch adds basic support to Q6 ASM (Audio Stream Manager) module on
Q6DSP. ASM supports up to 8 concurrent streams. each stream can be setup
as playback/capture. ASM provides top control functions like
Pause/flush/resume for playback and record. ASM can Create/destroy encoder,
decoder and also provides POPP dynamic services.
This patch adds support to basic features to allow hdmi playback.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-and-tested-by: Rohit kumar <rohitkr@codeaurora.org>
Reviewed-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla [Fri, 18 May 2018 12:56:00 +0000 (13:56 +0100)]
ASoC: qdsp6: q6adm: Add q6adm driver
This patch adds support to Q6ADM (Audio Device Manager) module in
q6dsp. ADM performs routing between audio streams and AFE ports.
It does Rate matching for streams going to devices driven by
different clocks, it handles volume ramping, Mixing with channel
and bit-width. ADM creates and destroys dynamic COPP services
for device-related audio processing as needed.
This patch adds basic support to ADM.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-and-tested-by: Rohit kumar <rohitkr@codeaurora.org>
Reviewed-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Mukunda, Vijendar [Tue, 8 May 2018 04:47:53 +0000 (10:17 +0530)]
ASoC: amd: dma driver changes for bt i2s instance
With in ACP, There are three I2S controllers can be
configured/enabled ( I2S SP, I2S MICSP, I2S BT).
Default enabled I2S controller instance is I2S SP.
This patch provides required changes to support I2S BT
controller Instance.
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Akshu Agrawal [Tue, 8 May 2018 04:47:52 +0000 (10:17 +0530)]
ASoC: AMD: Add const to snd_soc_ops instances
Marking snd_soc_ops instances const
Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com>
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Akshu Agrawal [Tue, 8 May 2018 04:47:51 +0000 (10:17 +0530)]
ASoC: AMD: Fix clocks in CZ DA7219 machine driver
System clock on the platform is 25Mhz and not 24Mhz.
PLL_OUT for da7219 codec to use DA7219_PLL_FREQ_OUT_98304
as it is for 48KHz SR.
Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com>
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Akshu Agrawal [Tue, 8 May 2018 04:47:50 +0000 (10:17 +0530)]
ASoC: AMD: Move clk enable from hw_params/free to startup/shutdown
hw_param can be called multiple times and thus we can have
more clk enable. The clk may not get diabled due to refcounting.
startup/shutdown ensures single clk enable/disable call.
Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com>
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Mukunda, Vijendar [Tue, 8 May 2018 04:47:49 +0000 (10:17 +0530)]
ASoC: amd: memory release for rtd structure
rtd structure freed early may result in kernel panic in dma close
call back. moved releasing memory for rtd structure to the end of
dma close callback.
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Mukunda, Vijendar [Tue, 8 May 2018 04:47:48 +0000 (10:17 +0530)]
ASoC: amd: sram bank update changes
Added sram bank variable to audio_substream_data structure.
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Mukunda, Vijendar [Tue, 8 May 2018 04:47:47 +0000 (10:17 +0530)]
ASoC: amd: pte offset related dma driver changes
Added pte offset variable in audio_substream_data structure.
Added Stoney related PTE offset macros in acp header file.
Modified hw_params callback to assign the pte offset value
based on asic_type.
PTE Offset macros used to calculate no of PTE entries
need to be programmed when memory allocated for audio buffer.
Depending upon allocated audio buffer size, PTE offset values
will change.
Compared to CZ, Stoney has SRAM memory limitation i.e 48k
It is required to define separate PTE Offset macros for
Stoney.
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla [Fri, 18 May 2018 12:55:59 +0000 (13:55 +0100)]
ASoC: qdsp6: q6afe: Add support to MI2S sysclks
This patch adds support to LPASS Bit clock, LPASS Digital
core clock and OSR clock. These clocks are required for both
MI2S and PCM setup.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-and-tested-by: Rohit kumar <rohitkr@codeaurora.org>
Reviewed-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla [Fri, 18 May 2018 12:55:58 +0000 (13:55 +0100)]
ASoC: qdsp6: q6afe: Add support to MI2S ports
This patch adds support to 4 MI2S ports on LPASS.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-and-tested-by: Rohit kumar <rohitkr@codeaurora.org>
Reviewed-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla [Fri, 18 May 2018 12:55:57 +0000 (13:55 +0100)]
ASoC: qdsp6: qdafe: Add SLIMBus port Support
This patch adds support to 6 SLIMBus AFE ports, which are used as
backend dais.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-and-tested-by: Rohit kumar <rohitkr@codeaurora.org>
Reviewed-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla [Fri, 18 May 2018 12:55:56 +0000 (13:55 +0100)]
ASoC: qdsp6: q6afe: Add q6afe driver
This patch adds support to Q6AFE (Audio Front End) module on Q6DSP.
AFE module sits right at the other end of cpu where the codec/audio
devices are connected.
AFE provides abstraced interfaces to both hardware and virtual devices.
Each AFE tx/rx port can be configured to connect to one of the hardware
devices like codec, hdmi, slimbus, i2s and so on. AFE services include
starting, stopping, and if needed, any configurations of the ports.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-and-tested-by: Rohit kumar <rohitkr@codeaurora.org>
Reviewed-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Daniel Mack [Sat, 19 May 2018 06:01:19 +0000 (08:01 +0200)]
ASoC: core: fix return code in error message
Log the correct error code in case the .open() call to a component fails.
Signed-off-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Fabio Estevam [Sun, 20 May 2018 01:12:52 +0000 (22:12 -0300)]
ASoC: fsl: Mark 'big-endian' property as optional
Currently the 'big-endian' property is listed as required, which is
not correct. i.MX SoCs do not need such property, so move it under
'Optional properties' entry instead.
Also, fsl-sai.txt incorrectly referenced 'FTM_PWM registers', so
change it to 'SAI registers', which is the intended description.
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Colin Ian King [Mon, 21 May 2018 09:35:48 +0000 (10:35 +0100)]
ASoC: intel: skylake: fix spelling mistake: "Homogenous" -> "Homogeneous"
Trivial fix to spelling mistake in snprintf literal string
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Thu, 17 May 2018 22:53:26 +0000 (17:53 -0500)]
ASoC: pcm512x: Add ACPI support
HID is assumed to be made of TI PCI ID (0x104C) + part number, so all
four
104C5121,
104C5122,
104C5141 104C5142 are valid.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Andy Shevchenko [Fri, 18 May 2018 15:41:51 +0000 (18:41 +0300)]
ASoC: rt5677: Convert I2C driver to ->probe_new()
There is no platform code that uses i2c module table.
Remove it altogether and adjust ->probe() to be ->probe_new().
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Marco Felsch [Fri, 18 May 2018 09:55:06 +0000 (11:55 +0200)]
ASoC: ssm2305: fix header layout
Make C-header and SPDX-License-Identifier header uniform.
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Colin Ian King [Fri, 18 May 2018 09:13:27 +0000 (10:13 +0100)]
ASoC: wm2200,wm5100: fix spelling mistake: "Coefficeints" -> "Coefficients"
Trivial fix to spelling mistakes in SND_SOC_BYTES literal strings
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Colin Ian King [Fri, 18 May 2018 09:04:07 +0000 (10:04 +0100)]
ASoC: wm8904: fix spelling mistake: "Caputure" -> "Capture"
Trivial fix to spelling mistake in SOC_ENUM literal string
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla [Thu, 17 May 2018 16:03:53 +0000 (17:03 +0100)]
soc: qcom: apr: fix invalid msg_type check
Removed invalid msg_type check.
This also fixes below static checker warning:
apr.c:95:35: warning: comparison is always true due to limited range of
data type [-Wtype-limits]
warn: always true condition '(msg_type != 69864) => (0-u16max != 69864)'
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Bard Liao [Thu, 17 May 2018 05:54:08 +0000 (13:54 +0800)]
ASoC: rt5670: improve PLL function's stability
Set PR-38 register to 0x1fe1 will make PLL function more stable.
Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Marco Felsch [Thu, 17 May 2018 13:55:18 +0000 (15:55 +0200)]
ASoC: ssm2305: Add amplifier driver
The ssm2305 is a simple Class-D audio amplifier. A application can
turn on/off the device by a gpio. It's also possible to hardwire the
shutdown pin.
Tested on a i.MX6 based custom board.
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla [Wed, 9 May 2018 12:56:19 +0000 (13:56 +0100)]
ASoC: qdsp6: q6core: Add q6core driver
This patch adds support to core apr service, which is used to query
status of other static and dynamic services on the dsp.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-and-tested-by: Rohit kumar <rohitkr@codeaurora.org>
Acked-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Pravin Shedge [Sun, 10 Dec 2017 18:32:03 +0000 (00:02 +0530)]
ASoC: zte: remove duplicate includes
These duplicate includes have been found with scripts/checkincludes.pl but
they have been removed manually to avoid removing false positives.
Signed-off-by: Pravin Shedge <pravin.shedge4linux@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Vishal Thanki [Fri, 11 May 2018 12:33:37 +0000 (14:33 +0200)]
ASoC: davinci-mcasp: Only disable inactive serializer
As a side effect of the following commit, the active TX
serializer may get disabled which may result in distorted
audio output.
ASoC: davinci-mcasp: Add support for multichannel playback
(
2952b27e2e463b28d5c0f04000f96b968137ca42)
For example, if a 4 channel I2S playback with two TX serializers
is activated. Later on, if a recording of 2 channels, with only 1 RX
serializer is started, which will also disable one of the TX
serializer because max_active_serializers is only calculated for
RX (recording) stream. This patch fixes this issue.
Signed-off-by: Vishal Thanki <vishalthanki@gmail.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Hans de Goede [Sun, 13 May 2018 07:24:35 +0000 (09:24 +0200)]
ASoC: Intel: bytcr_rt5640: Set card long_name based on quirks
Many X86 devices using a BYT SoC + RT5640 codec are cheap devices with
generic DMI strings, causing snd_soc_set_dmi_name() to fail to set a
long_name, making it impossible for userspace to have a correct UCM
profile which only uses inputs / outputs which are actually hooked up
on the device.
Our quirks already specify which input the internal mic is connected to
and if a single (mono) speaker is used or if the device has stereo
speakers.
This commit sets a long_name based on the quirks so that userspace can
have UCM profiles doing the right thing based on the long_name.
Note that if we ever encounter the need for a special UCM profile for
some device we can add a quirk to set a specific long_name for the
device,
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Hans de Goede [Sun, 13 May 2018 07:24:34 +0000 (09:24 +0200)]
ASoC: Intel: bytcr_rt5640: Add quirks for various devices
Even with our recently tweaked defaults, quite a few bytcr_rt5640 devices
still need quirks to be fully functional. This commits adds quirks where
necessary for the 16 bytcr_rt5640 devices I have access to.
The quirks are added for the following reasons:
1) Devices with only one speaker need the mono quirk to avoid driving an
unused and potentially short-circuited output. 8 of my sample of 16 devs
are mono, 4 of these would work with the defaults if it were not for their
mono speaker.
2) Devices using a different input for the internal mic then the default,
this is the case for 6 of my sample of 16 devices.
3) BYTCR devices without an ACPI channel map, which do not work with the
default of SSP0-AIF2, this is the case for 2 of my sample of 16 devices.
4) Devices which need non-default jack-detect settings, this is the case
for 6 of my sample of 16 devices.
This commit add quirks for the following devices:
Acer Iconia Tab 8 W1-810
Chuwi Vi8
HP Pavilion X2 10-n000nd
HP Stream 7
I.T. Works TW891
Lamina I8270
MSI S100
Pipo W4
PoV-mobii-800w (v2.0)
PoV-mobii-800w (v2.1)
Toshiba Click Mini L9W-B
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Hans de Goede [Sun, 13 May 2018 07:24:33 +0000 (09:24 +0200)]
ASoC: Intel: bytcr_rt5640: Use dmi_first_match() for DMI quirk handling
Use dmi_first_match() instead of dmi_check_system() + callbacks, this
avoid the need to initialize dmi_system_id.callback for each
byt_rt5640_quirk_table entry.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Hans de Goede [Sun, 13 May 2018 07:24:32 +0000 (09:24 +0200)]
ASoC: Intel: bytcr_rt5640: Sort DMI quirk list alphabetically
As we add more quirks it is useful to have some sort of order in the
quirk list, sort it alphabetically.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Hans de Goede [Sun, 13 May 2018 07:24:31 +0000 (09:24 +0200)]
ASoC: Intel: bytcr_rt5640: Add default jack-detect settings
Out of the 11 BYTCR devices which I have access to for testing, 6 use
JD1IN4P for jack-detect, 2 use JD1IN4P non-inverted and the other 3 use
JD2IN4N, the ones not using JD1IN4P are all also special in other ways and
need a DMI quirk regardless.
All 5 BYT (non CR) devices which I have access to use JD2IN4N.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Hans de Goede [Sun, 13 May 2018 07:24:30 +0000 (09:24 +0200)]
ASoC: Intel: bytcr_rt5640: Unify BYTCR input defaults
Currently we've 2 places with BYTCR defaults: 1. The generic catch-all
DMI_SYS_VENDOR=="Insyde" DMI quirk which selects SSP0-AIF1 for generic
Insyde BYTCR tablets without the ACPI channel package; and 2. the
defaults in the if (is_bytcr) {} code block.
Currently these are not identical, both select IN3 as the internal mic
output, but the "Insyde" DMI quirk leaves out the DIFF_MIC quirk. The
DIFF_MIC quirk should be enabled by default, because enabling diff. input
helps a lot for devices with a differential mic, where as it is a nop on
devices with a normal mic.
This commit adds the DIFF_MIC quirk to the "Insyde" DMI quirk path, by
adding a new BYTCR_INPUT_DEFAULTS define and using that in both code paths
which set BYTCR defaults.
Having a single place where the BYTCR input defaults are defined also
allows defining jack-detect defaults in a single place in a follow-up
commit.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Hans de Goede [Sun, 13 May 2018 07:24:29 +0000 (09:24 +0200)]
ASoC: Intel: bytcr_rt5640: Change BYTCR default input to IN3
Out of the 11 BYTCR devices which I have access to for testing,
7 use IN3 for the internal mic and only 1 uses IN1 for the internal mic,
the other 3 use DMIC1.
So IN3 clearly is a better default, using IN3 as default avoids the need
to add DMI quirks for some of these devices.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Hans de Goede [Sun, 13 May 2018 07:24:28 +0000 (09:24 +0200)]
ASoC: Intel: bytcr_rt5640: Enable jack detection
Add code to support setting jack-detect parameters through quirks and
extend the existing DMI quirk table entries for the Asus T100TA and the
Dell Venue 8 Pro 5830 to enable jack detection.
Tested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Hans de Goede [Sun, 13 May 2018 07:24:27 +0000 (09:24 +0200)]
ASoC: Intel: bytcr_rt5640: Fix Dell Venue 8 5830 Pro quirk
This fixes the following 3 issues:
1) The sys_vendor match should be for "Dell Inc." not "DellInc.",
without this fixed the quirk never gets applied
2) DMIC1 is used not DMIC2, this was not a problem sofar because for
regular BYT boards (rather then BYTCR) we default to DMIC1 and because
of 1. the quirk was not being applied
3) The Dell Venue 8 5830 Pro only has a single speaker
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Hans de Goede [Sun, 13 May 2018 07:24:26 +0000 (09:24 +0200)]
ASoC: Intel: bytcr_rt5640: Use device properties for setting up dmic
Use device-properties for setting up the dmic, based on the
BYT_RT5640_MAP() value, instead of using the codec specific
rt5640_dmic_enable() function for this. This also removes the need
for the BYT_RT5640_DMIC_EN quirk, which was always set together with
a MAP() quirk of DMIC1_MAP or DMIC2_MAP.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
kbuild test robot [Tue, 15 May 2018 14:53:38 +0000 (22:53 +0800)]
ASoC: rt5663: rt5663_set_jack_detect() can be static
Fixes: 9958e8afbcad ("ASoC: rt5663: Use the set_jack() instead of the export function")
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Oder Chiou [Tue, 15 May 2018 06:00:15 +0000 (14:00 +0800)]
ASoC: rt5663: Use the set_jack() instead of the export function
The patch replaces the export function with the new API set_jack().
Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Peter Ujfalusi [Tue, 15 May 2018 06:43:35 +0000 (09:43 +0300)]
ASoC: omap: sdma-pcm: Correction for the include files
The sdma-pcm does not need any information from omap-dma.h, it only needs
to include the omap-dmaengine.h - for the omap_dma_filter_fn, but that
might not be needed at all as OMAP1 was converted to dma_slave_map, but
I can not test OMAP1.
Add the linux/device.h include as well for devm_kzalloc()
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Peter Ujfalusi [Tue, 15 May 2018 06:43:34 +0000 (09:43 +0300)]
ASoC: omap: sdma-pcm: Fix modpost warning
WARNING: modpost: missing MODULE_LICENSE() in sound/soc/omap/snd-soc-sdma.o
see include/linux/module.h for more information
WARNING: modpost: missing MODULE_LICENSE() in sound/soc/omap/snd-soc-sdma.o
see include/linux/module.h for more information
Add the missing MODULE_LICENSE.
This patch also going to solve:
snd_soc_sdma: Unknown symbol devm_kmalloc (err 0)
snd_soc_sdma: Unknown symbol omap_dma_filter_fn (err 0)
snd_soc_sdma: Unknown symbol snd_dmaengine_pcm_prepare_slave_config (err 0)
snd_soc_sdma: Unknown symbol devm_snd_dmaengine_pcm_register (err 0)
Reported-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Hans de Goede [Fri, 11 May 2018 09:52:16 +0000 (11:52 +0200)]
ASoC: Intel: bytcr_rt5640: Fix compile error
Fix the compile error introduced by: "ASoC: Intel: bytcr_rt5640:
Configure PLL1 before using it".
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Colin Ian King [Fri, 11 May 2018 13:28:18 +0000 (14:28 +0100)]
ASoC: hisilicon: fix spelling mistake: "uknown" -> "unknown"
Trivial fix to spelling mistake in dev_err message text
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Charles Keepax [Thu, 26 Apr 2018 16:30:07 +0000 (17:30 +0100)]
ASoC: compress: Fix up some trivial formatting issues
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Acked-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Charles Keepax [Thu, 26 Apr 2018 16:30:04 +0000 (17:30 +0100)]
ASoC: compress: Only assign compr->ops->copy once
There are only one set of ops on the compressed stream so no need to
reassign the copy callback repeatedly, stop after copy is seen to be
necessary.
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Acked-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla [Wed, 9 May 2018 12:56:18 +0000 (13:56 +0100)]
ASoC: qdsp6: q6common: Add qdsp6 helper functions
This patch adds some common helper functions like translating dsp error
to linux error codes and channel mappings etc.
These functions are used in all the following qdsp6 drivers.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-and-tested-by: Rohit kumar <rohitkr@codeaurora.org>
Reviewed-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla [Wed, 9 May 2018 12:56:17 +0000 (13:56 +0100)]
ASoC: qdsp6: dt-bindings: Add q6asm dt bindings
This patch add DT bindings for ASM (Audio Stream Manager) DSP module.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-and-tested-by: Rohit kumar <rohitkr@codeaurora.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla [Wed, 9 May 2018 12:56:16 +0000 (13:56 +0100)]
ASoC: qdsp6: dt-bindings: Add q6adm dt bindings
This patch add DT bindings for ADM (Audio Device Manager) DSP module.
This module implements mixer controls to setup the connections between
AFE ports and ASM streams.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-and-tested-by: Rohit kumar <rohitkr@codeaurora.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla [Wed, 9 May 2018 12:56:15 +0000 (13:56 +0100)]
ASoC: qdsp6: dt-bindings: Add q6afe dt bindings
This patch add DT bindings for AFE (Audio Frontend) DSP module.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-and-tested-by: Rohit kumar <rohitkr@codeaurora.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla [Wed, 9 May 2018 12:56:14 +0000 (13:56 +0100)]
ASoC: qdsp6: dt-bindings: Add q6core dt bindings
This patch add DT bindings for Q6CORE DSP module.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-and-tested-by: Rohit kumar <rohitkr@codeaurora.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>