- 18 Feb, 2020 8 commits
-
-
Cezary Rojewski authored
Add HDA handlers for soc_compr_ops and snd_compr_ops which cover probe related operations. Implementation supports both connection purposes. These merely define stream setups as core flow is covered by SOF compress core. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200218143924.10565-8-cezary.rojewski@intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Cezary Rojewski authored
Hda stream is setup in similar fashion for compress as it is for pcm operations. To reuse existing code in compress path, expose SDnFMT helper routines. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200218143924.10565-7-cezary.rojewski@intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Cezary Rojewski authored
Define system-agnostic probe compress flow which serves as a base for actual, hardware-dependent implementations. As per firmware spec, maximum of one extraction stream is allowed, while for injection, there can be plenty. Apart from probe_pointer, all probe compress operations are mandatory. Copy operation is defined as unified as its flow should be shared across all SOF systems. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200218143924.10565-6-cezary.rojewski@intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Cezary Rojewski authored
Add all required types and methods to support each and every request that driver could sent to firmware. Probe is one of SOF firmware features which allows for data extraction and injection directly from or to DMA stream. Exposes eight IPCs: - addition and removal of injection DMAs - addition and removal of probe points - info retrieval of injection DMAs and probe points - probe initialization and cleanup Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200218143924.10565-5-cezary.rojewski@intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Cezary Rojewski authored
Update stream irq handler definition to correctly set hdac_stream current position when servicing stream interrupts for compress streams. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200218143924.10565-4-cezary.rojewski@intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Cezary Rojewski authored
Add simple malloc and free methods for memory management for compress streams. Based on snd_pcm_lib_malloc_pages and snd_pcm_lib_free_pages implementation. Signed-off-by: Divya Prakash <divya1.prakash@intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Takashi Iwai <tiwai@suse.de> Acked-by: Vinod Koul <vkoul@kernel.org> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200218143924.10565-3-cezary.rojewski@intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Cezary Rojewski authored
Update DMA buffer definition for snd_compr_runtime so it is represented similarly as in snd_pcm_runtime. While at it, modify snd_compr_set_runtime_buffer to account for newly added members. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Takashi Iwai <tiwai@suse.de> Acked-by: Vinod Koul <vkoul@kernel.org> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200218143924.10565-2-cezary.rojewski@intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Stephan Gerhold authored
Commit af4bac11 ("ASoC: soc-pcm: crash in snd_soc_dapm_new_dai") swapped the SNDRV_PCM_STREAM_* parameter in the snd_soc_dai_stream_valid(cpu_dai, ...) checks. But that works only for codec2codec links. For normal links it breaks registration of playback/capture-only PCM devices. E.g. on qcom/apq8016_sbc there is usually one playback-only and one capture-only PCM device, but they disappeared after the commit. The codec2codec case was added in commit a342031c ("ASoC: create pcm for codec2codec links as well") as an extra check (e.g. `playback = playback && cpu_playback->channels_min`). We should be able to simplify the code by checking directly for the correct stream type in the loop. This also fixes the regression because we check for PLAYBACK for both codec and cpu dai again when codec2codec is not used. Fixes: af4bac11 ("ASoC: soc-pcm: crash in snd_soc_dapm_new_dai") Signed-off-by: Stephan Gerhold <stephan@gerhold.net> Tested-by: Jerome Brunet <jbrunet@baylibre.com> Reviewed-by: Jerome Brunet <jbrunet@baylibre.com> Cc: Jerome Brunet <jbrunet@baylibre.com> Cc: Sameer Pujar <spujar@nvidia.com> Link: https://lore.kernel.org/r/20200218103824.26708-1-stephan@gerhold.netSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 17 Feb, 2020 3 commits
-
-
Jerome Brunet authored
Now that the component name is unique within ASoC, there is no need to hack the debugfs prefix to add more than one ASoC component to a linux device. Remove the unnecessary function and use snd_soc_register_component() directly. Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Link: https://lore.kernel.org/r/20200217092019.433402-1-jbrunet@baylibre.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Tzung-Bi Shih authored
hdmi_conn_detect and mtk_hdmi_audio_hook_plugged_cb would be called by different threads. Imaging the following calling sequence: Thread A Thread B -------------------------------------------------------------------- mtk_hdmi_audio_hook_plugged_cb() mtk_cec_hpd_high() -> disconnected hdmi_conn_detect() mtk_cec_hpd_high() -> connected plugged_cb(connected) plugged_cb(disconnected) The latest disconnected is false reported. Makes mtk_cec_hpd_high and plugged_cb atomic to fix. Also uses the same lock to protect read/write of plugged_cb and codec_dev. Fixes: 5d3c6447 ("drm/mediatek: support HDMI jack status reporting") Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Acked-by: CK Hu <ck.hu@mediatek.com> Link: https://lore.kernel.org/r/20200217105513.2.I477092c2f104fd589133436c3ae4590e6fc6323b@changeidSigned-off-by: Mark Brown <broonie@kernel.org>
-
Jack Yu authored
Fix typo for "Bypass Boost" control. Signed-off-by: Jack Yu <jack.yu@realtek.com> Link: https://lore.kernel.org/r/20200217020311.12793-1-jack.yu@realtek.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 14 Feb, 2020 6 commits
-
-
Jerome Brunet authored
Clarify the cast of snd_pcm_format_t and fix the sparse warning: restricted snd_pcm_format_t degrades to integer Fixes: 9c29fd9b ("ASoC: meson: g12a: extract codec-to-codec utils") Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Link: https://lore.kernel.org/r/20200214131350.337968-6-jbrunet@baylibre.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Jerome Brunet authored
Remove the double initialization of the dai input name as reported by sparse. Fixes: 65816025 ("ASoC: meson: aiu: add internal dac codec control support") Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Link: https://lore.kernel.org/r/20200214131350.337968-5-jbrunet@baylibre.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Jerome Brunet authored
The aiu stored the irq in an unsigned integer which may have discarded an error returned by platform_get_irq_byname(). This is incorrect and should have been a signed integer. Also drop the irq error traces from the probe function as this is already done by platform_get_irq_byname(). Fixes: 6ae9ca9c ("ASoC: meson: aiu: add i2s and spdif support") Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Link: https://lore.kernel.org/r/20200214131350.337968-4-jbrunet@baylibre.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Jerome Brunet authored
Fix the size of allocated memory for the clock bulk data Fixes: 6ae9ca9c ("ASoC: meson: aiu: add i2s and spdif support") Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Link: https://lore.kernel.org/r/20200214131350.337968-3-jbrunet@baylibre.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Jerome Brunet authored
Remove an unused structure definition which slipped through the initial driver submission. Fixes: 6ae9ca9c ("ASoC: meson: aiu: add i2s and spdif support") Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Link: https://lore.kernel.org/r/20200214131350.337968-2-jbrunet@baylibre.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Jerome Brunet authored
Make sure each ASoC component is registered with a unique name. The component is derived from the device name. If a device registers more than one component, the component names will be the same. This usually brings up a warning about the debugfs directory creation of the component since directory already exists. In such case, start numbering the component of the device so the names don't collide anymore. Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Link: https://lore.kernel.org/r/20200214134704.342501-1-jbrunet@baylibre.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 13 Feb, 2020 14 commits
-
-
Jerome Brunet authored
Add support for the sound card used on the amlogic GX SoC family Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Link: https://lore.kernel.org/r/20200213155159.3235792-10-jbrunet@baylibre.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Jerome Brunet authored
Add the dt-binding documentation of sound card supporting the amlogic GX SoC family Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Link: https://lore.kernel.org/r/20200213155159.3235792-9-jbrunet@baylibre.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Jerome Brunet authored
This prepares the addition of the GX SoC family sound card driver. The GX sound card, while slightly different, will be similar to the AXG one. The purpose of this change is to share the utils common to both sound card driver. Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Link: https://lore.kernel.org/r/20200213155159.3235792-8-jbrunet@baylibre.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Jerome Brunet authored
Add the codec to codec component which handles the routing between the audio producers and the internal audio DAC found on the amlogic GXL SoC family Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Link: https://lore.kernel.org/r/20200213155159.3235792-7-jbrunet@baylibre.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Jerome Brunet authored
Add the codec to codec component which handles the routing between the audio producers (PCM and I2S) and the synopsys hdmi controller on the amlogic GX SoC family Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Link: https://lore.kernel.org/r/20200213155159.3235792-6-jbrunet@baylibre.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Jerome Brunet authored
Add support for the i2s and spdif audio outputs (AIU) found in the amlogic Gx SoC family Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Link: https://lore.kernel.org/r/20200213155159.3235792-5-jbrunet@baylibre.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Jerome Brunet authored
Add the dt-bindings and documentation of the AIU audio controller. This component provides most of the audio outputs found on the Amlogic Gx SoC family. Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Link: https://lore.kernel.org/r/20200213155159.3235792-4-jbrunet@baylibre.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Jerome Brunet authored
The hdmi routing mechanism used on g12a hdmi is also used: * other Amlogic SoC types * for the internal DAC path Each of these codec glues are slightly different but the idea behind it remains the same. This change extract some helper functions from the g12a-tohdmitx driver to make them available for other Amlogic codecs. Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Link: https://lore.kernel.org/r/20200213155159.3235792-3-jbrunet@baylibre.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Jerome Brunet authored
At the moment, querying the dai_name will stop of the first component matching the dt node. This does not allow a device (single dt node) to provide several ASoC components which could then be used through DT. This change let the search go on if the xlate function of the component returns an error, giving the possibility to another component to match and return the dai_name. Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Link: https://lore.kernel.org/r/20200213155159.3235792-2-jbrunet@baylibre.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
derek.fang authored
Enable RT5682 PLL2 function to implement the more complex frequency conversion. Signed-off-by: derek.fang <derek.fang@realtek.com> Link: https://lore.kernel.org/r/1581577510-1807-1-git-send-email-derek.fang@realtek.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Tzung-Bi Shih authored
1. Moves headset jack to card-specific storage. 2. Removes trailing blank line. 3. Moves card registration to the end of probe. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20200213112003.4.Ia542007f51d3de753a9e0a83135ee074581dbf71@changeidSigned-off-by: Mark Brown <broonie@kernel.org>
-
Tzung-Bi Shih authored
Supports TDM out and 8ch I2S out. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20200213112003.3.I30f0b8c87d5ec2a0e5f1b0fabf0a8ccef374f5ea@changeidSigned-off-by: Mark Brown <broonie@kernel.org>
-
Tzung-Bi Shih authored
1. Switch TDM GPIO pins according to playback on or off. 2. Pull TDM GPIO pins down when probed to avoid current leakage. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20200213112003.2.I1d568b0c99742c6e755d051aadfd52e4be3cc0a5@changeidSigned-off-by: Mark Brown <broonie@kernel.org>
-
Tzung-Bi Shih authored
DL2 and UL1 are for BTSCO. Provides only 16-bit, mono, 8kHz and 16kHz to userspace. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20200213112003.1.Ie5aedb9d34ebfc7f05ceb382bfe346c45331cd63@changeidSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 12 Feb, 2020 9 commits
-
-
Geert Uytterhoeven authored
Fixes for missing miscellaneous support: ERROR: "abx500_get_register_interruptible" [...] undefined! ERROR: "abx500_set_register_interruptible" [...] undefined! ERROR: "arizona_free_irq" [...] undefined! ERROR: "arizona_request_irq" [...] undefined! ERROR: "arizona_set_irq_wake" [...] undefined! ERROR: "mc13xxx_reg_rmw" [...] undefined! ERROR: "mc13xxx_reg_write" [...] undefined! ERROR: "snd_soc_free_ac97_component" [...] undefined! ERROR: "snd_soc_new_ac97_component" [...] undefined! Reported-by: Randy Dunlap <rdunlap@infradead.org> Fixes: ea00d952 ("ASoC: Use imply for SND_SOC_ALL_CODECS") Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Link: https://lore.kernel.org/r/20200212145650.4602-4-geert@linux-m68k.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Geert Uytterhoeven authored
Fixes for CONFIG_I2C=n: WARNING: unmet direct dependencies detected for REGMAP_I2C Depends on [n]: I2C [=n] Selected by [m]: - SND_SOC_ADAU1781_I2C [=m] && SOUND [=m] && !UML && SND [=m] && SND_SOC [=m] - SND_SOC_ADAU1977_I2C [=m] && SOUND [=m] && !UML && SND [=m] && SND_SOC [=m] - SND_SOC_RT5677 [=m] && SOUND [=m] && !UML && SND [=m] && SND_SOC [=m] sound/soc/codecs/...: error: type defaults to ‘int’ in declaration of ‘module_i2c_driver’ [-Werror=implicit-int] drivers/base/regmap/regmap-i2c.c: In function ‘regmap_smbus_byte_reg_read’: drivers/base/regmap/regmap-i2c.c:25:8: error: implicit declaration of function ‘i2c_smbus_read_byte_data’; did you mean ‘i2c_set_adapdata’? [-Werror=implicit-function-declaration] Fixes: ea00d952 ("ASoC: Use imply for SND_SOC_ALL_CODECS") Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Link: https://lore.kernel.org/r/20200212145650.4602-3-geert@linux-m68k.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Geert Uytterhoeven authored
Fixes for CONFIG_SPI=n: WARNING: unmet direct dependencies detected for REGMAP_SPI Depends on [n]: SPI [=n] Selected by [m]: - SND_SOC_ADAU1781_SPI [=m] && SOUND [=m] && !UML && SND [=m] && SND_SOC [=m] - SND_SOC_ADAU1977_SPI [=m] && SOUND [=m] && !UML && SND [=m] && SND_SOC [=m] ERROR: "spi_async" [...] undefined! ERROR: "spi_get_device_id" [...] undefined! ERROR: "__spi_register_driver" [...] undefined! ERROR: "spi_setup" [...] undefined! ERROR: "spi_sync" [...] undefined! ERROR: "spi_write_then_read" [...] undefined! Reported-by: Randy Dunlap <rdunlap@infradead.org> Fixes: ea00d952 ("ASoC: Use imply for SND_SOC_ALL_CODECS") Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested Link: https://lore.kernel.org/r/20200212145650.4602-2-geert@linux-m68k.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Dafna Hirschfeld authored
This was tested and verified with: make dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/sound/google,cros-ec-codec.yaml Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20200127091806.11403-1-dafna.hirschfeld@collabora.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Kuninori Morimoto authored
soc_pcm_open() operation order is not good. At first, soc_pcm_open() operation order is 1) CPU DAI startup 2) Component open 3) Codec DAI startup 4) rtd startup But here, 2) will call try_module_get() if component has module_get_upon_open flags. This means 1) CPU DAI startup will be operated *before* its module was loaded. DAI should be called *after* Component. Second, soc_pcm_close() operation order is 1) CPU DAI shutdown 2) Codec DAI shutdown 3) rtd shutdown 4) Component close soc_pcm_open() and soc_pcm_close() are paired function, but, its operation order is unbalance. This patch tidyup soc_pcm_open() order to Component -> rtd -> DAI. This is one of prepare for cleanup soc-pcm-open() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/871rr3cext.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Kuninori Morimoto authored
This patch moves soc_pcm_close() next to soc_pcm_open(). This is prepare for soc_pcm_open() cleanup. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/8736bjcexx.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Kuninori Morimoto authored
Current soc_pcm_open() calls snd_soc_component_open() under loop. Thus, it needs to care about opened/not-yet-opened Component. But, if soc-component.c is handling it, soc-pcm.c don't need to care about it. This patch adds opened flag to soc-component.h, and simplify soc-pcm.c. This is one of prepare for cleanup soc-pcm-open() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/874kvzcey1.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Tzung-Bi Shih authored
Da7219 and max98357a share the same I2S lines. When writing audio data to the I2S, both codecs generate sound. Da7219 already has a separate control "Headphone Switch". Adds a new control "Speakers Switch" for turning on/off max98357a. Userspace program can decide to turn on/off which codecs by different use cases. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20200212124608.2.I5fa3fdca69dbb5d3dd5031c939b9b24095065a94@changeidSigned-off-by: Mark Brown <broonie@kernel.org>
-
Tzung-Bi Shih authored
Some machine may share the same I2S lines for multiple codecs. For example, mediatek/mt8183/mt8183-da7219-max98357 shares the same lines between max98357a and da7219. When writing audio data through the I2S lines, all codecs on the lines would try to generate sound if they accepts DO line. As a result, multiple codecs generate sound at a time. Moves control of SD_MODE to DAPM so that machine drivers have chances to manipulate DAPM widget to turn on/off max98357a. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20200212124608.1.I73b26b5e319de173d05823e79f5861bf1826261c@changeidSigned-off-by: Mark Brown <broonie@kernel.org>
-