Commit graph

14509 commits

Author SHA1 Message Date
Charles Keepax
5d3d0ad688 ASoC: cs35l35: Stash dev pointer directly rather than CODEC pointer
The driver stashes a CODEC pointer in the cs35l35_private structure,
which is used to obtain a struct device pointer for error messages in the
interrupt handler.

However, doing so is not very safe as the interrupt is registered, as it
should be in bus probe, but the CODEC pointer can't be safely stored until
the ASoC level probe. This leaves a window between the two probes where if
any interrupts are received a NULL pointer will be deferenced in the IRQ
handler.

Fix this issue by saving a pointer to the device directly and passing that
to the error messages in the interrupt handler rather than using the CODEC
pointer to access the device pointer.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-17 21:40:31 +00:00
Bard Liao
9b5d3865b3 ASoC: rt5665: set i2s pin share configuration
I2S2 and I2S3 are share pins. We need to configure it when i2s is
active and disable it when i2s is inactive. To disable i2s pins
means to set them as gpio.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-16 14:08:04 +00:00
Bard Liao
763811987d ASoC: rt5665: fix define of RT5665_HP_DRIVER_5X
It is (0x3 << 2), not (0x2 << 2).

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-16 14:07:50 +00:00
Kuninori Morimoto
9986943ef5 ASoC: rcar: dma: remove unnecessary "volatile"
commit 2a3af642eb20("ASoC: rcar: clear DE bit only in PDMACHCR...")
added rsnd_dmapp_bset(), but it used copy-paste. Thus, it had
unnecessary "volatile", and had below warning on x86.
This patch fix it.

   sound/soc/sh/rcar/dma.c: In function 'rsnd_dmapp_bset':
>> sound/soc/sh/rcar/dma.c:463:21: warning: passing argument 1 of \
   'ioread32' discards 'volatile' qualifier from pointer target \
   type [-Wdiscarded-qualifiers]
     u32 val = ioread32(addr);
                        ^~~~
   In file included from arch/x86/include/asm/io.h:203:0,
                    from arch/x86/include/asm/realmode.h:5,
                    from arch/x86/include/asm/acpi.h:33,
                    from arch/x86/include/asm/fixmap.h:19,
                    from arch/x86/include/asm/apic.h:10,
                    from arch/x86/include/asm/smp.h:12,
                    from include/linux/smp.h:59,
                    from include/linux/topology.h:33,
                    from include/linux/gfp.h:8,
                    from include/linux/idr.h:16,
                    from include/linux/kernfs.h:14,
                    from include/linux/sysfs.h:15,
                    from include/linux/kobject.h:21,
                    from include/linux/of.h:21,
                    from include/linux/of_dma.h:16,
                    from sound/soc/sh/rcar/dma.c:12:
   include/asm-generic/iomap.h:31:21: note: expected 'void *' \
   but argument is of type 'volatile void *'
    extern unsigned int ioread32(void __iomem *);
                        ^~~~~~~~
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-16 14:07:25 +00:00
Bryce Ferguson
e54fde6171 ASoC: Add AU1761 audio codec as selectable option
This commit adds the ADI AU1761 audio codec as a selectable option
in the kernel config.  Currently the driver can only be selected
for ADI blackfin devices or if SND_SOC_ALL_CODECS is enabled.

Signed-off-by: Bryce Ferguson <bryce.ferguson@rockwellcollins.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-15 18:04:40 +00:00
Kuninori Morimoto
62a10498af ASoC: rcar: clear DE bit only in PDMACHCR when it stops
R-Car datasheet indicates "Clear DE in PDMACHCR" for transfer stop,
but current code clears all bits in PDMACHCR.
Because of this, DE bit might never been cleared,
and it causes CMD overflow. This patch fixes this issue.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-15 17:28:47 +00:00
Dharageswari R
bf3e5ef5d5 ASoC: Intel: Skylake: Fix parameter overwrite for KPB Module
KPB module default parameter were overwritten by the dynamic instance
id once use case is executed. This will cause module crash from
subsequent execution of use case as the updated parameters are used.

So instead of over writing the default parameter, make a copy and
update the module parameter and use this in IPC message.

Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
Signed-off-by: Kranthikumar, GudishaX <gudishax.kranthikumar@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-15 17:28:22 +00:00
Jeeja KP
b7d0254c51 ASoC: Intel: Skylake: Fix module load when module size > DMA buffer size
When module size > DMA buffer size, driver copies first chunk and waits
for the BDL complete interrupt. BDL complete interrupt never occurs and
wait time expires as module load IPC is not send to start the DMA from
DSP.

To fix the above issue need to follow the below steps:
1. After copying the first chunk, send the module load IPC to start the
DMA.
2. Wait for the BDL interrupt. Once interrupt is received, copy the
next chunk.
3. Continue step 2 till all bytes are copied.
4. When all the bytes are copied (bytes_left = 0), wait for module load
IPC response
5. Handled module load IPC response messages, check the load module IPC
response and wake up the thread to complete module load.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-15 17:28:18 +00:00
G Kranthi
7bd86a3059 ASoC: Intel: Skylake: Remove get dsp_ops in cleanup routine
dsp ops is already set in init, so use this in cleanup routine
instead of again retrieving it. Also constify struct skl_dsp_ops.

Signed-off-by: G Kranthi <gudishax.kranthikumar@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-15 17:28:15 +00:00
G Kranthi
cb729d80b5 ASoC: Intel: Skylake: Disable notifications at boot after DSP FW init
DSP firmware sends notification every 1ms, which is disabled in runtime
suspend. But if a system has no runtime pm, we keep getting
notification, so disable after FW init as well.

Signed-off-by: G Kranthi <gudishax.kranthikumar@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-15 17:28:11 +00:00
Jeeja KP
3643ff10d4 ASoC: Intel: Skylake: Remove BE prepare ops
Remove BE prepare ops which enables MCLK by default. If MCLK is required
to be enabled for any specific platform, it needs to be enabled in the
corresponding machine driver.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-15 17:28:08 +00:00
Jeeja KP
03de8c2ef8 ASoC: Intel: bxtn: Reload the firmware in case of D3 failure
If D3 IPC fails or times out, firmware needs to be reloaded as driver
continues the reset.
So set the fw_load flag to false to reload the firmware in D0.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-15 17:28:04 +00:00
Jeeja KP
1fb344a33a ASoC: Intel: bxtn: Update DSP core state in D0
In system suspend, firmware needs to be re-downloaded as IMR is cleared.
When firmware is downloaded in D0, core state is not set to running
state causing instability with subsequent D0-D3 cycles.

