- 28 9月, 2017 1 次提交
-
-
由 Kuninori Morimoto 提交于
In current ALSA SoC, Platform only has pcm_new/pcm_free feature, but it should be supported on Component level. This patch adds it. The v1 was added commit 99b04f4c ("ASoC: add Component level pcm_new/pcm_free") but it called all "card" connected component's pcm_new/free, it was wrong. This patch calls "rtd" connected component. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 27 9月, 2017 1 次提交
-
-
由 Kuninori Morimoto 提交于
Double NULL pointer check for ops and ops->func is difficult to read and might be forget to check it if new func was add. This patch adds new null_snd_soc_ops and use it if rtd->dai_link didn't have it to avoid NULL ops, and reduces ops NULL check. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 26 9月, 2017 2 次提交
-
-
由 Kuninori Morimoto 提交于
On soc_add_dai(), it is checking dai->driver->xxx, This means, dai->driver is mandatory, never been NULL. dai->driver check is not needed. This patch removes it. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Kuninori Morimoto 提交于
static soc_free_pcm_runtime() is never called with rtd == NULL. This patch removes unnecessary rtd == NULL check from soc_free_pcm_runtime(). Furthermore, NULL check before kfree() is not needed. This patch removes such ckeck too. Reported-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NFengguang Wu <fengguang.wu@intel.com> Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 31 8月, 2017 4 次提交
-
-
由 Kuninori Morimoto 提交于
In current ALSA SoC, Codec only has set_jack feature. Codec will be merged into Component in next generation ALSA SoC, thus current Codec specific feature need to be merged into it. This is glue patch for it. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Kuninori Morimoto 提交于
In current ALSA SoC, Codec only has set_pll feature. Codec will be merged into Component in next generation ALSA SoC, thus current Codec specific feature need to be merged into it. This is glue patch for it. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Kuninori Morimoto 提交于
In current ALSA SoC, Codec only has set_sysclk feature. Codec will be merged into Component in next generation ALSA SoC, thus current Codec specific feature need to be merged into it. This is glue patch for it. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Takashi Iwai 提交于
Currently we're taking power_lock at each card component for assuring the power-up sequence, but it doesn't help anything in the implementation at the moment: it just serializes unnecessarily the callers, but it doesn't protect about the power state change itself. It used to have some usefulness in the early days where we managed the PM manually. But now the suspend/resume core procedure is beyond our hands, and power_lock lost its meaning. This patch drops the power_lock from allover the places. There shouldn't be any issues by this change, as it's no helper regarding the power state change. Rather we'll get better performance by removing the serialization; which is the only slight concern of any behavior change, but it can't be a showstopper, after all. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 25 8月, 2017 5 次提交
-
-
由 Kuninori Morimoto 提交于
snd_soc_component and snd_soc_component_driver both have dapm_routes/num_dapm_routes, but these are duplicated. Let's remove duplicated definition. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Kuninori Morimoto 提交于
snd_soc_component and snd_soc_component_driver both have dapm_widgets/num_dapm_widgets, but these are duplicated. Let's remove duplicated definition. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Kuninori Morimoto 提交于
snd_soc_component and snd_soc_component_driver both have controls/num_controls, but these are duplicated. Let's remove duplicated definition. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Kuninori Morimoto 提交于
Now we have snd_soc_component_get_dapm(), and as soc.h say below, let's use it. /* Don't use these, use snd_soc_component_get_dapm() */ struct snd_soc_dapm_context dapm; Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Jeffy Chen 提交于
The dai driver's name is allowed to be NULL. So add a sanity check for that. Signed-off-by: NJeffy Chen <jeffy.chen@rock-chips.com> Reported-by: NDonglin Peng <dolinux.peng@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 22 8月, 2017 1 次提交
-
-
由 Jeffy Chen 提交于
Currently we are searching dai name in snd_soc_find_dai, which could either be dai driver name or component device name(for legacy naming). Allow searching dai driver name in snd_soc_find_dai too, so that we can use dai driver name to find legacy naming dais. Signed-off-by: NJeffy Chen <jeffy.chen@rock-chips.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 16 8月, 2017 1 次提交
-
-
由 Kuninori Morimoto 提交于
Current snd_soc_unregister_component() unregisters first found component only which was specified by dev. This style can't specify concrete component if system registered some component with same dev. And system need to call this function many times. This patch unregister all related component by 1 call. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 10 8月, 2017 2 次提交
-
-
由 Kuninori Morimoto 提交于
Basically, current ALSA SoC framework is based on CPU/Codec/Platform, but its operation doesn't have consistent. Thus, source code was unreadable, and difficult to understand. This patch connects each component (= CPU/Codec/Platform) to rtd by using snd_soc_rtdcom_add(), and convert uneven operations to consistent operation. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: NArnaud Pouliquen <arnaud.pouliquen@st.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Kuninori Morimoto 提交于
Current snd_soc_pcm_runtime has platform / codec pointers, and we could use these specific pointer. But these will be replaced to more generic "component" soon, and will need more generic method to get each connected component pointer from rtd. This patch adds new snd_soc_rtdcom_xxx() to connect/disconnect component to rtd. It means same as previous "platform" / "codec" pointer style, but more generic. We can find necessary component pointer from rtd by using component driver name on snd_soc_rtdcom_lookup(). Here, the reason why it uses "driver name" is that "component name" was created by fmt_single_name() and difficult to use it from driver. Driver of course knows its "driver name", thus, using it is more easy. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: NArnaud Pouliquen <arnaud.pouliquen@st.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 07 8月, 2017 4 次提交
-
-
由 Kuninori Morimoto 提交于
Current snd_soc_unregister_component() is using multiple mutex_unlock() for found/non-found cases. But it is unreadable and confusable code. This patch tidyup current code to be readable. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Kuninori Morimoto 提交于
To unify notation, to readable. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Fabio Estevam 提交于
The check of IS_ERR or NULL pointer can be replaced by IS_ERR_OR_NULL(), which helps readability. Signed-off-by: NFabio Estevam <festevam@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Fabio Estevam 提交于
There is no need to have the *debugfs_reg dentry member as part of the snd_soc_codec structure as its only usage is inside soc_init_codec_debugfs(). Use a local dentry variable instead. Signed-off-by: NFabio Estevam <festevam@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 01 8月, 2017 1 次提交
-
-
由 Tony Lindgren 提交于
Fix inconsistent use of of_graph_get_port_parent() where asoc_simple_card_parse_graph_dai() does of_node_get() before calling it while other callers do not. We can fix this by not trashing the node passed to of_graph_get_port_parent(). Let's also make sure the callers have correct refcounts and remove related incorrect of_node_put() calls for of_for_each_phandle as that's done by of_phandle_iterator_next() except when we break out of the loop early. Let's fix both issues with a single patch to avoid kobject refcounts getting messed up more if two patches are merged separately. Otherwise strange issues can happen caused by memory corruption caused by too many kobject_del() calls such as: BUG: sleeping function called from invalid context at kernel/locking/mutex.c:747 ... (___might_sleep) (__mutex_lock) (mutex_lock_nested) (kernfs_remove) (kobject_del) (kobject_put) (of_get_next_parent) (of_graph_get_port_parent) (asoc_simple_card_parse_graph_dai [snd_soc_simple_card_utils]) (asoc_graph_card_probe [snd_soc_audio_graph_card]) Fixes: 0ef472a9 ("of_graph: add of_graph_get_port_parent()") Fixes: 2692c1c6 ("ASoC: add audio-graph-card support") Fixes: 1689333f ("ASoC: simple-card-utils: add asoc_simple_card_parse_graph_dai()") Signed-off-by: NTony Lindgren <tony@atomide.com> Reviewed-by: NRob Herring <robh@kernel.org> Tested-by: NAntonio Borneo <borneo.antonio@gmail.com> Tested-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 17 7月, 2017 1 次提交
-
-
由 Johan Hovold 提交于
This reverts commit 99b04f4c ("ASoC: add Component level pcm_new/pcm_free"), which started calling the pcm_new callback for every component in a *card* when creating a new pcm, something which does not seem to make any sense. This specifically led to memory leaks in systems with more than one platform component and where DMA memory is allocated in the platform-driver callback. For example, when both mcasp devices are being used on an am335x board, DMA memory would be allocated twice for every DAI link during probe. When CONFIG_SND_VERBOSE_PROCFS was set this fortunately also led to warnings such as: WARNING: CPU: 0 PID: 565 at ../fs/proc/generic.c:346 proc_register+0x110/0x154 proc_dir_entry 'sub0/prealloc' already registered Since there seems to be no users of the new component callbacks, and the current implementation introduced a regression, let's revert the offending commit for now. Fixes: 99b04f4c ("ASoC: add Component level pcm_new/pcm_free") Signed-off-by: NJohan Hovold <johan@kernel.org> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Tested-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NMark Brown <broonie@kernel.org> Cc: stable <stable@vger.kernel.org> # 4.10
-
- 30 6月, 2017 1 次提交
-
-
由 Wu Fengguang 提交于
sound/soc/soc-core.c:1961:2-3: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Fixes: 98faf436 ("ASoC: Drop invalid DMI fields when setting card long name from DMI info") CC: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: NFengguang Wu <fengguang.wu@intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 29 6月, 2017 1 次提交
-
-
由 Mengdong Lin 提交于
Sometimes DMI fields may be invalid and so can't give useful vendor, product or board info, such as "Type2 - Board Manufacturer" or "Type1 - TBD by OEM". Including such invalid DMI fileds may create silly card long name. So this patch creates a black list of invalid strings. And if a DMI field contains any string in this list, it will be excluded from the card long name. Signed-off-by: NMengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 25 5月, 2017 2 次提交
-
-
由 Kuninori Morimoto 提交于
ALSA SoC needs to know connected DAI ID for detecting. It is not a big problem if device/driver was only for sound, but getting DAI ID will be difficult if device includes both Video/Sound, like HDMI. To solve this issue, this patch adds new snd_soc_get_dai_id() and its related .of_xlate_dai_id callback on component driver. In below case, we can handle Sound port (= port@2) as ID = 0 if .of_xlate_dai_id has its support. hdmi { port@0 { /* VIDEO */ }; port@1 { /* VIDEO */ }; port@2 { /* SOUND */ }; }; Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Takashi Iwai 提交于
soc_cleanup_card_resources() call snd_card_free() at the last of its procedure. This turned out to lead to a use-after-free. PCM runtimes have been already removed via soc_remove_pcm_runtimes(), while it's dereferenced later in soc_pcm_free() called via snd_card_free(). The fix is simple: just move the snd_card_free() call to the beginning of the whole procedure. This also gives another benefit: it guarantees that all operations have been shut down before actually releasing the resources, which was racy until now. Reported-and-tested-by: NRobert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: NTakashi Iwai <tiwai@suse.de> Signed-off-by: NMark Brown <broonie@kernel.org> Cc: <stable@vger.kernel.org>
-
- 17 5月, 2017 1 次提交
-
-
由 Kuninori Morimoto 提交于
Current snd_soc_of_parse_daifmt() detects [prefix]format, but "format" was unclear in some case. This patch checks "dai-format" first, and try to check "[prefix]format" if "dai-format" was not exist. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 09 5月, 2017 1 次提交
-
-
由 Stephen Boyd 提交于
This typo is quite common. Fix it and add it to the spelling file so that checkpatch catches it earlier. Link: http://lkml.kernel.org/r/20170317011131.6881-2-sboyd@codeaurora.orgSigned-off-by: NStephen Boyd <sboyd@codeaurora.org> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 25 4月, 2017 2 次提交
-
-
由 Takashi Iwai 提交于
Since recently UCM can pick up a configuration specific to the board via card longname field, and we introduced a helper function snd_soc_set_dmi_name() for that. So far, it was used only in one place (sound/soc/intel/boards/broadwell.c), but it should be more widely applied. This patch puts a big hammer for that: it lets snd_soc_register_card() calling snd_soc_set_dmi_name() unconditionally, so that all x86 devices get the better longname string. This would have no impact for other systems without DMI support, as snd_soc_set_dmi_name() is no-op on them. Signed-off-by: NTakashi Iwai <tiwai@suse.de> Acked-by: NLiam Girdwood <liam.r.girdwood@linux.intel.com> Acked-by: NVinod Koul <vinod.koul@intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Takashi Iwai 提交于
For systems without DMI, it makes no sense to have the code. Signed-off-by: NTakashi Iwai <tiwai@suse.de> Acked-by: NLiam Girdwood <liam.r.girdwood@linux.intel.com> Acked-by: NVinod Koul <vinod.koul@intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 06 4月, 2017 1 次提交
-
-
由 Kuninori Morimoto 提交于
Current ALSA SoC Sound Card basically consists of CPU/Codec/Platform components. If system uses Kernel modules, we can disable these drivers by using rmmod command. In such case, we can't disable CPU/Codec/Platform driver without disabling Sound Card driver. But on the other hand, we can disable these drivers by using unbind command. In such case, we can disable these drivers randomly. In this case, we can create dirty Sound Card which is missing necessary components. (1) If user disabled Sound Card first, but did nothing to other drivers, user can't use Sound because Sound Card is no longer exists. (2) If user disabled CPU/Codec/Platform driver randomly, but did nothing to Sound Card, user still be able to use Sound Card, because dirty Sound Card still exists. In this case, Sound system will be crashed if user started sound playback/capture. But we can't block such random unbind now. To avoid Sound Card crash in (2) case, we need to unregister Sound Card whenever CPU/Codec/Platform component were unregistered. This patch solves this issue. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 25 3月, 2017 1 次提交
-
-
由 Kuninori Morimoto 提交于
commit 1a653aa4 ("ASoC: core: replace aux_comp_list to ...") tried to replace aux_comp_list to component_dev_list, but it failed because of binding timing. Thus, Sylwester fixuped it by commit d2e3a135 ("ASoC: Fix binding and probing of auxiliary..."). One of main purpose of commit 1a653aa4 ("ASoC: core: replace...") was remove replaceable list (= list_aux) from snd_soc_component by using new "auxiliary" flags (but it failed). Because of this background, current code has reborned card_aux_list (= same as original list_aux), and almost pointless "auxiliary" flags. Let's remove pointless "auxiliary" flags by this patch This means, it is same as revert both commit 1a653aa4 ("ASoC: core: replace aux_comp_list to ...") and commit d2e3a135 ("ASoC: Fix binding and probing of auxiliary..."). Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: NSylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 09 3月, 2017 1 次提交
-
-
由 Brian Norris 提交于
Not all platform drivers have pcm_{new,free} callbacks. Seen with a "snd-soc-dummy" codec from sound/soc/rockchip/rk3399_gru_sound.c. Fixes: 99b04f4c ("ASoC: add Component level pcm_new/pcm_free") Signed-off-by: NBrian Norris <briannorris@chromium.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 07 3月, 2017 1 次提交
-
-
由 Adrian Dinu 提交于
This was reported by checkpatch.pl Signed-off-by: NAdrian Dinu <adrian.dinu95@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 28 2月, 2017 1 次提交
-
-
由 Alexey Dobriyan 提交于
Now that %z is standartised in C99 there is no reason to support %Z. Unlike %L it doesn't even make format strings smaller. Use BUILD_BUG_ON in a couple ATM drivers. In case anyone didn't notice lib/vsprintf.o is about half of SLUB which is in my opinion is quite an achievement. Hopefully this patch inspires someone else to trim vsprintf.c more. Link: http://lkml.kernel.org/r/20170103230126.GA30170@avx2Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com> Cc: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 04 2月, 2017 1 次提交
-
-
由 Daniel Baluta 提交于
This is a relict of 6553bf06 ("ASoC: Don't try to register debugfs entries if the parent does not exist"). Signed-off-by: NDaniel Baluta <daniel.baluta@nxp.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 27 1月, 2017 3 次提交
-
-
由 Kuninori Morimoto 提交于
Because prototype of OF-graph sound card support didn't have Sound Card node, commit 8f5ebb1b ("ASoC: soc-core: adjust for graph on snd_soc_of_parse_card_name") adjusted to it on each functions. But final discussion result of ALSA SoC / OF-graph ML, OF-graph sound card has node. Thus, this commit became no longer needed. This reverts commit 8f5ebb1b. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Kuninori Morimoto 提交于
Because prototype of OF-graph sound card support didn't have Sound Card node, commit b6defcca ("ASoC: soc-core: adjust for graph on snd_soc_of_parse_audio_prefix") adjusted to it on each functions. But final discussion result of ALSA SoC / OF-graph ML, OF-graph sound card has node. Thus, this commit became no longer needed. This reverts commit b6defcca. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Kuninori Morimoto 提交于
Because prototype of OF-graph sound card support didn't have Sound Card node, commit 1ef5bcd5 ("ASoC: soc-core: adjust for graph on snd_soc_of_parse_audio_simple_widgets") adjusted to it on each functions. But final discussion result of ALSA SoC / OF-graph ML, OF-graph sound card has node. Thus, this commit became no longer needed. This reverts commit 1ef5bcd5. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-