summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2019-10-09ASoC: simple_card_utils.h: Fix potential multiple redefinition errorDaniel Baluta
asoc_simple_debug_info and asoc_simple_debug_dai must be static otherwise we might a compilation error if the compiler decides not to inline the given function. Fixes: 0580dde59438686d ("ASoC: simple-card-utils: add asoc_simple_debug_info()") Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com> Link: https://lore.kernel.org/r/20191009153615.32105-3-daniel.baluta@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-09-09ASoC: hdmi-codec: Add an op to set callback function for plug eventCheng-Yi Chiang
Add an op in hdmi_codec_ops so codec driver can register callback function to handle plug event. Driver in DRM can use this callback function to report connector status. Signed-off-by: Cheng-Yi Chiang <cychiang@chromium.org> Link: https://lore.kernel.org/r/20190717083327.47646-2-cychiang@chromium.org Reviewed-by: Tzung-Bi Shih <tzungbi@google.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-09-02ASoC: soc-core: add snd_soc_dapm_init()Kuninori Morimoto
It is easy to read code if it is cleanly using paired function/naming, like start <-> stop, register <-> unregister, etc, etc. But, current ALSA SoC code is very random, unbalance, not paired, etc. It is easy to create bug at the such code, and it will be difficult to debug. soc-dapm has snd_soc_dapm_free() which cleanups debugfs, widgets, list. But, there is no paired initialize function. This patch adds snd_soc_dapm_init() and initilaizing dapm Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87pnkw7lbj.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-28ALSA: pcm: add support for 352.8KHz and 384KHz sample rateVidyakumar Athota
Most of the modern codecs supports 352.8KHz and 384KHz sample rates. Currenlty HW params fails to set 352.8Kz and 384KHz sample rate as these are not in known rates list. Add these new rates to known list to allow them. This patch also adds defines in pcm.h so that drivers can use it. Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org> Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20190822095653.7200-2-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-22ASoC: soc-dai: use bit field for bus_controlKuninori Morimoto
.bus_control can be bit field. this patch do it. 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/87v9uszazh.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-21ASoC: soc-core: merge snd_soc_initialize_card_lists()Kuninori Morimoto
snd_soc_initialize_card_lists() is doing card related INIT_LIST_HEAD(), but, it is already doing at snd_soc_register_card(). We don't need to do it separately. This patch merges these. 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/877e781ldq.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-16ASoC: SOF: rename SOUNDWIRE to ALHBard liao
Rename SOUNDWIRE to ALH. Signed-off-by: Bard liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20190815192018.30570-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-16ASoC: SOF: topology: Add dummy support for i.MX8 DAIsDaniel Baluta
Add dummy support for SAI/ESAI digital audio interface IPs found on i.MX8 boards. Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20190815192018.30570-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-15ASoC: Intel: common: add ACPI matching tables for EHLPan Xiuli
There are no upstream machine drivers just yet so just add dummy table for compilation in nocodec-mode. Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20190815155749.29304-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-15ASoC: Intel: common: add ACPI matching tables for Tiger LakePan Xiuli
Initial support for TGL w/ RT1308 Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20190815155749.29304-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-15ASoC: SOF: ipc: add ALH parametersPierre-Louis Bossart
The only configuration parameter is the ALH stream ID. No range checking is done by the driver, the firmware should check that the stream is valid for a specific hardware. Bump the ABI Minor number to keep the alignment with SOF firmware Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20190815155032.29181-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-15ASoC: core: Move pcm_mutex up to card level from snd_soc_pcm_runtimePeter Ujfalusi
The pcm_mutex is used to prevent concurrent execution of snd_pcm_ops callbacks. This works fine most of the cases but it can not handle setups when the same DAI is used by different rtd, for example: pcm3168a have two DAIs: one for Playback and one for Capture. If the codec is connected to a single CPU DAI we need to have two dai_link to support both playback and capture. In this case the snd_pcm_ops callbacks can be executed in parallel causing unexpected races in DAI drivers. By moving the pcm_mutex up to card level this can be solved while - hopefully - not breaking other setups. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20190813104532.16669-1-peter.ujfalusi@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-09ASoC: soc-core: add for_each_xxx macro for aux_devKuninori Morimoto
To be more readable code, this patch adds new for_each_xxx() macro for aux_dev. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87ftmc6w8s.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-09ASoC: soc-core: remove legacy style of aux_devKuninori Morimoto
Now all drivers are using snd_soc_dai_link_component for aux_dev. Let's remove legacy style Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87h86s6w8x.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-09ASoC: soc-core: support snd_soc_dai_link_component for aux_devKuninori Morimoto
To find aux_dev, ASoC is using .name, codec_name, codec_of_node. Here, .name is used to fallback in case of no codec. But, we already have this kind of component finding method by snd_soc_dai_link_component and soc_find_component(). We shouldn't have duplicated implementation to do same things. This patch adds snd_soc_dai_link_component support to finding aux_dev. Now, no driver is using only .name. All drivers are using codec_name and/or codec_of_node. This means no driver is finding component from .name so far. (Actually almost all drivers are using .name as just "device name", not for finding component...) This patch 1) add snd_soc_dai_link_component support for aux_dev. legacy style will be removed if all drivers are switched to new style. 2) try to find component via snd_soc_dai_link_component. Then, it doesn't try to find via .name, because no driver is using it so far. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87y3046wcf.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-08Merge branch 'topic/hda-bus-ops-cleanup' of ↵Mark Brown
https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound into asoc-5.4
2019-08-08Merge branch 'topic/hda-dmic' of ↵Mark Brown
https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound into asoc-5.4
2019-08-08ASoC: soc-core: define soc_dpcm_debugfs_add() for non CONFIG_DEBUG_FSKuninori Morimoto
soc_dpcm_debugfs_add() is implemented at soc-pcm.c under CONFIG_DEBUG_FS. Thus, soc-core.c which is only user of it need to use CONFIG_DEBUG_FS, too. This patch defines soc_dpcm_debugfs_add() for non CONFIG_DEBUG_FS case. Then, we can remove #ifdef CONFIG_DEBUG_FS from soc-core.c Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/875zn9ahnv.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-08ASoC: soc-core: tidyup for card->deferred_resume_workKuninori Morimoto
card->deferred_resume_work is used if CONFIG_PM_SLEEP was defined. but 1) It is defined even though CONFIG_PM_SLEEP was not defined 2) random ifdef code is difficult to read. This patch tidyup these issues. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/877e7paho1.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-08ALSA: hda: Direct MMIO accessesTakashi Iwai
HD-audio drivers access to the mmio registers indirectly via the corresponding bus->io_ops callbacks. This is because some platform (notably Tegra SoC) requires the word-aligned access. But it's rather a rare case, and other platforms suffer from the penalties by indirect calls unnecessarily. This patch is an attempt to optimize and cleanup for this situation. Now the special aligned access is used only when a new kconfig CONFIG_SND_HDA_ALIGNED_MMIO is set. And the HD-audio core itself provides the aligned MMIO access helpers instead of the driver side. If Kconfig isn't set (as default), the standard helpers like readl() or writel() are used directly. A couple of places in ASoC Intel drivers have the access via io_ops reg_writel(), and they are replaced with the direct writel() calls. And now with this patch, the whole bus->io_ops becomes empty, so it's dropped completely. The bus initialization functions are changed accordingly as well to drop the whole bus->io_ops. Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-08-08ALSA: hda: Remove page allocation redirectionTakashi Iwai
The HD-audio core allocates and releases pages via driver's specific dma_alloc_pages and dma_free_pages ops defined in bus->io_ops. This was because some platforms require the uncached pages and the handling of page flags had to be done locally in the driver code. Since the recent change in ALSA core memory allocator, we can simply pass SNDRV_DMA_TYPE_DEV_UC for the uncached pages, and the only difference became about this type to be passed to the core allocator. That is, it's good time for cleaning up the mess. This patch changes the allocation code in HD-audio core to call the core allocator directly so that we get rid of dma_alloc_pages and dma_free_pages io_ops. If a driver needs the uncached pages, it has to set bus->dma_type right after the bus initialization. This is merely a code refactoring and shouldn't bring any behavior changes. Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-08-05ASoC: soc-component: add snd_soc_pcm_component_pcm_free()Kuninori Morimoto
Current ALSA SoC is directly using component->driver->xxx, thus, the code nested deeply, and it makes code difficult to read, and is not good for encapsulation. We want to implement component related function at soc-component.c, but, some of them need to care whole snd_soc_pcm_runtime (= rtd) connected component. Let's call component related function which need to care with for_each_rtdcom() loop as snd_soc_pcm_component_xxx(). This patch adds new snd_soc_pcm_component_pcm_free() and use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87k1c54czu.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-05ASoC: soc-component: add snd_soc_pcm_component_pcm_new()Kuninori Morimoto
Current ALSA SoC is directly using component->driver->xxx, thus, the code nested deeply, and it makes code difficult to read, and is not good for encapsulation. We want to implement component related function at soc-component.c, but, some of them need to care whole snd_soc_pcm_runtime (= rtd) connected component. Let's call component related function which need to care with for_each_rtdcom() loop as snd_soc_pcm_component_xxx(). This patch adds new snd_soc_pcm_component_pcm() and use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87lfwl4czy.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-05ASoC: soc-component: add snd_soc_pcm_component_mmap()Kuninori Morimoto
Current ALSA SoC is directly using component->driver->ops->xxx, thus, the code nested deeply, and it makes code difficult to read, and is not good for encapsulation. We want to implement component related function at soc-component.c, but, some of them need to care whole snd_soc_pcm_runtime (= rtd) connected component. Let's call component related function which need to care with for_each_rtdcom() loop as snd_soc_pcm_component_xxx(). This patch adds new snd_soc_pcm_component_mmap() and use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87muh14d02.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-05ASoC: soc-component: add snd_soc_pcm_component_page()Kuninori Morimoto
Current ALSA SoC is directly using component->driver->ops->xxx, thus, the code nested deeply, and it makes code difficult to read, and is not good for encapsulation. We want to implement component related function at soc-component.c, but, some of them need to care whole snd_soc_pcm_runtime (= rtd) connected component. Let's call component related function which need to care with for_each_rtdcom() loop as snd_soc_pcm_component_xxx(). This patch adds new snd_soc_pcm_component_page() and use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87o91h4d06.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-05ASoC: soc-component: add snd_soc_pcm_component_copy_user()Kuninori Morimoto
Current ALSA SoC is directly using component->driver->ops->xxx, thus, the code nested deeply, and it makes code difficult to read, and is not good for encapsulation. We want to implement component related function at soc-component.c, but, some of them need to care whole snd_soc_pcm_runtime (= rtd) connected component. Let's call component related function which need to care with for_each_rtdcom() loop as snd_soc_pcm_component_xxx(). This patch adds new snd_soc_pcm_component_copy_user() and use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87pnlx4d0a.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-05ASoC: soc-component: add snd_soc_pcm_component_ioctrl()Kuninori Morimoto
Current ALSA SoC is directly using component->driver->ops->xxx, thus, the code nested deeply, and it makes code difficult to read, and is not good for encapsulation. We want to implement component related function at soc-component.c, but, some of them need to care whole snd_soc_pcm_runtime (= rtd) connected component. Let's call component related function which need to care with for_each_rtdcom() loop as snd_soc_pcm_component_xxx(). This patch adds new snd_soc_pcm_component_ioctrl() and use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87r26d4d0f.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-05ASoC: soc-component: add snd_soc_pcm_component_pointer()Kuninori Morimoto
Current ALSA SoC is directly using component->driver->ops->xxx, thus, the code nested deeply, and it makes code difficult to read, and is not good for encapsulation. We want to implement component related function at soc-component.c, but, some of them need to care whole snd_soc_pcm_runtime (= rtd) connected component. Let's call component related function which need to care with for_each_rtdcom() loop as snd_soc_pcm_component_xxx(). This patch adds new snd_soc_pcm_component_pointer() and use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87sgqt4d0j.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-05ASoC: soc-component: move snd_soc_component_set_bias_level()Kuninori Morimoto
Current soc-dapm / soc-core are using a long way round to call .set_bias_level. if (driver->set_bias_level) dapm->set_bias_level = ...; ... if (dapm->set_bias_level) ret = dapm->set_bias_level(...); We can directly call it via driver->set_bias_level. One note here is that both Card and Component have dapm, but, Card's dapm doesn't have dapm->component. We need to check it. This patch moves snd_soc_component_set_bias_level() to soc-component.c and updates parameters. dapm->set_bias_level is no longer needed Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87tvb94d0n.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-05ASoC: soc-component: move snd_soc_component_stream_event()Kuninori Morimoto
Current soc-dapm / soc-core are using a long way round to call .stream_event. if (driver->stream_event) dapm->stream_event = ...; ... if (dapm->stream_event) ret = dapm->stream_event(...); We can directly call it via driver->stream_event. One note here is that both Card and Component have dapm, but, Card's dapm doesn't have dapm->component. We need to check it. This patch moves snd_soc_component_stream_event() to soc-component.c and updates parameters. dapm->stream_event is no longer needed Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87v9vp4d0r.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-05ASoC: soc-component: move snd_soc_component_seq_notifier()Kuninori Morimoto
Current soc-dapm / soc-core are using a long way round to call .seq_notifier. if (driver->seq_notifier) dapm->seq_notifier = ...; ... if (dapm->seq_notifier) ret = dapm->seq_notifier(...); We can directly call it via driver->seq_notifier. One note here is that both Card and Component have dapm, but, Card's dapm doesn't have dapm->component. We need to check it. This patch moves snd_soc_component_seq_notifier() to soc-component.c, and updates parameters. dapm->seq_notifier is no longer needed Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87wog54d0v.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-05ASoC: soc-component: add snd_soc_component_of_xlate_dai_name()Kuninori Morimoto
Current ALSA SoC is directly using component->driver->xxx, thus, it is deep nested, and makes code difficult to read, and is not good for encapsulation. This patch adds new snd_soc_component_of_xlate_dai_name() and use it Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87y30l4d0z.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-05ASoC: soc-component: add snd_soc_component_of_xlate_dai_id()Kuninori Morimoto
Current ALSA SoC is directly using component->driver->xxx, thus, it is deep nested, and makes code difficult to read, and is not good for encapsulation. This patch adds new snd_soc_component_of_xlate_dai_id() and use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87zhl14d14.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-05ASoC: soc-component: add snd_soc_component_remove()Kuninori Morimoto
Current ALSA SoC is directly using component->driver->xxx, thus, it is deep nested, and makes code difficult to read, and is not good for encapsulation. This patch adds new snd_soc_component_remove() and use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/871ryd5rlo.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-05ASoC: soc-component: add snd_soc_component_probe()Kuninori Morimoto
Current ALSA SoC is directly using component->driver->xxx, thus, it is deep nested, and makes code difficult to read, and is not good for encapsulation. This patch adds new snd_soc_component_probe() and use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/8736it5rlt.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-05ASoC: soc-component: add snd_soc_component_is_suspended()Kuninori Morimoto
Current ALSA SoC is directly using component->xxx, But, it is not good for encapsulation. This patch adds new snd_soc_component_is_suspended() and use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/874l395rlx.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-05ASoC: soc-component: add snd_soc_component_resume()Kuninori Morimoto
Current ALSA SoC is directly using component->driver->xxx, thus, it is deep nested, and makes code difficult to read, and is not good for encapsulation. This patch adds new snd_soc_component_resume() and use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/875znp5rm2.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-05ASoC: soc-component: add snd_soc_component_suspend()Kuninori Morimoto
Current ALSA SoC is directly using component->driver->xxx, thus, it is deep nested, and makes code difficult to read, and is not good for encapsulation. This patch adds new snd_soc_component_suspend() and use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/877e855rn0.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-05ASoC: soc-component: add snd_soc_component_trigger()Kuninori Morimoto
Current ALSA SoC is directly using component->driver->ops->xxx, thus, it is deep nested, and makes code difficult to read, and is not good for encapsulation. This patch adds new snd_soc_component_trigger() and use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/878ssl5rn5.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-05ASoC: soc-component: add snd_soc_component_hw_free()Kuninori Morimoto
Current ALSA SoC is directly using component->driver->ops->xxx, thus, it is deep nested, and makes code difficult to read, and is not good for encapsulation. This patch adds new snd_soc_component_hw_free() and use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87a7d15rna.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-05ASoC: soc-component: add snd_soc_component_hw_params()Kuninori Morimoto
Current ALSA SoC is directly using component->driver->ops->xxx, thus, it is deep nested, and makes code difficult to read, and is not good for encapsulation. This patch adds new snd_soc_component_hw_params() and use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87blxh5rnf.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-05ASoC: soc-component: add snd_soc_component_prepare()Kuninori Morimoto
Current ALSA SoC is directly using component->driver->ops->xxx, thus, it is deep nested, and makes code difficult to read, and is not good for encapsulation. This patch adds new snd_soc_component_prepare() and use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87d0hx5rnm.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-05ASoC: soc-component: add snd_soc_component_close()Kuninori Morimoto
Current ALSA SoC is directly using component->driver->ops->xxx, thus, it is deep nested, and makes code difficult to read, and is not good for encapsulation. This patch adds new snd_soc_component_close() and use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87ef2d5rnr.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-05ASoC: soc-component: add snd_soc_component_open()Kuninori Morimoto
Current ALSA SoC is directly using component->driver->ops->xxx, thus, it is deep nested, and makes code difficult to read, and is not good for encapsulation. This patch adds new snd_soc_component_open() and use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87ftmt5rnx.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-05ASoC: soc-component: add snd_soc_component_get/put()Kuninori Morimoto
ALSA SoC is calling try_module_get()/module_put() based on component->driver->module_get_upon_open. To keep simple and readable code, we should create its function. This patch adds new snd_soc_component_get/put(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87h8795ro4.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-05ASoC: add soc-component.cKuninori Morimoto
ALSA SoC has many snd_soc_component_xxx(), but these are randomly located in many files. Because of it, code is difficult to read. This patch creates new soc-component.c, and moves existing snd_soc_component_xxx() into it. But not yet fully. We need more cleanup it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87imrp5roa.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-01ASoC: core: no need to check return value of debugfs_create functionsGreg 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. Also, there is no need to store the individual debugfs file name, just remove the whole directory all at once, saving a local variable. Note, the soc-pcm "state" file has now moved to a subdirectory, as it is only a good idea to save the dentries for debugfs directories, not individual files, as the individual file debugfs functions are changing to not return a dentry. Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: Mark Brown <broonie@kernel.org> Cc: Jaroslav Kysela <perex@perex.cz> Cc: Takashi Iwai <tiwai@suse.com> Cc: alsa-devel@alsa-project.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/20190731131716.9764-2-gregkh@linuxfoundation.org Signed-off-by: Mark Brown <broonie@kernel.org>
2019-07-31ALSA: hda: intel-nhlt: handle NHLT VENDOR_DEFINED DMIC geometryPierre-Louis Bossart
The NHLT spec defines a VENDOR_DEFINED geometry, which requires reading additional information to figure out the number of microphones. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-07-31ALSA: hda: move parts of NHLT code to new modulePierre-Louis Bossart
Move parts of the code outside of the Skylake driver to help detect the presence of DMICs (which are not supported by the HDaudio legacy driver). No functionality change (except for the removal of useless OR operations), only indentation and checkpatch fixes, making sure that the code compiles without ACPI and fixing an ACPI leak Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-07-31ASoC: Intel: Skylake: move NHLT header to common directoryPierre-Louis Bossart
Prepare move from NHLT code to common directory, starting with header. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>