So set the core state correctly during D0 and check the DSP core state
if not in reset to set the DSP to D3.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-15 17:28:01 +00:00
Jeeja KP
5518af9f97 ASoC: Intel: bxtn: Disable interrupt when DSP is in D3
When DSP is in D3, no interrupts are expected, so disable
interrupt while entering D3.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-15 17:27:58 +00:00
Guneshwor Singh
3b563e0a84 ASoC: Intel: Skylake: Fix not to stop src pipe in pre pmd event handler
If the widget is a mixin module, just unbind between source and sink
and don't stop the source pipe as there can be multiple sinks
connected.

Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-15 17:27:54 +00:00
Jeeja KP
6914968b82 ASoC: Intel: Skylake: Fix to delete DSP pipe after stopping pipe
DSP pipe needs to stopped before deleting the pipe. Currently check is
for pipe state > STARTED, which is incorrect. So changed to include
pipe state STARTED to stop the pipe if it started.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-15 17:27:44 +00:00
Bhumika Goyal
5ace37bd79 ASoC: fsl: constify snd_soc_ops structures
Declare snd_soc_ops structures as const as they are only stored
in the ops field of a snd_soc_dai_link structure. This field is
of type const, so snd_soc_ops structures having this property
can be made const too.

The following .o files did not compile:
sound/soc/fsl/{p1022_rdk.c/p1022_ds.c/mpc8610_hpcd.c}

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-15 13:34:32 +00:00
Bard Liao
28d2ca39be ASoC: rt5665: move set_sysclk to codec level
Move set_sysclk to codec level and people can use it at both
codec and dai level.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-13 16:56:13 +00:00
Bard Liao
ccd00d5911 ASoC: rt5665: move set_pll to codec level
Move set_pll function to codec level and people can use it at both
codec and dai level. Also, lower case "source" to keep it consistent.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-13 16:56:12 +00:00
Dan Carpenter
bfe41c678d ASoC: cs35l35: returning uninitialized in probe()
If cs35l35->pdata.stereo is false then "ret" isn't initialized.

Fixes: 6387f866a2 ("ASoC: Add support for Cirrus Logic CS35L35 Amplifier")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Paul Handrigan <Paul.Handrigan@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-13 16:54:38 +00:00
kbuild test robot
f3a612a655 ASoC: cs35l35: fix semicolon.cocci warnings
sound/soc/codecs/cs35l35.c:706:2-3: Unneeded semicolon
sound/soc/codecs/cs35l35.c:543:4-5: Unneeded semicolon
sound/soc/codecs/cs35l35.c:553:4-5: Unneeded semicolon

 Remove unneeded semicolon.

Generated by: scripts/coccinelle/misc/semicolon.cocci

CC: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-13 16:47:56 +00:00
Colin Ian King
03ff570c6b ASoC: cs35l35: trivial fix to indentation
Remove extraneous tab to correct the nesting level indentation

Detected by CoverityScan, CID#1416584 ("Nesting level does
not match indentation")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-13 16:47:20 +00:00
Axel Lin
82875163a8 ASoC: cs35l35: Fix display revision id
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Paul Handrigan <Paul.Handrigan@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-13 16:44:47 +00:00
Pierre-Louis Bossart
a9b6567d03 ASoC: Intel: Enable bytcht_nocodec machine driver
Make sure this machine driver is only used if enabled explicitly
and if there is no information found in the SSDT.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-13 16:41:18 +00:00
Pierre-Louis Bossart
759db1c466 ASoC: Intel: boards: add card for MinnowBoardMax/Up I2S access
Add card with dummy codec and DAI to make I2S signals observable.
Uses Mic and Speaker pins/widgets to control DAPM

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-13 16:41:15 +00:00
Pierre-Louis Bossart
a63b8a117d ASoC: Intel: Atom: enable BYT/CHT+DA7213 machine driver
Add entries in HID table and reference to bytcht_da7213 driver

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-13 16:41:11 +00:00
Pierre-Louis Bossart
82cf89de2c ASoC: Intel: add machine driver for BYT/CHT + DA7213
Add new machine driver, tested with Ard-Audio-DA7212 [1]
connected to MinnowBoardMAX Turbot.

The MCLK is managed by the codec driver using the "mclk" handle
to reuse existing code, but it could just as well be handled
by this machine driver.

