- 20 6月, 2019 1 次提交
-
-
由 Richard Fitzgerald 提交于
The Cirrus Logic Madera codecs are a family of related codecs with extensive digital and analogue I/O, digital mixing and routing, signal processing and programmable DSPs. This patch adds common support code shared by all Madera codecs. This patch also adds the pdata to the parent mfd pdata struct. Since there is a circular build dependency it's convenient to patch them both atomically. Signed-off-by: NNariman Poushin <nariman@opensource.cirrus.com> Signed-off-by: NNikesh Oswal <Nikesh.Oswal@cirrus.com> Signed-off-by: NPiotr Stankiewicz <piotrs@opensource.cirrus.com> Signed-off-by: NAjit Pandey <ajit.pandey@incubesol.com> Signed-off-by: NRichard Fitzgerald <rf@opensource.cirrus.com> Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 19 6月, 2019 2 次提交
-
-
由 Ben Zhang 提交于
The rt5677 driver writes to the IRQ control register within the IRQ handler in order to flip the polarity of the interrupts that have been signalled. If an interrupt fires in the interval between the regmap_read and the regmap_write, it will not trigger a new call to rt5677_irq. Add a bounded loop to rt5677_irq that keeps checking interrupts until none are seen, so that any interrupts that are signalled in that interval are correctly handled. Signed-off-by: NBen Zhang <benzh@chromium.org> Signed-off-by: NFletcher Woodruff <fletcherw@chromium.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Ben Zhang 提交于
The rt5677 jack detection function has a requirement that the polarity of an interrupt be flipped after it fires in order to clear the interrupt. This patch implements an irq_chip with irq_domain directly instead of using regmap-irq, so that interrupt source line polarities can be flipped in the irq handler. The reason that this patch does not add this feature within regmap-irq is that future patches will add hotword detection support to this irq handler. Those patches will require adding additional logic that would not make sense to have in regmap-irq. Signed-off-by: NBen Zhang <benzh@chromium.org> Signed-off-by: NFletcher Woodruff <fletcherw@chromium.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 17 6月, 2019 3 次提交
-
-
由 Fletcher Woodruff 提交于
This patch moves the code to select the gpios for jack detection from rt5677_probe to rt5677_init_irq (called from rt5677_i2c_probe). It also sets some registers to fix bugs related to jack detection, and adds some constants and comments to make it easier to understand what certain register settings are controlling. Signed-off-by: NBen Zhang <benzh@chromium.org> Signed-off-by: NFletcher Woodruff <fletcherw@chromium.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Fletcher Woodruff 提交于
The rt5677 driver uses ACPI-style property names to read from the device API. However, these do not match the property names in _DSD used on the Chromebook Pixel 2015, which are closer to the Device Tree style. Unify the two functions for reading from the device API so that they try ACPI-style names first and fall back to the DT names on error. With this patch, plugging and unplugging the headphone jack switches between headphones and speakers automatically. Signed-off-by: NFletcher Woodruff <fletcherw@chromium.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Arnd Bergmann 提交于
While the suspend function is already marked __maybe_unused, the resume function is not, which leads to a warning when CONFIG_PM is disabled: sound/soc/codecs/cx2072x.c:1625:12: error: unused function 'cx2072x_runtime_resume' [-Werror,-Wunused-function] Mark this one like the other one. Fixes: a497a436 ("ASoC: Add support for Conexant CX2072X CODEC") Signed-off-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 14 6月, 2019 2 次提交
-
-
由 Greg Kroah-Hartman 提交于
When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: NRichard Fitzgerald <rf@opensource.cirrus.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Nathan Huckleberry 提交于
Clang produces the following warning sound/soc/codecs/tas571x.c:666:38: warning: unused variable 'tas5721_controls' [-Wunused-const-variable] In the chip struct definition tas5711_controls is used rather than tac5712_controls. Looks like a typo was made in the original commit. Since tac5711_controls is identical to tas5721_controls we can just swap them Cc: clang-built-linux@googlegroups.com Link: https://github.com/ClangBuiltLinux/linux/issues/522Signed-off-by: NNathan Huckleberry <nhuck@google.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 12 6月, 2019 1 次提交
-
-
由 David Lin 提交于
The driver selects the proper BCLK divide through the BCLK and FS at the hardware parameter when the I2S master mode. Signed-off-by: NDavid Lin <CTLIN0@nuvoton.com> Signed-off-by: NJohn Hsu <KCHSU0@nuvoton.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 07 6月, 2019 4 次提交
-
-
由 Srinivas Kandagatla 提交于
This patch adds sidetone support via one of the 3 RX Mix paths using IIR1 and IIR2. IIR1 can be feed by any Decimators or RX paths, and IIRx can also be looped back to RX mixers to provide sidetone functionality. Two IIR filters are used for Side tone equalization and each filter is 5 stage. Signed-off-by: NSrinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Shuming Fan 提交于
This patch fixes following issues: - warning: this decimal constant is unsigned only in ISO C90 - sparse: incorrect type in assignment - check if value.integer.value is zero for "R0 Load Mode" control Signed-off-by: NShuming Fan <shumingf@realtek.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Nathan Chancellor 提交于
Clang warns: sound/soc/codecs/rt1011.c:1291:12: warning: integer literal is too large to be represented in type 'long', interpreting as 'unsigned long' per C89; this literal will have type 'long long' in C99 onwards [-Wc99-compat] format = 2147483648; /* 2^24 * 128 */ ^ sound/soc/codecs/rt1011.c:2123:13: warning: integer literal is too large to be represented in type 'long', interpreting as 'unsigned long' per C89; this literal will have type 'long long' in C99 onwards [-Wc99-compat] format = 2147483648; /* 2^24 * 128 */ ^ 2 warnings generated. Mark the integer literals as unsigned explicitly so that if the kernel does ever bump the C standard it uses, the behavior is consitent. Fixes: d6e65bb7 ("ASoC: rt1011: Add RT1011 amplifier driver") Link: https://github.com/ClangBuiltLinux/linux/issues/506Signed-off-by: NNathan Chancellor <natechancellor@gmail.com> Reviewed-by: NNick Desaulniers <ndesaulniers@google.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Amadeusz Sławiński 提交于
When we call snd_soc_component_set_jack(component, NULL, NULL) we should set rt274->jack to passed jack, so when interrupt is triggered it calls snd_soc_jack_report(rt274->jack, ...) with proper value. This fixes problem in machine where in register, we call snd_soc_register(component, &headset, NULL), which just calls rt274_mic_detect via callback. Now when machine driver is removed "headset" will be gone, so we need to tell codec driver that it's gone with: snd_soc_register(component, NULL, NULL), but we also need to be able to handle NULL jack argument here gracefully. If we don't set it to NULL, next time the rt274_irq runs it will call snd_soc_jack_report with first argument being invalid pointer and there will be Oops. Signed-off-by: NAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 04 6月, 2019 5 次提交
-
-
由 Yu-Hsuan Hsu 提交于
The supported formats are S16_LE and S24_LE now. However, by datasheet of max98090, S24_LE is only supported when it is in the right justified mode. We should remove 24-bit format if it is not in that mode to avoid triggering error. Signed-off-by: NYu-Hsuan Hsu <yuhsuan@chromium.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Peter Ujfalusi 提交于
Initially we only going to care about the slot_width as for example DSP_A/B needs 32 bclk per slots and to be able to use TDM mode the codec (and CPU) needs to use DSP_A/B modes. Signed-off-by: NPeter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 YueHaibing 提交于
Fixes gcc '-Wunused-but-set-variable' warning: sound/soc/codecs/cx2072x.c: In function cx2072x_config_i2spcm: sound/soc/codecs/cx2072x.c:679:6: warning: variable is_right_j set but not used [-Wunused-but-set-variable] It's never used and can be removed. Signed-off-by: NYueHaibing <yuehaibing@huawei.com> Reviewed-by: NTakashi Iwai <tiwai@suse.de> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Shuming Fan 提交于
This is the initial amplifier driver for rt1011. Signed-off-by: NShuming Fan <shumingf@realtek.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Kovács Tamás 提交于
This tablet has an incorrect acpi identifier just like Thinkpad10 tablet, which is why it is trying to load the RT5640 driver instead of the RT5762 driver. The RT5640 driver, on the other hand, checks the hardware ID, so no driver are loaded during boot. This fix resolves to load the RT5672 driver on this tablet during boot. It also provides the correct IO configuration, like the jack detect mode 3, for 1.8V pullup. I would like to thank Pierre-Louis Bossart for helping with this patch. Signed-off-by: NKovács Tamás <kepszlok@zohomail.eu> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 30 5月, 2019 1 次提交
-
-
由 Curtis Malainey 提交于
Most of the voice activation definitions were missing, they will be needed for when hotwording is added. Also the source bits are only 2 wide not 3 and needed to be corrected. Signed-off-by: NCurtis Malainey <cujomalainey@chromium.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 29 5月, 2019 2 次提交
-
-
由 Shengjiu Wang 提交于
config: x86_64-randconfig-x000201921-201921 compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: make ARCH=x86_64 sound/soc/codecs/cs42xx8.c: In function ‘cs42xx8_probe’: sound/soc/codecs/cs42xx8.c:472:25: error: implicit declaration of function ‘devm_gpiod_get_optional’; did you mean ‘devm_clk_get_optional’? [-Werror=implicit-function-declaration] cs42xx8->gpiod_reset = devm_gpiod_get_optional(dev, "reset", ^~~~~~~~~~~~~~~~~~~~~~~ devm_clk_get_optional sound/soc/codecs/cs42xx8.c:473:8: error: ‘GPIOD_OUT_HIGH’ undeclared (first use in this function); did you mean ‘GPIOF_INIT_HIGH’? GPIOD_OUT_HIGH); ^~~~~~~~~~~~~~ GPIOF_INIT_HIGH sound/soc/codecs/cs42xx8.c:473:8: note: each undeclared identifier is reported only once for each function it appears in sound/soc/codecs/cs42xx8.c:477:2: error: implicit declaration of function ‘gpiod_set_value_cansleep’; did you mean ‘gpio_set_value_cansleep’? [-Werror=implicit-function-declaration] gpiod_set_value_cansleep(cs42xx8->gpiod_reset, 0); ^~~~~~~~~~~~~~~~~~~~~~~~ gpio_set_value_cansleep Fixes: bfe95dfa ("ASoC: cs42xx8: Add reset gpio handling") Reported-by: Nkbuild test robot <lkp@intel.com> Signed-off-by: NShengjiu Wang <shengjiu.wang@nxp.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Gen Zhang 提交于
In wcd9335_codec_enable_dec(), 'widget_name' is allocated by kstrndup(). However, according to doc: "Note: Use kmemdup_nul() instead if the size is known exactly." So we should use kmemdup_nul() here instead of kstrndup(). Signed-off-by: NGen Zhang <blackgod016574@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 28 5月, 2019 4 次提交
-
-
由 Colin Ian King 提交于
There is a spelling mistake in a dev_err error message. Fit it. Signed-off-by: NColin Ian King <colin.king@canonical.com> Reviewed-by: NTakashi Iwai <tiwai@suse.de> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Colin Ian King 提交于
In the case where frac_div larger than 96 the result of an unsigned multiplication overflows an unsigned int. For example, this can happen when the sample_rate is 192000 and pll_input is 122. Fix this by casing the first term of the mutiply to a u64. Also remove the extraneous parentheses around the expression. Addresses-Coverity: ("Unintentional integer overflow") Fixes: a497a436 ("ASoC: Add support for Conexant CX2072X CODEC") Signed-off-by: NColin Ian King <colin.king@canonical.com> Reviewed-by: NTakashi Iwai <tiwai@suse.de> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Maxime Jourdan 提交于
The SEI510 board features a standalone MAX98357A codec. Add a tristate prompt to allow selecting the codec. Signed-off-by: NMaxime Jourdan <mjourdan@baylibre.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Colin Ian King 提交于
Variable pulse_len is being initialized to 1 however this value is never read and pulse_len is being re-assigned later in a switch statement. Clean up the code by removing the redundant initialization. Addresses-Coverity: ("Unused value") Signed-off-by: NColin Ian King <colin.king@canonical.com> Reviewed-by: NTakashi Iwai <tiwai@suse.de> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 22 5月, 2019 1 次提交
-
-
由 Simon Ho 提交于
Initial commit of the Conexant CX2072X CODEC driver. Some features are not present. The CX2072X is a ultra low power stereo audio codec supports I2S/TDM host interface with EQ, DRC features in playback mode. Featues of CX2072X codec: * Two 24 bits DACs and DACs. * Stereo Headphone AMP. * 2.8W per channel class-D output. * Integrated seven bands per channel EQ and DRC. * Fully integrated headset support with detect/switch. * Stereo digital microphone for array applications. * S/PDIF output. * Bi-directional GPIOs. * Support analog and digital PC Beeep. * One headset button support. * Supports a wide variety of host interfaces. -wide variety of I2S and similar bit-stream formats with word lengths of up to 24 bits. -TDM stream supports up to 4 channels. * AEC loopback support. Further fixes by tiwai: * Rebase to 5.2+ * Missing DAPM entry definitions * Missing power hooks * Fix uninitialized variable warning * Rewrite jack detection stuff to use set_jack callback * Plumbing jack detection code for Intel ASoC * Move clk management into runtime PM * Drop incorrect regcache usages * Drop untested stuff: OF table, EQ/DRC handling * Lots of code cleanups and minor refactoring The OF code was dropped due to the lack of testability. It should be easy to re-add once if someone can test it. v1->v2: No change v2->v3: Move register tables to appropriate place Remove some confusing codes Set snd_ctl_boolean_* helpers directly Fix EQ put callback Rename to "DAC1 Switch" from "DAC1 Mute Switch" Drop superfluous regmap calls at shutdown Avoid regmap_register_patch() Add missing register definitions Fix register access on big-endian machine Remove regcache messes v3->v4: Fix the wrong endianess conversion in reg write Minor code cleanups v4->v5: Move clk management to runtime PM Sparse warning fixes Some more code simplification Drop tricky regcache fiddling Apply mutex locks around possible racy sequences Move exported jack detection stuff into set_jack callback v5->v6: Drop buggy&untested EQ and DRC codes Lots of code reduction/cleanup Add more comments about platform-specific stuff Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=115531Signed-off-by: NSimon Ho <simon.ho@conexant.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 20 5月, 2019 1 次提交
-
-
由 Curtis Malainey 提交于
There is a case when a we want to read a large number of bytes that require a burst but is not a multiple of the word size (8). When this happens rt5677_spi_reverse will run off the end of the buffer. The solution is to tell spi_reverse the actual size of the destination and stop if we reach it even if we have data left that we read. Cc: Ben Zhang <benzh@chromium.org> Signed-off-by: NCurtis Malainey <cujomalainey@chromium.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 17 5月, 2019 3 次提交
-
-
由 Saravanan Sekar 提交于
Add support to output level control for the analog high power output drivers HPOUT and HPCOM. Signed-off-by: NSaravanan Sekar <sravanhome@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 S.j. Wang 提交于
Handle the reset GPIO and reset the device every time we start it. Signed-off-by: NShengjiu Wang <shengjiu.wang@nxp.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 S.j. Wang 提交于
Add regcache_mark_dirty before regcache_sync for power of codec may be lost at suspend, then all the register need to be reconfigured. Fixes: 0c516b4f ("ASoC: cs42xx8: Add codec driver support for CS42448/CS42888") Cc: <stable@vger.kernel.org> Signed-off-by: NShengjiu Wang <shengjiu.wang@nxp.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 13 5月, 2019 5 次提交
-
-
由 Viorel Suman 提交于
snd_soc_component_update_bits() may return 1 if operation was successful and the value of the register changed. Return a non-zero in ak4458_rstn_control for an error only. Signed-off-by: NShengjiu Wang <shengjiu.wang@nxp.com> Signed-off-by: NViorel Suman <viorel.suman@nxp.com> Reviewed-by: NDaniel Baluta <daniel.baluta@nxp.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Jerome Brunet 提交于
Replace the bit atomic operations by a mutex to ensure only one dai at a time is active on the hdmi codec. This is a follow up on change: 3fcf94ef ("ASoC: hdmi-codec: remove reference to the current substream") Suggested-by: NMark Brown <broonie@kernel.org> Signed-off-by: NJerome Brunet <jbrunet@baylibre.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Tzung-Bi Shih 提交于
devm_gpiod_get_optional() returns EBUSY after component rebound. Request GPIO in max98357a_platform_probe() to support component rebinding. Signed-off-by: NTzung-Bi Shih <tzungbi@google.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Viorel Suman 提交于
AK4458 is probed successfully even if AK4458 is not present - this is caused by probe function returning no error on i2c access failure. Return an error on probe if i2c access has failed. Signed-off-by: NShengjiu Wang <shengjiu.wang@nxp.com> Signed-off-by: NViorel Suman <viorel.suman@nxp.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Matt Flax 提交于
The cs4265_readable_register function stopped short of the maximum register. An example bug is taken from : https://github.com/Audio-Injector/Ultra/issues/25 Where alsactl store fails with : Cannot read control '2,0,0,C Data Buffer,0': Input/output error This patch fixes the bug by setting the cs4265 to have readable registers up to the maximum hardware register CS4265_MAX_REGISTER. Signed-off-by: NMatt Flax <flatmax@flatmax.org> Reviewed-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 08 5月, 2019 5 次提交
-
-
由 Jerome Brunet 提交于
The dependency on the dai_id can be removed by setting different ops for the i2s and spdif dai and storing the dai format information in each dai structure. It simplies the code a bit. Signed-off-by: NJerome Brunet <jbrunet@baylibre.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Jerome Brunet 提交于
Keeping the a pointer to the dai drivers is not necessary. It is not used by the hdmi_codec after the probe. Even if it was used, the 'struct snd_soc_dai_driver' can accessed through the 'struct snd_soc_dai' so keeping the pointer in the private data structure is not useful. Signed-off-by: NJerome Brunet <jbrunet@baylibre.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Jerome Brunet 提交于
If the hdmi-codec is on a codec-to-codec link, the substream pointer it receives is completely made up by snd_soc_dai_link_event(). The pointer will be different between startup() and shutdown(). The hdmi-codec complains when this happens even if it is not really a problem. The current_substream pointer is not used for anything useful apart from getting the exclusive ownership of the device. Remove current_substream pointer and replace the exclusive locking mechanism with a simple variable and some atomic operations. Signed-off-by: NJerome Brunet <jbrunet@baylibre.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Jerome Brunet 提交于
Remove the debug traces only showing the function name on entry. The same can be obtained using ftrace. Signed-off-by: NJerome Brunet <jbrunet@baylibre.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Libin Yang 提交于
Some userspace apps, like pulseaudio, may call open, hw_params, prepare to judge whether the pcm is ready or not. Current hdac_hdmi will return -ENODEV if monitor is not connected, which will cause the apps believe the pcm is not ready. Actually PCM for hdmi is ready, even the monitor is not connected. This patch removes the check of monitor presence in hw_params, just like what the legacy HD-Audio driver does. Signed-off-by: NLibin Yang <libin.yang@intel.com> Acked-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-