Hans de Goede
85ca6b17e2
ASoC: rt5670: Add new gpio1_is_ext_spk_en quirk and enable it on the Lenovo Miix 2 10
...
The Lenovo Miix 2 10 has a keyboard dock with extra speakers in the dock.
Rather then the ACL5672's GPIO1 pin being used as IRQ to the CPU, it is
actually used to enable the amplifier for these speakers
(the IRQ to the CPU comes directly from the jack-detect switch).
Add a quirk for having an ext speaker-amplifier enable pin on GPIO1
and replace the Lenovo Miix 2 10's dmi_system_id table entry's wrong
GPIO_DEV quirk (which needs to be renamed to GPIO1_IS_IRQ) with the
new RT5670_GPIO1_IS_EXT_SPK_EN quirk, so that we enable the external
speaker-amplifier as necessary.
Also update the ident field for the dmi_system_id table entry, the
Miix models are not Thinkpads.
Fixes: 67e03ff3f3
("ASoC: codecs: rt5670: add Thinkpad Tablet 10 quirk")
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1786723
Link: https://lore.kernel.org/r/20200628155231.71089-4-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-06-29 20:37:20 +01:00
Hans de Goede
5cacc6f576
ASoC: rt5670: Correct RT5670_LDO_SEL_MASK
...
The RT5670_PWR_ANLG1 register has 3 bits to select the LDO voltage,
so the correct mask is 0x7 not 0x3.
Because of this wrong mask we were programming the ldo bits
to a setting of binary 001 (0x05 & 0x03) instead of binary 101
when moving to SND_SOC_BIAS_PREPARE.
According to the datasheet 001 is a reserved value, so no idea
what it did, since the driver was working fine before I guess we
got lucky and it does something which is ok.
Fixes: 5e8351de74
("ASoC: add RT5670 CODEC driver")
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20200628155231.71089-3-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-06-29 20:37:19 +01:00
Dan Murphy
09ed395b05
ASoC: tas2562: Add voltage sense slot configuration
...
Add Vsense slot configuration based on the device tree. Adding this
property enables the slot programming to be moved to the tdm_set_slot
callback. This in affect sets the slots for the Isense and Vsense and
enabling this these modes are now based on whether these features were
powered on or not.
Signed-off-by: Dan Murphy <dmurphy@ti.com >
Link: https://lore.kernel.org/r/20200626154143.20351-3-dmurphy@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-06-29 18:48:54 +01:00
Dan Murphy
d7bd40ae55
ASoC: tas2562: Add right and left channel slot programming
...
Add programming for the tdm slots for the right and left. This also
requires configuring the RX/TX offsets for the DAI format type.
Signed-off-by: Dan Murphy <dmurphy@ti.com >
Link: https://lore.kernel.org/r/20200626154143.20351-1-dmurphy@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-06-29 18:48:53 +01:00
Tzung-Bi Shih
72ac4a4bef
ASoC: rt1015: add missing header inclusion
...
To fix compilation error:
error: implicit declaration of function 'ACPI_PTR'
[-Werror,-Wimplicit-function-declaration]
.acpi_match_table = ACPI_PTR(rt1015_acpi_match),
^
Adds the missing header "acpi.h" inclusion and sorts in alphabetical.
Signed-off-by: Tzung-Bi Shih <tzungbi@google.com >
Link: https://lore.kernel.org/r/20200625153543.85039-4-tzungbi@google.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-06-25 19:21:02 +01:00
Dan Murphy
c8294da2ed
ASoC: tas2562: Fix format issue for extra space before a comma
...
Fix the issue found that there is an extra space before a comma in the
volume control.
Fixes: bf726b1c86
("ASoC: tas2562: Add support for digital volume control")
Signed-off-by: Dan Murphy <dmurphy@ti.com >
Link: https://lore.kernel.org/r/20200624174932.9604-4-dmurphy@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-06-25 16:21:42 +01:00
Dan Murphy
bc07b54459
ASoC: tas2562: Update shutdown GPIO property
...
Update the shutdown GPIO property to be shutdown from shut-down.
Fixes: c173dba44c
("ASoC: tas2562: Introduce the TAS2562 amplifier")
Signed-off-by: Dan Murphy <dmurphy@ti.com >
Link: https://lore.kernel.org/r/20200624174932.9604-3-dmurphy@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-06-25 16:21:41 +01:00
Shuming Fan
9bc5fd71b6
ASoC: rt5682: fix the pop noise while OMTP type headset plugin
...
To turn the headphone output switch off during jack type detection, it
could avoid the pop noise when jack type switches to OMTP type.
Signed-off-by: Shuming Fan <shumingf@realtek.com >
Link: https://lore.kernel.org/r/20200623125312.27896-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-06-24 15:30:03 +01:00
Fred Oh
ee8a41cd30
ASoC: rt1011: fix KASAN out-of-bounds bug in find_next_bit()
...
KASAN throws the following warning in rt1011.c:
[ 170.777603] BUG: KASAN: stack-out-of-bounds in _find_next_bit.constprop.0+0x3e/0xf0
find_next_bit() relies on unsigned long pointer arguments, but this driver
uses a type cast that generates the KASAN warning. Replace find_next_bit()
and find_last_bit() with __ffs() and __fls() to pass the value and avoid
casting pointers to make the warning go away.
Signed-off-by: Fred Oh <fred.oh@linux.intel.com >
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com >
Link: https://lore.kernel.org/r/20200622151348.28063-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-06-23 12:54:11 +01:00
Mark Brown
39853b1438
Merge series "ASoC: merge snd_soc_component_read() and snd_soc_component_read32()" from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:
...
Hi Mark
Because we can use "read" function which is using
"regmap" or "driver", current ALSA SoC drivers are using both
snd_soc_component_read() // for regmap
snd_soc_component_read32() // for driver callback
These are similar but needs different parameter.
This patch aggressively merge snd_soc_component_read() and _read32(),
and makes snd_soc_component_read/write() as generally style.
New read doesn't return error if it failed,
thus, it can't keep compatibility,
but assuming it is not a big problem.
Because 1) it will indicate error message,
2) it can do nothing anyway if it fails "read".
[02/16] patch is not directly connected to read function merging,
but need to be apply after [01/16].
Kuninori Morimoto (16):
ASoC: soc-component: merge snd_soc_component_read() and snd_soc_component_read32()
ASoC: soc-component: use io_mutex correctly
ASoC: pxa: rename to snd_soc_component_read()
ASoC: atmel: rename to snd_soc_component_read()
ASoC: codecs: rename to snd_soc_component_read()
ASoC: codecs: wcd*: rename to snd_soc_component_read()
ASoC: codecs: tlv*: rename to snd_soc_component_read()
ASoC: codecs: max*: rename to snd_soc_component_read()
ASoC: codecs: msm*: rename to snd_soc_component_read()
ASoC: codecs: alc*: rename to snd_soc_component_read()
ASoC: codecs: wm*: rename to snd_soc_component_read()
ASoC: codecs: rt*: rename to snd_soc_component_read()
ASoC: codecs: da*: rename to snd_soc_component_read()
ASoC: codecs: cs*: rename to snd_soc_component_read()
ASoC: codecs: ak*: rename to snd_soc_component_read()
ASoC: remove snd_soc_component_read32()
include/sound/soc-component.h | 4 +-
sound/soc/atmel/atmel-pdmic.c | 4 +-
sound/soc/codecs/88pm860x-codec.c | 14 ++---
sound/soc/codecs/ab8500-codec.c | 8 +--
sound/soc/codecs/ad1980.c | 4 +-
sound/soc/codecs/ak4458.c | 2 +-
sound/soc/codecs/ak4535.c | 4 +-
sound/soc/codecs/ak4613.c | 4 +-
sound/soc/codecs/ak4671.c | 8 +--
sound/soc/codecs/alc5623.c | 6 +-
sound/soc/codecs/alc5632.c | 6 +-
sound/soc/codecs/arizona.c | 18 +++---
sound/soc/codecs/cs4270.c | 10 +--
sound/soc/codecs/cs42l42.c | 2 +-
sound/soc/codecs/cs42l51.c | 8 +--
sound/soc/codecs/cs42l73.c | 4 +-
sound/soc/codecs/cs47l35.c | 10 +--
sound/soc/codecs/cs47l85.c | 10 +--
sound/soc/codecs/da7210.c | 24 ++++----
sound/soc/codecs/da7213.c | 24 ++++----
sound/soc/codecs/da7218.c | 34 +++++------
sound/soc/codecs/da7219-aad.c | 16 ++---
sound/soc/codecs/da7219.c | 20 +++---
sound/soc/codecs/da732x.c | 18 +++---
sound/soc/codecs/da9055.c | 14 ++---
sound/soc/codecs/inno_rk3036.c | 6 +-
sound/soc/codecs/madera.c | 49 +++------------
sound/soc/codecs/max98088.c | 12 ++--
sound/soc/codecs/max98090.c | 20 +++---
sound/soc/codecs/max98095.c | 16 ++---
sound/soc/codecs/max9850.c | 2 +-
sound/soc/codecs/msm8916-wcd-analog.c | 14 ++---
sound/soc/codecs/msm8916-wcd-digital.c | 16 ++---
sound/soc/codecs/nau8822.c | 6 +-
sound/soc/codecs/rt1305.c | 2 +-
sound/soc/codecs/rt298.c | 2 +-
sound/soc/codecs/rt5616.c | 2 +-
sound/soc/codecs/rt5631.c | 32 +++++-----
sound/soc/codecs/rt5640.c | 10 +--
sound/soc/codecs/rt5645.c | 16 ++---
sound/soc/codecs/rt5651.c | 6 +-
sound/soc/codecs/rt5659.c | 14 ++---
sound/soc/codecs/rt5660.c | 2 +-
sound/soc/codecs/rt5663.c | 34 +++++------
sound/soc/codecs/rt5665.c | 16 ++---
sound/soc/codecs/rt5668.c | 16 ++---
sound/soc/codecs/rt5670.c | 18 +++---
sound/soc/codecs/rt5682-i2c.c | 2 +-
sound/soc/codecs/rt5682.c | 19 +++---
sound/soc/codecs/sgtl5000.c | 16 ++---
sound/soc/codecs/sta32x.c | 4 +-
sound/soc/codecs/tas2552.c | 4 +-
sound/soc/codecs/tas5720.c | 4 +-
sound/soc/codecs/tda7419.c | 9 +--
sound/soc/codecs/tlv320aic23.c | 14 ++---
sound/soc/codecs/tlv320aic26.c | 4 +-
sound/soc/codecs/tlv320aic32x4.c | 16 ++---
sound/soc/codecs/tlv320aic3x.c | 14 ++---
sound/soc/codecs/tscs42xx.c | 4 +-
sound/soc/codecs/tscs454.c | 24 ++------
sound/soc/codecs/wcd-clsh-v2.c | 2 +-
sound/soc/codecs/wcd9335.c | 48 +++++++--------
sound/soc/codecs/wcd934x.c | 52 ++++++++--------
sound/soc/codecs/wm2200.c | 4 +-
sound/soc/codecs/wm5100.c | 18 +++---
sound/soc/codecs/wm5110.c | 6 +-
sound/soc/codecs/wm8350.c | 32 +++++-----
sound/soc/codecs/wm8400.c | 50 +++++++--------
sound/soc/codecs/wm8510.c | 28 ++++-----
sound/soc/codecs/wm8523.c | 6 +-
sound/soc/codecs/wm8580.c | 12 ++--
sound/soc/codecs/wm8711.c | 8 +--
sound/soc/codecs/wm8728.c | 10 +--
sound/soc/codecs/wm8731.c | 6 +-
sound/soc/codecs/wm8750.c | 8 +--
sound/soc/codecs/wm8753.c | 42 ++++++-------
sound/soc/codecs/wm8770.c | 2 +-
sound/soc/codecs/wm8776.c | 2 +-
sound/soc/codecs/wm8804.c | 2 +-
sound/soc/codecs/wm8900.c | 22 +++----
sound/soc/codecs/wm8903.c | 20 +++---
sound/soc/codecs/wm8904.c | 16 ++---
sound/soc/codecs/wm8940.c | 32 +++++-----
sound/soc/codecs/wm8955.c | 2 +-
sound/soc/codecs/wm8958-dsp2.c | 18 +++---
sound/soc/codecs/wm8960.c | 20 +++---
sound/soc/codecs/wm8961.c | 58 +++++++++---------
sound/soc/codecs/wm8962.c | 31 +++++-----
sound/soc/codecs/wm8971.c | 8 +--
sound/soc/codecs/wm8974.c | 24 ++++----
sound/soc/codecs/wm8978.c | 12 ++--
sound/soc/codecs/wm8983.c | 8 +--
sound/soc/codecs/wm8985.c | 8 +--
sound/soc/codecs/wm8988.c | 12 ++--
sound/soc/codecs/wm8990.c | 18 +++---
sound/soc/codecs/wm8991.c | 38 ++++++------
sound/soc/codecs/wm8993.c | 28 ++++-----
sound/soc/codecs/wm8994.c | 60 +++++++++---------
sound/soc/codecs/wm8995.c | 16 ++---
sound/soc/codecs/wm8996.c | 30 ++++-----
sound/soc/codecs/wm8998.c | 8 +--
sound/soc/codecs/wm9081.c | 36 +++++------
sound/soc/codecs/wm9090.c | 4 +-
sound/soc/codecs/wm9713.c | 2 +-
sound/soc/codecs/wm_hubs.c | 30 ++++-----
sound/soc/fsl/fsl_audmix.c | 10 +--
sound/soc/fsl/fsl_easrc.c | 5 +-
sound/soc/meson/aiu-encoder-i2s.c | 3 +-
sound/soc/meson/aiu-fifo-i2s.c | 3 +-
sound/soc/meson/aiu-fifo.c | 3 +-
sound/soc/pxa/mioa701_wm9713.c | 8 +--
sound/soc/soc-ac97.c | 7 +--
sound/soc/soc-component.c | 84 ++++++++++++++------------
sound/soc/soc-dapm.c | 31 ++++------
sound/soc/soc-ops.c | 43 +++----------
115 files changed, 854 insertions(+), 963 deletions(-)
--
2.25.1
2020-06-22 15:36:06 +01:00
Vlad Karpovich
d6fea46e08
ASoC: wm_adsp: Add controls for calibration and diagnostic FW
...
Exposed additional mixer controls to select calibration or diagnostic
firmware.
'Calibration' --> chip-dsp<id>-spk-cali.wmfw (.bin)
'Diagnostic' --> chip-dsp<id>-spk-diag.wmfw (.bin)
Signed-off-by: Vlad Karpovich <Vlad.Karpovich@cirrus.com >
Signed-off-by: David Rhodes <david.rhodes@cirrus.com >
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com >
Link: https://lore.kernel.org/r/20200619212651.2739-1-david.rhodes@cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-06-22 15:36:05 +01:00
Kuninori Morimoto
8a6fc33ba6
ASoC: codecs: ak*: rename to snd_soc_component_read()
...
We need to use snd_soc_component_read()
instead of snd_soc_component_read32()
This patch renames _read32() to _read()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com >
Link: https://lore.kernel.org/r/878sgn4mc0.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-06-22 15:13:49 +01:00
Kuninori Morimoto
a11f8a1c33
ASoC: codecs: cs*: rename to snd_soc_component_read()
...
We need to use snd_soc_component_read()
instead of snd_soc_component_read32()
This patch renames _read32() to _read()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com >
Link: https://lore.kernel.org/r/87a7134mc4.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-06-22 15:13:48 +01:00
Kuninori Morimoto
2925b58209
ASoC: codecs: da*: rename to snd_soc_component_read()
...
We need to use snd_soc_component_read()
instead of snd_soc_component_read32()
This patch renames _read32() to _read()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com >
Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com >
Link: https://lore.kernel.org/r/87bllj4mc8.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-06-22 15:13:47 +01:00
Kuninori Morimoto
467a2553dd
ASoC: codecs: rt*: rename to snd_soc_component_read()
...
We need to use snd_soc_component_read()
instead of snd_soc_component_read32()
This patch renames _read32() to _read()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com >
Link: https://lore.kernel.org/r/87d05z4mce.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-06-22 15:13:46 +01:00
Kuninori Morimoto
6d75dfc3e8
ASoC: codecs: wm*: rename to snd_soc_component_read()
...
We need to use snd_soc_component_read()
instead of snd_soc_component_read32()
This patch renames _read32() to _read()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com >
Link: https://lore.kernel.org/r/87eeqf4mcl.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-06-22 15:13:45 +01:00
Kuninori Morimoto
e896c1ed67
ASoC: codecs: alc*: rename to snd_soc_component_read()
...
We need to use snd_soc_component_read()
instead of snd_soc_component_read32()
This patch renames _read32() to _read()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com >
Link: https://lore.kernel.org/r/87ftav4md9.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-06-22 15:13:44 +01:00
Kuninori Morimoto
a6f80d99b9
ASoC: codecs: msm*: rename to snd_soc_component_read()
...
We need to use snd_soc_component_read()
instead of snd_soc_component_read32()
This patch renames _read32() to _read()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com >
Link: https://lore.kernel.org/r/87h7vb4mdf.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-06-22 15:13:43 +01:00
Kuninori Morimoto
1227f601ba
ASoC: codecs: max*: rename to snd_soc_component_read()
...
We need to use snd_soc_component_read()
instead of snd_soc_component_read32()
This patch renames _read32() to _read()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com >
Link: https://lore.kernel.org/r/87imfr4mdl.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-06-22 15:13:43 +01:00
Kuninori Morimoto
e348cf5434
ASoC: codecs: tlv*: rename to snd_soc_component_read()
...
We need to use snd_soc_component_read()
instead of snd_soc_component_read32()
This patch renames _read32() to _read()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com >
Link: https://lore.kernel.org/r/87k1074mds.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-06-22 15:13:42 +01:00
Kuninori Morimoto
eaf2767cad
ASoC: codecs: wcd*: rename to snd_soc_component_read()
...
We need to use snd_soc_component_read()
instead of snd_soc_component_read32()
This patch renames _read32() to _read()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com >
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org >
Link: https://lore.kernel.org/r/87lfkn4mdy.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-06-22 15:13:41 +01:00
Kuninori Morimoto
981abdfe99
ASoC: codecs: rename to snd_soc_component_read()
...
We need to use snd_soc_component_read()
instead of snd_soc_component_read32()
This patch renames _read32() to _read()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com >
Link: https://lore.kernel.org/r/87mu534me5.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-06-22 15:13:40 +01:00
Kuninori Morimoto
cf6e26c71b
ASoC: soc-component: merge snd_soc_component_read() and snd_soc_component_read32()
...
We had read/write function for Codec, Platform, etc,
but these has been merged into snd_soc_component_read/write().
Internally, it is using regmap or driver function.
In read case, each styles are like below
regmap
ret = regmap_read(..., reg, &val);
driver function
val = xxx->read(..., reg);
Because of this kind of different style, to keep same read style,
when we merged each read function into snd_soc_component_read(),
we created snd_soc_component_read32(), like below.
commit 738b49efe6
("ASoC: add snd_soc_component_read32")
(1) val = snd_soc_component_read32(component, reg);
(2) ret = snd_soc_component_read(component, reg, &val);
Many drivers are using snd_soc_component_read32(), and
some drivers are using snd_soc_component_read() today.
In generally, we don't check read function successes,
because, we will have many other issues at initial timing
if read function didn't work.
Now we can use soc_component_err() when error case.
This means, it is easy to notice if error occurred.
This patch aggressively merge snd_soc_component_read() and _read32(),
and makes snd_soc_component_read/write() as generally style.
This patch do
1) merge snd_soc_component_read() and snd_soc_component_read32()
2) it uses soc_component_err() when error case (easy to notice)
3) keeps read32 for now by #define
4) update snd_soc_component_read() for all drivers
Because _read() user drivers are not too many, this patch changes
all user drivers.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com >
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Link: https://lore.kernel.org/r/87sgev4mfl.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-06-22 15:13:36 +01:00
Takashi Iwai
91ef3d9f9f
Merge tag 'asoc-fix-v5.8-rc2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
...
ASoC: Fixes for v5.8
This is a collection of mostly small fixes, mostly fixing fallout from
some of the DPCM changes that went in last time around which shook out
some issues on i.MX and Qualcomm platforms. The addition of a managed
version of snd_soc_register_dai() is to fix resource leaks.
There's also a few new device IDs for x86 systems.
2020-06-22 13:49:14 +02:00
Pierre-Louis Bossart
a94eaccefe
ASoC: hdac_hda: fix memleak with regmap not freed on remove
...
kmemleak throws error reports on module load/unload tests, add
snd_hdac_regmap_exit() in .remove().
While we are at it, also fix the error handling flow in .probe() to
use snd_hdac_regmap_exit() if needed.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Reviewed-by: Daniel Baluta <daniel.baluta@gmail.com >
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Reviewed-by: Rander Wang <rander.wang@linux.intel.com >
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com >
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com >
Link: https://lore.kernel.org/r/20200617164144.17859-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-06-17 20:28:30 +01:00
Jack Yu
668b1508cf
ASoC: rt1015: Flush DAC data before playback.
...
Flush DAC data before playback.
Signed-off-by: Jack Yu <jack.yu@realtek.com >
Link: https://lore.kernel.org/r/20200616023644.4523-1-jack.yu@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-06-16 12:39:33 +01:00
Mark Brown
c42d8c17a9
Merge series "ASoC: max98357a: support MAX98360A in OF" from Tzung-Bi Shih <tzungbi@google.com>:
...
Commit 1a0f2433d7
("ASoC: max98357a: Add ACPI HID MAX98360A") supports
MAX98360A in ACPI world. This series supports MAX98360A in OF world.
Tzung-Bi Shih (2):
ASoC: max98357a: add compatible string for MAX98360A
ASoC: dt-bindings: add compatible string for MAX98360A
.../devicetree/bindings/sound/max98357a.txt | 12 +++++++++---
sound/soc/codecs/max98357a.c | 1 +
2 files changed, 10 insertions(+), 3 deletions(-)
--
2.27.0.278.ge193c7cf3a9-goog
2020-06-15 20:58:44 +01:00
Mark Brown
ba05f17965
Merge series "ASoC: mediatek: mt6358: support DMIC one-wire mode" from Jiaxin Yu <jiaxin.yu@mediatek.com>:
...
v2 changes:
1. Uses a DT property to select DMIC mode instead of a mixer control.
v1 changes:
1. Uses a mixer control to select DMIC mode.
2. patchwork list:
https://patchwork.kernel.org/patch/11578309
Jiaxin Yu (2):
ASoC: mediatek: mt6358: support DMIC one-wire mode
ASoC: dt-bindings: mediatek: mt6358: add dmic-mode property
Documentation/devicetree/bindings/sound/mt6358.txt | 6 ++++++
sound/soc/codecs/mt6358.c | 23 +++++++++++++++++++++-
2 files changed, 28 insertions(+), 1 deletion(-)
--
1.8.1.1.dirty
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
2020-06-15 20:58:43 +01:00
Steve Lee
9ba4af79c9
ASoC: max98390: Add Amp init common setting func.
...
Add amp common init function to gather common init setting and finaize.
- add max98390_init_regs func
- move amp setting to max98390_init_regs func.
- removed unneceary setting and finalize common register values.
Signed-off-by: Steve Lee <steves.lee@maximintegrated.com >
Link: https://lore.kernel.org/r/20200611094718.18371-1-steves.lee@maximintegrated.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-06-15 20:58:40 +01:00
derek.fang
fde418b61d
ASoC: rt5682: DAI wclk supports 44100 Hz output
...
DAI Wclk of rt5682 only supports 48000Hz output so far,
this patch lets it support 44100Hz.
Signed-off-by: derek.fang <derek.fang@realtek.com >
Link: https://lore.kernel.org/r/1591938925-1070-4-git-send-email-derek.fang@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-06-15 20:58:38 +01:00
derek.fang
d54348fbef
ASoC: rt5682: Let PLL2 support the freq conversion for 44100Hz sample rate
...
PLL2 of rt5682 only supports the freq conversion for 48000Hz
sample rate so far, this patch lets it support 44100Hz.
Signed-off-by: derek.fang <derek.fang@realtek.com >
Link: https://lore.kernel.org/r/1591938925-1070-3-git-send-email-derek.fang@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-06-15 20:58:37 +01:00
derek.fang
8d8efecb28
ASoC: rl6231: Add new supports on rl6231
...
Add pll preset maps for Realtek codecs' PLL2 freq conversions.
Signed-off-by: derek.fang <derek.fang@realtek.com >
Link: https://lore.kernel.org/r/1591938925-1070-2-git-send-email-derek.fang@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-06-15 20:58:36 +01:00
Shengjiu Wang
c9015a1723
ASoC: wm8960: Support headphone jack detection function
...
Add two platform variables for headphone jack detection.
"hp_cfg" is for configuration of heaphone jack detection.
"gpio_cfg" is for configuration of gpio, the gpio is used
for plug & unplug interrupt on SoC.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com >
Link: https://lore.kernel.org/r/1591180013-12416-2-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-06-15 20:58:33 +01:00
Fuqian Huang
c01db8b00d
ASoC: wm0010: Use kmemdup rather than duplicating its implementation
...
kmemdup is introduced to duplicate a region of memory in a neat way.
Rather than kmalloc/kzalloc + memcpy, which the programmer needs to
write the size twice (sometimes lead to mistakes), kmemdup improves
readability, leads to smaller code and also reduce the chances of mistakes.
Suggestion to use kmemdup rather than using kmalloc/kzalloc + memcpy.
Signed-off-by: Fuqian Huang <huangfq.daxian@gmail.com >
Acked-by: Richard Fitzgerald <rf@opensource.cirrus.com >
Link: https://lore.kernel.org/r/20190703163224.1029-1-huangfq.daxian@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-06-15 20:58:29 +01:00
Jiaxin Yu
c46fc80094
ASoC: mediatek: mt6358: support DMIC one-wire mode
...
Supports DMIC one-wire mode. Uses a DT property "dmic-mode" to select.
Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com >
Link: https://lore.kernel.org/r/1591353222-18576-2-git-send-email-jiaxin.yu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-06-15 19:16:49 +01:00
Tzung-Bi Shih
3aad07b87a
ASoC: max98357a: add compatible string for MAX98360A
...
Maxim MAX98360A audio amplifier is functionally identical to MAX98357A.
Adds compatible string "maxim,max98360a" for driver reuse.
Signed-off-by: Tzung-Bi Shih <tzungbi@google.com >
Link: https://lore.kernel.org/r/20200605034931.107713-2-tzungbi@google.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-06-15 16:44:03 +01:00
Mark Brown
17212e7188
Merge existing fixes from asoc/for-5.8
2020-06-15 16:15:44 +01:00
Jack Yu
e74a1e7eae
ASoC: rt1015: Update rt1015 default register value according to spec modification.
...
Update rt1015 default register value according to spec modification.
Signed-off-by: Jack Yu <jack.yu@realtek.com >
Link: https://lore.kernel.org/r/20200615032433.31061-1-jack.yu@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-06-15 15:18:33 +01:00
derek.fang
19ab0f005b
ASoC: rt5682: Let dai clks be registered whether mclk exists or not
...
According to ideal rt5682 CCF, the root clk is mclk.
But in some platforms, mclk is not exported to CCF.
In this condition, rt5682_register_dai_clks will not be called.
This patch lets dai clks could be registered whether mclk exists or not.
Signed-off-by: derek.fang <derek.fang@realtek.com >
Link: https://lore.kernel.org/r/1591938925-1070-5-git-send-email-derek.fang@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-06-15 15:18:29 +01:00
Steve Lee
4008b29eb4
ASoC: max98390: Update regmap readable reg and volatile
...
Update max98390_readable_register and max98390_volatile_reg
Signed-off-by: Steve Lee <steves.lee@maximintegrated.com >
Link: https://lore.kernel.org/r/20200611094800.18422-1-steves.lee@maximintegrated.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-06-11 15:39:30 +01:00
Takashi Iwai
a4f55d927d
Merge tag 'asoc-fix-v5.8' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
...
ASoC: Fixes for v5.8
A small pile of fixes that came in during the merge window, the DPCM
fixes from Pierre are the most notable thing here.
2020-06-10 15:40:49 +02:00
Hans de Goede
79d4f823a0
ASoC: rt5645: Add platform-data for Asus T101HA
...
The Asus T101HA uses the default jack-detect mode 3, but instead of
using an analog microphone it is using a DMIC on dmic-data-pin 1,
like the Asus T100HA. Note unlike the T100HA its jack-detect is not
inverted.
Add a DMI quirk with the correct settings for this model.
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Link: https://lore.kernel.org/r/20200608204634.93407-2-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-06-09 15:46:19 +01:00
Steve Lee
97ed3e509e
ASoC: max98390: Fix potential crash during param fw loading
...
malformed firmware file can cause out-of-bound access and crash
during dsm_param bin loading.
- add MIN/MAX param size to avoid out-of-bound access.
- read start addr and size of param and check bound.
- add condition that fw->size > param_size + _PAYLOAD_OFFSET
to confirm enough data.
Signed-off-by: Steve Lee <steves.lee@maximintegrated.com >
Link: https://lore.kernel.org/r/20200604054731.21140-1-steves.lee@maximintegrated.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-06-04 15:04:30 +01:00
Takashi Iwai
678916ec54
ASoC: max98390: Fix incorrect printf qualifier
...
This patch addresses a compile warning:
sound/soc/codecs/max98390.c:781:3: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘size_t {aka const unsigned int}’ [-Wformat=]
Fixes: a6e3f4f34c
("ASoC: max98390: Added Amplifier Driver")
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Acked-by: Mark Brown <broonie@kernel.org >
Link: https://lore.kernel.org/r/20200602164453.29925-1-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-06-04 14:42:31 +01:00
Oder Chiou
d605cbb642
ASoC: rl6231: Modify the target DMIC clock rate
...
Some DMIC components will not work correctly in the clock rate 3.072MHz.
We recommend the clock rate 1.536MHz in the gerenal case.
Signed-off-by: Oder Chiou <oder_chiou@realtek.com >
Link: https://lore.kernel.org/r/20200604071016.3981-1-oder_chiou@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-06-04 14:42:29 +01:00
Takashi Iwai
7318234c8d
Merge tag 'asoc-v5.8' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
...
ASoC: Updates for v5.8
This has been another very active release with a bunch of new drivers,
lots of fixes everywhere and continued core improvements from
Morimoto-san:
- Lots of core cleanups and refactorings from Morimoto-san, factoring
out common operations and making the card abstraction more solid.
- Continued work on cleaning up and improving the Intel drivers, along
with some new platform support for them.
- Fixes to make the Marvell SSPA driver work upstream.
- Support for AMD Renoir ACP, Dialog DA7212, Freescale EASRC and
i.MX8M, Intel Elkhard Lake, Maxim MAX98390, Nuvoton NAU8812 and
NAU8814 and Realtek RT1016.
2020-06-01 20:26:07 +02:00
Mark Brown
358c7c61fd
Merge remote-tracking branch 'asoc/for-5.8' into asoc-linus
2020-06-01 13:01:15 +01:00
derek.fang
2aec8ccc1a
ASoC: rt1015: Enable class-D silence and clock detections
...
Avoid noise under bypass boost mode.
Signed-off-by: derek.fang <derek.fang@realtek.com >
Link: https://lore.kernel.org/r/1590750310-30085-1-git-send-email-derek.fang@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-05-29 13:30:06 +01:00
Chuhong Yuan
8dc1011470
ASoC: sta32x: add missed function calls in error paths
...
sta32x_probe() forgets to call undo functions when it fails, add
the missed function calls to fix it.
Signed-off-by: Chuhong Yuan <hslester96@gmail.com >
Link: https://lore.kernel.org/r/20200528102004.911653-1-hslester96@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-05-28 13:20:20 +01:00
Arnd Bergmann
a50067d4f3
ASoC: rt5682: split i2c driver into separate module
...
With SND_SOC_AMD_RV_RT5682_MACH using the i2c version of the
driver, we can easily get a build failure when I2C is built-in
but soundwire is not:
WARNING: unmet direct dependencies detected for SND_SOC_RT5682
Depends on [m]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && (I2C [=y] || SOUNDWIRE [=m]) && (SOUNDWIRE [=m] || !SOUNDWIRE [=m]) && (I2C [=y] || !I2C [=y])
Selected by [y]:
- SND_SOC_AMD_RV_RT5682_MACH [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SND_SOC_AMD_ACP3x [=y] && I2C [=y] && CROS_EC [=y]
Selected by [m]:
- SND_SOC_RT5682_SDW [=m] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SOUNDWIRE [=m] && (I2C [=y] || !I2C [=y])
Rework the driver to have three separate modules, with the
main driver just dealing with the common bits and the actual
initialization as part of i2c and sdw specific modules.
The conversion is fairly mechanical to keep it easy to review,
i.e. it moves code around with the minimal required renaming
and changes.
Fixes: 6b8e4e7db3
("ASoC: amd: Add machine driver for Raven based platform")
Fixes: fd443a20c2
("ASoC: rt5682: fix I2C/Soundwire dependencies")
Signed-off-by: Arnd Bergmann <arnd@arndb.de >
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Link: https://lore.kernel.org/r/20200528091851.2889754-1-arnd@arndb.de
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-05-28 13:20:19 +01:00