[1] http://www.dialog-semiconductor.com/content/ard-audio-da7212

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-13 16:41:06 +00:00
Pierre-Louis Bossart
8f42c23a98 ASoC: da7213: add ACPI support
Add DLGS7212 and DLGS7213 HID

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-13 16:18:08 +00:00
Charles Keepax
bf5043d69c ASoC: cs35l35: Add IRQF_SHARED to IRQ flags
As it is quite common to use a stereo pair of amps but share the IRQ
line between them both add the IRQF_SHARED flag whilst requesting
cs35l35's IRQ.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-13 16:09:25 +00:00
Charles Keepax
1f758cd9da ASoC: cs35l35: Add local variable for dev in probe
Tidy up the code a little by adding a local variable for i2c_client->dev
rather than referring to it explicitly everytime.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-13 16:09:21 +00:00
Charles Keepax
8d45f2d238 ASoC: cs35l35: Add for configuring drive mode in unused slots
Add support for setting how the I2S pins are driven in unused slots,
currently the chip will just use the default of drive 0, however this
causes issues when multiple devices are attached to the same bus.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-13 16:09:17 +00:00
Charles Keepax
1bb06ada03 ASoC: cs35l35: Add missing return in probe
A return statement is missing just before the error paths at the end of
probe. This causes us to fall straight into the error path and disable
the supplies and re-enable reset, as these are only controlled during
probe this causes the part to no longer function.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-13 16:09:10 +00:00
Takashi Sakamoto
998d6fb512 ASoC: Intel: Skylake: code cleanup for pin fixup limitation
As a commit 4cd9899f0d ("ASoC: Intel: Skylake: Add multiple pin
formats") describes, 'fixups is applied to pin 0 only'. On the other
hand, the commit left some codes as what they were. This might
confuses readers.

This commit fixes the issue. This doesn't change driver behaviour at all.

Fixes: 4cd9899f0d ("ASoC: Intel: Skylake: Add multiple pin formats")
Signed-off-by: Takashi Sakamoto <takashi.sakamoto@miraclelinux.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Tested-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-13 16:07:41 +00:00
Hiroyuki Yokoyama
a1c2ff5372 ASoC: rsnd: fix sound route path when using SRC6/SRC9
This patch fixes the problem that the missing value of the route path
setting table and incorrect values are set in the CMD_ROUTE_SELECT
register.

Signed-off-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
[Kuninori: shared data on MIX and non-MIX case]
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-13 12:58:07 +00:00
Masahiro Yamada
8a1115ff6b scripts/spelling.txt: add "disble(d)" pattern and fix typo instances
Fix typos and add the following to the scripts/spelling.txt:

  disble||disable
  disbled||disabled

I kept the TSL2563_INT_DISBLED in /drivers/iio/light/tsl2563.c
untouched.  The macro is not referenced at all, but this commit is
touching only comment blocks just in case.

Link: http://lkml.kernel.org/r/1481573103-11329-20-git-send-email-yamada.masahiro@socionext.com
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-03-09 17:01:09 -08:00
Brian Norris
d6c098a1db ASoC: don't dereference NULL pcm_{new,free}
Not all platform drivers have pcm_{new,free} callbacks. Seen with a
"snd-soc-dummy" codec from sound/soc/rockchip/rk3399_gru_sound.c.

Fixes: 99b04f4c40 ("ASoC: add Component level pcm_new/pcm_free")
Signed-off-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-09 12:34:17 +01:00
Bard Liao
39841944c6 ASoC: rt5665: enhance jack type detection function
Use manual mode for jack detection function to increase accuracy.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-08 13:48:03 +01:00
Bard Liao
948059ddf9 ASoC: rt5665: enable TDM if more than 2 channels
TDM is necessary for more than 2 channels. And there is no control bit
to specify which slots are using. Machine driver will not need to call
snd_soc_dai_set_tdm_slot if we do it in rt5665_hw_params.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-08 13:47:53 +01:00
Bard Liao
246126b0a4 ASoC: rt5665: increase button detection accuracy
Use sar adc for button detection to increase accuracy.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-08 13:47:52 +01:00
Bard Liao
09b50c3703 ASoC: rt5665: CLKDET is also a power of ASRC
We need to power on CLKDET to use ASRC function.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-08 13:45:14 +01:00
Bard Liao
8f365313be ASoC: rt5665: Vref3 is necessary for Mono Amp
Vref3 is necessary for Mono Amp. So add it to dapm routes

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-08 13:45:14 +01:00
Bard Liao
593dd5d9fb ASoC: rt5665: increase LDO level
Too low LDO level will cause a few functions unstable.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-08 13:45:13 +01:00
Bard Liao
f1994a9c09 ASoC: rt5665: fix getting wrong work handler container
We got rt5665 private data from wrong work. It will result in kernel
panic.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2017-03-08 13:44:10 +01:00
Alin Grigorean
cb7d53b499 ASoC: fsl: Remove unneeded init of static variable
This was reported by checkpatch.pl

Signed-off-by: Alin Grigorean <alin.grig93@gmail.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-08 11:11:51 +01:00
Takashi Sakamoto
8e15e762cd ASoC: Intel: Skylake: use a helper macro to rounding-up calculation
In 'include/linux/kernel.h', there's a helper macro to round numerical
value. Let's use it.

Signed-off-by: Takashi Sakamoto <takashi.sakamoto@miraclelinux.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Tested-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-08 11:02:42 +01:00
Lucas Stach
70d435ba1c ASoC: imx-pcm-dma: simplify pcm_config
The generic snd_dmaengine_pcm is able to retrieve all the needed
information from the attached dmaengine and is in fact able to
provide much more accurate flags to userspace, like the SDMA engine
being only able to operate in batch mode.

To avoid any future inconsistencies between the dmaengine and the
pcm_config, rip out the fixed config and rely on the core to fill
in the right flags derived from the dmaengine information.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-08 10:58:42 +01:00
Songjun Wu
cd3ac9affc ASoC: atmel-classd: fix audio clock rate
Fix the audio clock rate according to the datasheet.

Reported-by: Dushara Jayasinghe <dushara@successful.com.au>
Signed-off-by: Songjun Wu <songjun.wu@microchip.com>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2017-03-07 15:20:32 +01:00
Takashi Sakamoto
d1a6fe41d3 ASoC: Intel: Skylake: fix invalid memory access due to wrong reference of pointer
In 'skl_tplg_set_module_init_data()', a pointer to 'params' member of
'struct skl_algo_data' is calculated, then casted to (u32 *) and assigned
to a member of configuration data. The configuration data is passed to the
other functions and used to process intel IPC. In this processing, the
value of member is used to get message data, however this can bring invalid
memory access in 'skl_set_module_params()' as a result of calculation of
a pointer for actual message data.

(sound/soc/intel/skylake/skl-topology.c)
skl_tplg_init_pipe_modules()
->skl_tplg_set_module_init_data() (has this bug)
->skl_tplg_set_module_params()
  (sound/soc/intel/skylake/skl-messages.c)
  ->skl_set_module_params()
    ((char *)param) + data_offset

This commit fixes the bug.

Fixes: abb740033b ("ASoC: Intel: Skylake: Add support to configure module params")
Signed-off-by: Takashi Sakamoto <takashi.sakamoto@miraclelinux.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: <stable@vger.kernel.org> # v4.5+
2017-03-07 15:19:39 +01:00
Jerome Brunet
ea2a2ad17c ASoC: dio2125: use gpiod_set_value_cansleep
Use the "cansleep" variant of gpiod_set_value so the driver can be used
with slow gpio controllers as well.

Fixes: 85825d5e88 ("ASoC: dio2125: add dio2125 amp driver")
Reported-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-07 14:56:06 +01:00
Adrian Dinu
ec5a82d6c0 ASoC: Add space around '='
This was reported by checkpatch.pl

Signed-off-by: Adrian Dinu <adrian.dinu95@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-07 13:51:07 +01:00
Jeeja KP
7d3f91dc1e ASoC: Intel: bxtn: optimize ROM init retries
During S3->S0 transition, sometime ROM init fails because of
authentication engine loads later than the OS. In this case driver
waits for a longer period and then retries the FW download causing
huge delay in resume time of audio device.

To avoid this, ROM INIT wait time is set to a optimal value and
increased the retries for firmware download.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-07 13:48:01 +01:00
Jeeja KP
31d648f051 ASoC: Intel: bxtn: Store the FW/Library context at boot
Store the DSP firmware/library at boot, so that for S3 to S0 transition
use the stored ctx for downloading the firmware to DSP memory.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-07 13:47:34 +01:00
Andy Shevchenko
b3ec72ace9 ASoC: Intel: bdw-rt5677: Use devm_gpiod_get()
Since index is always 0 replace devm_gpiod_get_index() by devm_gpiod_get()
and apply proper flags.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-07 13:46:38 +01:00
Colin Ian King
08458871b6 ASoC: Intel: Skylake: fix spelling mistake: "allocationf" -> "allocation"
Trivial fix to spelling mistake in dev_err message.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-07 13:46:02 +01:00
Jerome Brunet
85825d5e88 ASoC: dio2125: add dio2125 amp driver
The dio2125 is a stereo output driver with adjustable gain.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-07 13:37:11 +01:00
Brian Austin
6387f866a2 ASoC: Add support for Cirrus Logic CS35L35 Amplifier
This patch adds support for the Cirrus Logic
CS35L35 9V Boosted Amplifier

Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-07 13:29:33 +01:00
Charles Keepax
7b4af793a7 ASoC: wm_adsp: Acknowledge controls should also check the DSP is running
We should not be writing acknowledge controls until the firmware is
running, as in the case of preloaded firmwares the DSP memory may be
unaccessible to whilst in the preloaded state. This means a write to the
control during this time could be lost.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-07 13:07:59 +01:00
Charles Keepax
67430a39ca ASoC: wm_adsp: Return an error on write to a disabled volatile control
Volatile controls should only be accessed when the firmware is active,
currently however writes to these controls will succeed, but the data
will be lost, if the firmware is powered down. Update this behaviour such
that an error is returned the same as it is for reads.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-07 13:07:58 +01:00
Jerome Brunet
9000b59d7a ASoC: es7134: add es7134 DAC driver
The es7134 is 24bit, 192Khz i2s DA converter for PCM audio.
Datasheet is available here : http://www.everest-semi.com/pdf/ES7134LV%20DS.pdf

This driver is also compatible with the es7144, which is the same as the
es7134, with 2 additional pins for filtering capacitors.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-06 11:45:24 +01:00
Jeeja KP
2fe42dd0f1 ASoC: hdac_hdmi: don't update the iterator in pcm list remove
Fix not to update the iterator element, instead use list_del to remove
entry from the list.

This fixes the following coccinelle and static checker warning:
sound/soc/codecs/hdac_hdmi.c:1884:2-21:iterator with update on line
1885
sound/soc/codecs/hdac_hdmi.c:2011 hdac_hdmi_dev_remove()
	error: potential NULL dereference 'port'.

Fixes: e0e5d3e5a53b('ASoC: hdac_hdmi: Add support for multiple ports to a PCM')
Reported-by: Julia Lawall <Julia.Lawall@lip6.fr>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-06 11:42:34 +01:00
Jeeja KP
04c8f2bf91 ASoC: hdac_hdmi: avoid reference to invalid variable of the pin list
Using pin list array iterator outside the iteration of the list can
point to dummy element, which can be invalid. So don't use pin variable
outside the pin list iteration.

This fixes the following coccinelle warning:
sound/soc/codecs/hdac_hdmi.c:1419:5-8: ERROR: invalid reference to the
index variable of the iterator

Fixes: 2acd8309a3a4('ASoC: hdac_hdmi: Add support to handle MST capable pin')
Reported-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-06 11:42:29 +01:00
Romain Perier
404785f9ef ASoC: es8328: Enabling support for 192k
The master and slave modes don't share the same table for MCLK/LRCLK
ratios. The slaves mode has bigger ratios that allow to use BCLK that
matche sampling frequency of 192khz.

This commit enables this rate only for slave mode, i.e it does not
declare this frequency in sysclk_contraints, resulting to an error in
master mode (not supported CLK).

Signed-off-by: Romain Perier <romain.perier@collabora.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-06 11:40:17 +01:00
Romain Perier
c7ad841eae ASoC: es8328: Simplify rates definition
Currently most of the standard rates are supported by this driver.
Instead of defining each supported rate one by one, we use the SND macro
SNDRV_PCM_RATE_8000_48000. Also adds support for 88.2khz as the codec
supports it and the sys clocks are already supported.

Signed-off-by: Romain Perier <romain.perier@collabora.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-06 11:40:15 +01:00
Romain Perier
ae884ae78a ASoC: es8328: Let device auto detect ratios in slave mode
In master mode, SCLK and LRCLK signals are generated by the CODEC when
any of the ADC/DAC are enabled. SCLK is derived from MCLK via a
programmable division set by BLK_DIV, LRCLK is derived from MCLK via
another programmable division set by ADCFsRatio/DACFsRatio.

In slave mode, SCLK and LRCLK signals are received as inputs and
supplied externally. LRCLK and SCLK must be synchronously derived from
MCLK with specific rates. The device can auto detect MCLK/LRCLK ratio
according to a predefined table. LRCLK/SCLK ratio is usually 64 (SCLK =
64 * LRCLK)

This commits adds support to let to device auto detect and decide which
ratio to use. The mclkdiv2 and BCLK_DIV ratio and put to zero.

Signed-off-by: Romain Perier <romain.perier@collabora.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-06 11:40:15 +01:00
Kuninori Morimoto
4b30eebfc3 ASoC: rcar: avoid SSI_MODEx settings for SSI8
SSI8 is is sharing pin with SSI7, and nothing to do for SSI_MODEx.
It is special pin and it needs special settings whole system,
but we can't confirm it, because we never have SSI8 available board.

This patch fixup SSI_MODEx settings error for SSI8 on connection test,
but should be confirmed behavior on real board in the future.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-06 11:16:08 +01:00
Alexey Dobriyan
5b5e0928f7 lib/vsprintf.c: remove %Z support
Now that %z is standartised in C99 there is no reason to support %Z.
Unlike %L it doesn't even make format strings smaller.

Use BUILD_BUG_ON in a couple ATM drivers.

In case anyone didn't notice lib/vsprintf.o is about half of SLUB which
is in my opinion is quite an achievement.  Hopefully this patch inspires
someone else to trim vsprintf.c more.

Link: http://lkml.kernel.org/r/20170103230126.GA30170@avx2
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-02-27 18:43:47 -08:00
Masahiro Yamada
4091fb95b5 scripts/spelling.txt: add "followings" pattern and fix typo instances
Fix typos and add the following to the scripts/spelling.txt:

  followings||following

While we are here, add a missing colon in the boilerplate in DT binding
documents.  The "you SoC" in allwinner,sunxi-pinctrl.txt was fixed as
well.

I reworded "as the followings:" to "as follows:" for
drivers/usb/gadget/udc/renesas_usb3.c.

Link: http://lkml.kernel.org/r/1481573103-11329-32-git-send-email-yamada.masahiro@socionext.com
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-02-27 18:43:47 -08:00
Masahiro Yamada
1cce200081 scripts/spelling.txt: add "deintialize(d)" pattern and fix typo instances
Fix typos and add the following to the scripts/spelling.txt:

  deintializing||deinitializing
  deintialize||deinitialize
  deintialized||deinitialized

Link: http://lkml.kernel.org/r/1481573103-11329-28-git-send-email-yamada.masahiro@socionext.com
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-02-27 18:43:47 -08:00
Masahiro Yamada
183b8021fc scripts/spelling.txt: add "intialization" pattern and fix typo instances
Fix typos and add the following to the scripts/spelling.txt:

  intialization||initialization

The "inintialization" in drivers/acpi/spcr.c is a different pattern but
I fixed it as well in this commit.

Link: http://lkml.kernel.org/r/1481573103-11329-16-git-send-email-yamada.masahiro@socionext.com
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-02-27 18:43:47 -08:00
Masahiro Yamada
4d39f0ac8e scripts/spelling.txt: add "unneded" pattern and fix typo instances
Fix typos and add the following to the scripts/spelling.txt:

  unneded||unneeded

Link: http://lkml.kernel.org/r/1481573103-11329-15-git-send-email-yamada.masahiro@socionext.com
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-02-27 18:43:47 -08:00
Arnd Bergmann
72cedf599f ASoC: mediatek: add I2C dependency for CS42XX8
We should not select drivers that depend on I2C when that is disabled,
as it results in a build error:

warning: (SND_SOC_MT2701_CS42448) selects SND_SOC_CS42XX8_I2C which has unmet direct dependencies (SOUND && !M68K && !UML && SND && SND_SOC && I2C)
sound/soc/codecs/cs42xx8-i2c.c:60:1: warning: data definition has no type or storage class
 module_i2c_driver(cs42xx8_i2c_driver);
sound/soc/codecs/cs42xx8-i2c.c:60:1: error: type defaults to 'int' in declaration of 'module_i2c_driver' [-Werror=implicit-int]

Fixes: 1f458d53f7 ("ASoC: mediatek: Add mt2701-cs42448 driver and config option.")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-21 15:02:34 -08:00
Wolfram Sang
56d2c61d61 ASoC: rsnd: check return value of init function
Currently, this function cannot fail for the ADG case. Still, let's
apply defensive programming techniques to make sure we fail gracefully
whenever rsnd_mod_init() gets extended with another failure case.
Reported by Coverity (CID 1397893).

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-21 09:51:23 -08:00
Wolfram Sang
34157f7bec ASoC: rsnd: drop useles self-assignments
Coverity reported (CID 1397992) this self-assignment. I think the code
stays readable even with the assignments removed.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-21 09:51:23 -08:00
Mark Brown
141dee78c4 Merge remote-tracking branches 'asoc/topic/wm8753' and 'asoc/topic/zte' into asoc-next 2017-02-19 16:37:07 +00:00
Mark Brown
ebfa3dccd2 Merge remote-tracking branches 'asoc/topic/tlv320aic3x', 'asoc/topic/topology', 'asoc/topic/wm0010', 'asoc/topic/wm8731' and 'asoc/topic/wm8741' into asoc-next 2017-02-19 16:37:01 +00:00
Mark Brown
166729f37d Merge remote-tracking branches 'asoc/topic/rt5665', 'asoc/topic/rt5677', 'asoc/topic/samsung', 'asoc/topic/simple' and 'asoc/topic/sunxi' into asoc-next 2017-02-19 16:36:54 +00:00
Mark Brown
a564394660 Merge remote-tracking branches 'asoc/topic/rt5514', 'asoc/topic/rt5640', 'asoc/topic/rt5645', 'asoc/topic/rt5659' and 'asoc/topic/rt5660' into asoc-next 2017-02-19 16:36:48 +00:00
Mark Brown
8237d99c3b Merge remote-tracking branches 'asoc/topic/pxa', 'asoc/topic/qcom' and 'asoc/topic/rockchip' into asoc-next 2017-02-19 16:36:44 +00:00
Mark Brown
a701802c4e Merge remote-tracking branches 'asoc/topic/max9867', 'asoc/topic/mtk', 'asoc/topic/nau8540', 'asoc/topic/nau8825' and 'asoc/topic/omap' into asoc-next 2017-02-19 16:36:35 +00:00
Mark Brown
64c37d50ad Merge remote-tracking branches 'asoc/topic/img' and 'asoc/topic/max98090' into asoc-next 2017-02-19 16:36:32 +00:00
Mark Brown
96f0e8a5b0 Merge remote-tracking branches 'asoc/topic/dwc', 'asoc/topic/es8328', 'asoc/topic/fsl', 'asoc/topic/fsl-sai' and 'asoc/topic/graph' into asoc-next 2017-02-19 16:36:23 +00:00
Mark Brown
59acd5dfcc Merge remote-tracking branches 'asoc/topic/davinci', 'asoc/topic/debugfs' and 'asoc/topic/doc' into asoc-next 2017-02-19 16:36:18 +00:00
Mark Brown
b7707a8be6 Merge remote-tracking branches 'asoc/topic/atmel', 'asoc/topic/chmap', 'asoc/topic/cq93vc' and 'asoc/topic/da7218' into asoc-next 2017-02-19 16:36:13 +00:00
Mark Brown
a2d64282dd Merge remote-tracking branches 'asoc/topic/adau17x1', 'asoc/topic/adsp', 'asoc/topic/ak4642', 'asoc/topic/amd' and 'asoc/topic/arizona' into asoc-next 2017-02-19 16:35:51 +00:00
Mark Brown
715d525b41 Merge remote-tracking branch 'asoc/topic/pcm3168a' into asoc-next 2017-02-19 16:35:47 +00:00
Mark Brown
16b5711485 Merge remote-tracking branch 'asoc/topic/intel' into asoc-next 2017-02-19 16:35:45 +00:00
Mark Brown
c7bb6d8060 Merge remote-tracking branch 'asoc/topic/dmaengine' into asoc-next 2017-02-19 16:35:44 +00:00
Mark Brown
4ae8be8ea9 Merge remote-tracking branch 'asoc/topic/component' into asoc-next 2017-02-19 16:35:41 +00:00
Mark Brown
39bc30f253 Merge remote-tracking branches 'asoc/fix/fsl-mxs-saif' and 'asoc/fix/sunxi' into asoc-linus 2017-02-19 16:35:37 +00:00
Mark Brown
bd85d189b3 Merge remote-tracking branch 'asoc/fix/rcar' into asoc-linus 2017-02-19 16:35:36 +00:00
Mark Brown
5bf3db18db Merge remote-tracking branch 'asoc/fix/intel' into asoc-linus 2017-02-19 16:35:34 +00:00
Mark Brown
19532a2477 Merge remote-tracking branch 'asoc/fix/dapm' into asoc-linus 2017-02-19 16:35:33 +00:00
Wei Yongjun
c97c4604c0 ASoC: sun4i-spdif: drop unnessary snd_soc_unregister_component()
It's not necessary to unregister a component registered
with devm_snd_soc_register_component(). Also removed
pointness clk_disable_unprepare() from error path and
snd_soc_unregister_platform() from the remove.

Fixes: f8260afa44 ("ASoC: sunxi: Add support for the SPDIF block")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-19 16:08:14 +00:00
Jeeja KP
7ba8ba3f4f ASoC: Intel: bxt: Add jack port initialize in bxt_rt298 machine
After the pcm jack is created, create and initialize the pin switch
widget for each port. Pin switch is to enable/disable the pin when
monitor is connected/disconnected.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-17 11:24:13 +00:00
John Hsu
1e561f6166 ASoC: nau8825: automatic BCLK and LRC divde in master mode
configurable LRC and BCLK divide. The driver
will make configurations of LRC and BCLK automatically according to
BCLK and FS information in master mode.

Signed-off-by: John Hsu <KCHSU0@nuvoton.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-17 10:42:53 +00:00
Vinod Koul
e3efb2ad83 ASoC: hdac_hdmi: Add device id for Geminilake
Geminilake is new Intel SoC, so add codec entry for HDMI

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Senthilnathan Veppur <senthilnathanx.veppur@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16 18:58:09 +00:00
Vinod Koul
2550486343 ASoC: Intel: Skylake: Add Geminlake IDs
Geminilake is next gen SoC, so add the IDs for Geminilake.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16 18:58:09 +00:00
Vinod Koul
06a99ddd20 ASoC: rt298: Add DMI match for Geminilake reference platform
Geminilake reference platform also uses combo jack for audio connector
so we need to set codec pdata to use this based on DMI match for this
board.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16 18:58:09 +00:00
Senthilnathan Veppur
db2f586b80 ASoC: Intel: Skylake: Check device type to get endpoint configuration
Geminilake has two different devices connected to the same SSP, so use
device_type check to get correct device configuration.

Signed-off-by: Senthilnathan Veppur <senthilnathanx.veppur@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16 18:58:09 +00:00
Jeeja KP
c5cf9f37a0 ASoC: Intel: bxt: Add jack port initialize in da7219_max98357a machine
After the pcm jack is created, create and initialize the pin switch
widget for each port. Pin switch is to enable/disable the pin when
monitor is connected/disconnected.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16 18:57:15 +00:00
Jeeja KP
86b5703158 ASoC: Intel: Skylake: Add jack port initialize in nau88l25_ssm4567 machine
After the pcm jack is created, create and initialize the pin switch
widget for each port. Pin switch is to enable/disable the pin when
monitor is connected/disconnected.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16 18:56:19 +00:00
Jeeja KP
565f13a95e ASoC: Intel: Skylake: Add jack port initialize in nau88l25_max98357a machine
After the pcm jack is created, create and initialize the pin switch
widget for each port. Pin switch is to enable/disable the pin when
monitor is connected/disconnected.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16 18:56:15 +00:00
Jeeja KP
64f8620d48 ASoC: Intel: Skylake: Add jack port initialize in rt286 machine
After the pcm jack is created, create and initialize the pin switch
widget for each port. Pin switch is to enable/disable the pin when
monitor is connected/disconnected.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16 18:56:12 +00:00
Jeeja KP
0324e51b5b ASoC: hdac_hdmi: Add machine pin widget for each port
Represent each port as machine DAPM pin widget. This helps in
enable/disable pin when monitor is connected/disconnected in case pcm
is rendered to multiple ports.

Create machine pin widgets  and pin switch kcontrol for each port and
report based on the pin status

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16 18:56:06 +00:00
Jeeja KP
625de2bf2e ASoC: Intel: bxt: Create ASoC jack for hdmi in bxt_da7219_max98357 machine
Creates ASoC jack for HDMI PCM and calls hdmi codec API to initialize
jack in bxt_da7219_max98357 machine

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16 18:56:03 +00:00
Jeeja KP
7932b8ace3 ASoC: Intel: bxt: Create ASoC jack for hdmi in bxt_rt298 machine
Creates ASoC jack for HDMI PCM and calls hdmi codec API to initialize
jack in bxt_rt298.c machine

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16 18:55:59 +00:00
Jeeja KP
9e4278cd9b ASoC: Intel: Skylake: Create ASoC jack for hdmi in nau88l25_ssm4567 machine
Creates ASoC jack for HDMI PCM and calls hdmi codec API to initialize
jack in skl_nau88l25_ssm4567 machine

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16 18:55:55 +00:00
Jeeja KP
c541b2dd45 ASoC: Intel: Skylake: Create ASoC jack for hdmi in skl_nau88l25_max98357a machine
Creates ASoC jack for HDMI PCM and calls hdmi codec API to initialize
jack in skl_nau88l25_max98357a machine

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16 18:55:51 +00:00
Jeeja KP
f3af359242 ASoC: Intel: Skylake: Create ASoC jack for hdmi in rt286 machine
Creates ASoC jack for HDMI pcm and calls hdmi codec API to initialize
jack in skl_rt268 machine

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16 18:55:47 +00:00
Jeeja KP
624900163d ASoC: hdac_hdmi: Use ASoC jack instead of snd_jack
Use snd_soc_jack instead of snd_jack and create the jack in machine
driver and pass the jack pointer to hdac_hdmi driver for jack
reporting.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16 18:55:43 +00:00
Jeeja KP
e0e5d3e5a5 ASoC: hdac_hdmi: Add support for multiple ports to a PCM
Since we have the MST feature enabled and Pin-Port mux for user to
select the converter routing, multiple port mapping to same converter
needs to be supported.

To support multiple port mapped to same converter following changes are
done for this:.
o Add port list to pcm, so that multiple ports can be mapped to a PCM.
o Jack reporting in case where multiple port are attached to same PCM.
o Change hdac_hdmi_get_port_from_cvt(), channel_map, remove functions
to parse through all ports mapped to same the PCM.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16 18:55:40 +00:00
Jeeja KP
1b46ebd136 ASoc: hdac_hdmi: Configure pin verbs for MST
To enable stream on a specific port of a MST capable pin, the port
needs to be selected before we configure the pin widget verb.

When port is selected, all the pin widget verb controlling the sink
device operation will be directed to selected port. So add port
selection before configuring the pin widget verb.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16 18:55:36 +00:00
Jeeja KP
a9ce96bcd9 ASoC: hdac_hdmi: Handle MST pin jack detection at boot/resume
The ELD notification can be received asynchronously from the graphics
side and this may happen just at the moment the sound driver is
initializing and notification will be missed. Similarly at system
resume, the notification is ignored as the  ELD and connection states
are updated in anyway at the end of the resume.
So check the jack status in boot/resume by querying the port presence
based on pin caps and report the jack status.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16 18:55:32 +00:00
Jeeja KP
fc181b04f2 ASoC: hdac_hdmi: Add MST verb support
To support DP MST audio, new pin verbs/params are added. This patch
adds helper functions to do following:
o To set a specific port
o To get the currently selected port
o To get the length of port.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16 18:55:14 +00:00
Garlic Tseng
cc3e1ce2c7 ASoC: mediatek: add power-domain get/put ctrl for mt2701
add power-domain ctrl for audio driver

Signed-off-by: Garlic Tseng <garlic.tseng@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16 18:27:17 +00:00
Alexandre Belloni
4957b556f5 ASoC: fsl_sai: support more than 2 channels
The FSL SAI can support up to 32 channels using TDM. Report that value so
they can actually be used.

Tested using 8 channels.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-13 18:01:55 +00:00
Baoyou Xie
66ead502af ASoC: zx-i2s: introduce pclk for zx2967 family
The pclk is necessary for zx2967 I2S controller. the driver
currently doesn't handle it. This is something we need to fix.

In turn, the driver supports zx296718's I2S controller.

By the way, this patch also change the clock name from tx to wclk
to make it clear.

Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
Reviewed-by: Shawn Guo <shawnguo@kernel.org>
Reviewed-by: Jun Nie <jun.nie@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-09 17:26:21 +00:00
Vincent Abriou
8480ac5679 ASoC: hdmi-codec: remove HDMI device unregister
While unregistering the hdmi-codec, the hdmi device list must be
cleaned up. It avoid kernel page fault when registering again the
hdmi-codec.

Signed-off-by: Vincent Abriou <vincent.abriou@st.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-08 18:33:16 +00:00
Icenowy Zheng
e5028a2597 ASoC: sunxi: allow the analog codec driver to be built on ARM64
As the 64-bit Allwinner H5 SoC has the same analog codec part (also the
same digital part) as H3, enable the driver to be built on ARM64
Allwinner platform, so that it can be used on H5.

Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-08 18:29:37 +00:00
Jeeja KP
2acd8309a3 ASoC: hdac_hdmi: Add support to handle MST capable pin
To handle jack event and configuration of the pin widget for MST
capable pin, this patch adds:
o Flag to identify the pin is MST capable.
o In notify callback(), based on the pipe and port information marks if
the port is mst_capable. In case of non MST, port is defaulted to zero.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-08 18:24:01 +00:00
Jeeja KP
8d13640f6b ASoC: Intel: Skylake: Add route change to nau88l25_ssm4567 machine
To support MST moved pin to port, this changes the routes based on
port. So change the route in nau88l25_ssm4567 machine.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-08 18:23:57 +00:00
Jeeja KP
b0aad231bd ASoC: Intel: Skylake: Add route change to nau88l25_max98357a machine
To support MST moved pin to port, this changes the routes based on
port. So change the route in nau88l25_max98357a machine.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-08 18:23:35 +00:00
Jeeja KP
eaba31035a ASoC: Intel: bxt: Add route change to rt298 machine
To support MST moved pin to port, this changes the routes based on
port. So change the route in bxt_rt298 machine.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-08 18:23:35 +00:00
Jeeja KP
754695f996 ASoC: hdac_hdmi: Begin to add support for DP Multi-stream audio
With MST each pin contains several ports to which device can be
connected.

As a preparatory work to support DP MST this patch adds below changes:
1. Defines the port structure and moves all stream related information
   like ELD, converter list, chmap to port.
2. Creates ports for each pin based on the max_ports support.
3. Based on Pin-Port combination creates DAPM Mux widget instead of Pin
   to allow user to select a converter.
4. Port zero is the default port when pin does not support MST.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-08 18:23:35 +00:00
Arnd Bergmann
245c5c7b08 ASoC: fix ES8328_I2C/SPI dependencies
The two front-ends to the codec can now be selected individually, but fail to
build when the bus support is missing:

sound/built-in.o: In function `es8328_spi_probe':
es8328-spi.c:(.text+0x125854): undefined reference to `__devm_regmap_init_spi'
sound/built-in.o: In function `es8328_spi_driver_init':
es8328-spi.c:(.init.text+0x3589): undefined reference to `__spi_register_driver'

Related to this, the added dependency on SND_SOC_ES8328 breaks:

warning: (SND_SOC_ALL_CODECS) selects SND_SOC_ES8328_I2C which has unmet direct dependencies (SOUND && !M68K && !UML && SND && SND_SOC && SND_SOC_ES8328 && I2C)

This adds the respective Kconfig dependencies and changes SND_SOC_ES8328 to a hidden
symbol that is selected implicitly by the two more specific options, as we do for
some other codecs. We have to remove the 'depends on' for SND_SOC_IMX_ES8328 in the
same step to avoid a recursive dependency.

Fixes: aa00f2c8af ("ASoC: Allow to select ES8328_I2C and ES8328_SPI directly")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-06 16:30:55 +00:00
Subhransu S. Prusty
0cf5a17159 ASoC: Intel: Skylake: Report Platform ID info from NHLT
This patch create entry in sysfs file system to report the
platform_id = "pci-id-oem_id-oem_table_id-oem_revision"
for board identification.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Sodhi, VunnyX <vunnyx.sodhi@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-04 17:14:45 +01:00
Romain Perier
eaae2ea735 ASoC: rockchip: Add machine driver for RK3288 boards that use analog/HDMI
The driver is used for Rockchip rk3288-based boards using a configurable
analog output (can be an headphone) and the built-in HDMI audio output
that is part of the RK3288 SoCs and use the Alsa HDMI codec driver. For
some rk3288-based boards the analog output and the hdmi audio are plugged
on the same i2s line, so we have to do the same in the driver by using a
DAI link CPU to multicodecs. This configuration can be found for example
on the Radxa Rock2 or the Firefly-RK3288.

This commit is based on the initial work that was done by Sjoerd Simons
<sjoerd.simons@collabora.com> with some improvements.

Signed-off-by: Romain Perier <romain.perier@collabora.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-04 13:17:44 +01:00
Romain Perier
aa00f2c8af ASoC: Allow to select ES8328_I2C and ES8328_SPI directly
Currently, we have to select these symbols explictly via Kconfig, from
another entry. If we plan to use generic audio drivers like
simple-audio-card, the user need to be able to enable these symbols
directly via the menuconfig.

This commit also fixes unmet dependencies to SND_SOC_IMX_ES8328 caused
by these changes.

Signed-off-by: Romain Perier <romain.perier@collabora.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-04 13:16:32 +01:00
Romain Perier
b9b044e296 ASoC: es8328: Add support for slave mode
Currently, the function that changes the DAI format only supports master
mode. Trying to use a slave mode exits the function with -EINVAL and
leave the codec misconfigured. This commits adds support for enabling
the slave mode.

Signed-off-by: Romain Perier <romain.perier@collabora.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-04 13:16:31 +01:00
Jeeja KP
ba21034677 ASoC: Intel: bxt: add channel map support in bxt_da7219_max98357a machine
HDMI registers channel map controls per PCM. As PCMs are not
registered during dai_link init callback, store the pcm ids and
codec DAIs during this init callback.

Register for late probe and call the jack_init API which also
registers channel map in the late probe callback handler.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-04 13:10:23 +01:00
Jeeja KP
6d707a74a7 ASoC: Intel: bxt: Add route change to da7219_max98357a machine
To support MST moved pin to port, this changes the routes based on
port. So change the route in bxt_da7219_max98357a machine.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-04 13:08:06 +01:00
Jeeja KP
111c2ae1fb ASoC: Intel: Skylake: Add route change to rt286 machine
To support MST moved pin to port, this changes the routes based on
port. So change the route in skl_rt286 machine.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-04 13:08:02 +01:00
Jeeja KP
51e0f3c825 ASoC: Intel: bxt: add channel map support in rt298 machine
HDMI registers channel map controls per pcm. As PCMs are not
registered during dai_link init callback, store the pcm ids and
codec DAIs during this init callback.

Register for late probe and call the jack_init API which registers
channel map in the late probe callback handler.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-04 13:08:01 +01:00
Jeeja KP
ab1eea19d0 ASoC: hdac_hdmi: Move channel info from pin to PCM structure
Channel info is part of the pcm parameter and channel map control is
created for each pcm. So move channel info to pcm instead of pin
structure and the mutex lock to pcm.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-04 13:07:03 +01:00
John Hsu
c1644e3de4 ASoC: nau8540: new codec driver
Add codec driver of NAU85L40

Signed-off-by: John Hsu <KCHSU0@nuvoton.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-04 12:37:26 +01:00
Daniel Baluta
d6075c2601 ASoC: Drop unnecessary debugfs ifdef
This is a relict of 6553bf06a3 ("ASoC: Don't try to register debugfs
entries if the parent does not exist").

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-04 11:56:45 +01:00
Mylène Josserand
2ad6f30de7 ASoC: sun4i-i2s: Add quirks to handle a31 compatible
Some SoCs have a reset line that must be asserted/deasserted.
This patch adds a quirk to handle the new compatible
"allwinner,sun6i-a31-i2s" which will deassert the reset
line on probe function and assert it on remove's one.

This new compatible is useful in case of A33 codec driver, for example.

Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-03 13:02:07 +01:00
Mylène Josserand
36c684936f ASoC: Add sun8i digital audio codec
Add the sun8i audio codec which handles the digital register of
A33 codec.
The driver handles only the basic playback from the DAC to headphones.
All other features (microphone, capture, etc) will be added later.

Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-03 13:02:06 +01:00
Mylène Josserand
bf14da7e55 ASoC: sun8i-codec-analog: Add amplifier event to fix first delay
When playing a sound for the first time, a short delay, where the audio
file is not played, can be noticed.
On a second play (right after), the sound is played correctly.
If we wait a short time (~5 sec which corresponds to the aplay
timeout), the delay is back.

This patch fixes it by using an event on headphone amplifier.
It allows to keep the amplifier enable while playing a sound.
A delay of 700ms allows to wait that the amplifier is powered-up
before playing the sound.

Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-03 13:02:06 +01:00
Kuninori Morimoto
ef30da1c52 ASoC: rsnd: fixup reset timing of sync convert_rate
Sync convert rate settings should be availabled *after* Playing.
Thus, src->sync should be reset first of init function.
Otherwise, it will set remaining settings when it start playing.
This patch fixes it. Thanks to Yokoyama-san

Reported-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-03 12:24:23 +01:00
Pierre-Louis Bossart
77e546b7ba ASoC: cht-bsw-rt5645: fix unused variable compiler warning
Missed unused variable in previous changes, oops.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-01 18:35:50 +00:00
Pierre-Louis Bossart
cec55827dd ASoC: rt5645: fix error handling for gpio detection
Optional gpio handling should not cause an error status and prevent
probing if it's missing.  Remove error return for -ENOENT case and
move error message to dev_info

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-01 18:35:06 +00:00
Matt Ranostay
9834ffd1ec ASoC: omap-mcbsp: Add PM QoS support for McBSP to prevent glitches
We can get audio errors if hitting deeper idle states on omaps:

[alsa.c:230] error: Fatal problem with alsa output, error -5.
[audio.c:614] error: Error in writing audio (Input/output error?)!

This seems to happen with off mode idle enabled as power for the
whole SoC may get cut off between filling the McBSP fifo using DMA.
While active DMA blocks deeper idle states in hardware, McBSP
activity does not seem to do so.

Basing the QoS latency calculation on the FIFO size, threshold,
sample rate, and channels.

Based on the original patch by Tony Lindgren
Link: https://patchwork.kernel.org/patch/9305867/

Signed-off-by: Matt Ranostay <matt@ranostay.consulting>
Signed-off-by: Liam Breck <kernel@networkimprov.net>
Tested-by: Tony Lindgren <tony@atomide.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-01 17:19:53 +00:00
Bjorn Andersson
b6e643adfd ASoC: qcom: Drop __func__ usage from log prints
The combination of dev_err() and __func__ make most of these log prints
over 100 chars long. Remove the usage of __func__ to clean the kernel
log and as the usage is not necessary to identify the individual log
prints.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-31 21:02:00 +00:00
Bjorn Andersson
46dccc3573 ASoC: qcom: lpass-cpu: Remove unnecessary clock checks
Clean up the clock calling code by removing numerous IS_ERR() checks by
just assigning the clock NULL; as this turn all used functions in the
clk API to nops.

Also include the word "optional" in the error message when failing to acquire
the optional osr clocks.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-31 21:01:56 +00:00
Sergej Sawazki
c9b0bdc747 ASoC: wm8741: Remove unused WM8741_NUM_RATES macro
This macro is unused since commit e369bd006f ("ASoC: wm8741: Allow master
clock switching").

Signed-off-by: Sergej Sawazki <ce3a@gmx.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-31 20:20:49 +00:00
Enric Balletbo i Serra
b1b9e0d3d9 ASoC: mt8173-max98090: remove the call to snd_soc_jack_add_pins.
The snd_soc_card_jack_new function can call snd_soc_jack_add_pins for
you, so pass directly the pins struct when you create the new jack.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-31 20:19:05 +00:00
Pierre-Louis Bossart
7bde09dfcf ASoC: Intel: cht-bsw-rt5645: fix DAI formats
Remove default and set I2S mode correctly both on codec and
cpu sides

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-31 20:14:30 +00:00
Pierre-Louis Bossart
bf92c6efc6 ASoC: Intel: add support for ALC3270 codec
Use ACPI ID 10EC3270 to load machine driver for cht-bsw-rt5645
and add reference to 3270 to use the rt5645 mode

Tested on Asus T100HA

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-31 20:14:23 +00:00
Pierre-Louis Bossart
d74390b5fe ASoC: Intel: cht-bsw-rt5645: select ASRC source based on routing quirk
Some platforms use AIF2, use routing information to set ASRC as needed

Suggested-by: Bard Liao <bardliao@realtek.com>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=95681
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-31 20:14:07 +00:00