ASoC: wm8750: Make VREF a VMID instead of OUTPUT widget

Commit 04489eeb02a4 ("ALSA: wm8750: add missing VREF output") added the
previously missing VREF widget. And while adding the widget as OUTPUT widget
silences the error of the missing widget it should have rather been a VMID
widget.

The VREF widget is only used internally as a source for the VREF input of
the Out3 Mux. Selecting that input means that the path should be kept
powered up at the VREF/VMID voltage, but that there is no actual audio
signal. Using a VMID widget will do this, whereas using a OUTPUT widget will
simply cause the path to completely power down.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
ASoC: dapm: Remove snd_soc_of_parse_audio_routing() due to deferred probe

This reverts commit f8781db8aeb18d (ASoC: dapm: Augment existing card
DAPM routes in snd_soc_of_parse_audio_routing) since it is broken for
deferred probing as it ends up storing data allocated with devm_ over
multiple instantiations of the device.

Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Tested-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Mark Brown <broonie@kernel.org>
ASoC: wm8750: Cleanup manual bias level transitions

Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner.

Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
ASoC: Intel: fix platform_no_drv_owner.cocci warnings

sound/soc/intel/cht_bsw_rt5672.c:273:3-8: No need to set .owner here. The core will do it.

 Remove .owner field if calls are used which set it automatically

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
ASoC: Intel: fix platform_no_drv_owner.cocci warnings

sound/soc/intel/bytcr_dpcm_rt5640.c:218:3-8: No need to set .owner here. The core will do it.

 Remove .owner field if calls are used which set it automatically

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

CC: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
ASoC: intel: sst: drop owner assignment from platform_drivers

This platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
ASoC: omap: drop owner assignment from platform_drivers

This platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
ASoC: pxa: drop owner assignment from platform_drivers

This platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
ASoC: samsung: drop owner assignment from platform_drivers

This platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
ASoC: Intel: Add I2C dependency to two new machines

Fix following build error when CONFIG_I2C is not enabled:

sound/soc/codecs/rt5640.c:2252:1: warning: data definition has no type or storage class
 module_i2c_driver(rt5640_i2c_driver);
 ^
sound/soc/codecs/rt5640.c:2252:1: error: type defaults to ‘int’ in declaration of ‘module_i2c_driver’ [-Werror=implicit-int]
sound/soc/codecs/rt5640.c:2252:1: warning: parameter names (without types) in function declaration
sound/soc/codecs/rt5640.c:2241:26: warning: ‘rt5640_i2c_driver’ defined but not used [-Wunused-variable]
 static struct i2c_driver rt5640_i2c_driver = {
                          ^
cc1: some warnings being treated as errors

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
ASoC: intel: Remove superfluous backslash in Kconfig

The line continuation in Kconfig should be a '\' instead of '\\'.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
ASoC: dapm: Don't mark MICBIAS widgets as auto non-connected

The connected flag of a widget only affects widgets that are either a source
or a sink. The MICBIAS widget is a simple pass-through widget though and
hence its behavior is the same regardless of whether the connected flag is
set or not.

Hence there is not much point in trying to automatically mark MICBIAS
widgets as non-connected, so just remove it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
ASoC: dapm: Simplify fully route card handling

For legacy reasons the ASoC framework assumes that a CODEC INPUT or OUTPUT
widget that is not explicitly connected to a external source or sink is
potentially connected to a source or a sink and hence the framework treats
the widget itself as source (for INPUT) or sink (for OUTPUT). For this
reason a INPUT or OUTPUT widget that is really not connected needs to be
explicitly marked as so.

Setting the card's fully_routed flag will cause the ASoC core, once that all
widgets and routes have been registered, to go through the list of all
widgets and mark all INPUT and OUTPUT that are not externally connected as
non-connected. This essentially negates the default behaviour of treating
INPUT or OUTPUT widgets without external routes as sources or sinks.

This patch takes a different approach while getting the same result. Instead
of first marking INPUT and OUTPUT widgets as sinks/sources and then later
marking them as non-connected, just never mark them as a sink or a source if
the fully_routed flag is set on a card.

This requires a lot less code and also results in a slightly faster card
initialization since there is no need to iterate over all widgets and check
whether the INPUT and OUTPUT widgets are connected or not.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
ASoC: rt5670: set platform data by dmi

This patch set specific data according to dmi data.

Signed-off-by: Jin, Yao <yao.jin@intel.com>
Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
ASoC: dwc: Remove unnecessary debug messages and tests

The devm_XXX allocation functions print a message on failure,
so additional messages are not required.

Signed-off-by: Andrew Jackson <Andrew.Jackson@arm.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
ASoC: dwc: Reorder code in preparation for DT support

Move code that configures the DAI and DMA into a separate function.  This
reduces the size of the dw_i2s_probe function and will make it easier to
add support for device tree to the driver.

Signed-off-by: Andrew Jackson <Andrew.Jackson@arm.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
ASoC: dwc: Ensure FIFOs are flushed to prevent channel swap

Flush the FIFOs when the stream is prepared for use.  This avoids
an inadvertent swapping of the left/right channels if the FIFOs are
not empty at startup.

Signed-off-by: Andrew Jackson <Andrew.Jackson@arm.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
ASoC: dwc: Iterate over all channels

The Designware core can be configured with up to four stereo channels.
Each stereo channel is individually configured so, when the driver's
hw_params call is made, each requested stereo channel has to be
programmed.

Signed-off-by: Andrew Jackson <Andrew.Jackson@arm.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
ASoC: Intel: Fix BYTCR firmware name

BYTCR DSP firmware is in intel/ subdirectory. See linux-firmware.git
commit d562a3b63632 ("linux-firmware: add sst audio firmware for baytrail
platforms").

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
ASoC: Intel: Fix BYTCR machine driver MODULE_ALIAS

snd_soc_sst_bytcr_dpcm_rt5640 doesn't autoload because MODULE_ALIAS doesn't
match with "bytt100_rt5640" platform device.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Cc: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>