aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/soc/generic (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-07-03Merge remote-tracking branches 'asoc/topic/msm8916', 'asoc/topic/mtk', 'asoc/topic/nau8824', 'asoc/topic/nau8825' and 'asoc/topic/of-graph' into asoc-nextMark Brown5-113/+220
2017-07-03Merge remote-tracking branch 'asoc/topic/rcar' into asoc-nextMark Brown7-31/+832
2017-06-30ASoC: audio-graph-card: add widgets and routing for external amplifier supportShawn Guo1-1/+47
It's very common that audio card has a machine level amplifier which is controlled by GPIO. The patch adds DAPM widgets and routing support into audio-graph-card driver, and creates an output driver widget with event to control the amplifier via GPIO. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-23ASoC: audio-graph-scu-card: support 2nd codec endpoint on DTKuninori Morimoto1-3/+25
audio-graph-scu-card can handle below connection which is mainly for sound mixing purpose. +----------+ +-------+ | CPU0--+--|-->| Codec | | | | +-------+ | CPU1--+ | +----------+ >From OF-graph point of view, it should have CPU0 <-> Codec, and CPU1 <-> Codec on DT. But current driver doesn't care about 2nd connection of Codec, because it is dummy from DPCM point of view. This patch can care 2nd Codec connection, and it should be supported from OF-graph point of view. It still have backward compatibility. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-23ASoC: audio-graph-scu-card: tidyup asoc_simple_card_canonicalize_cpu() parameterKuninori Morimoto1-1/+1
asoc_simple_card_canonicalize_cpu() 2nd param is asking CPU component's DAI links, not Card links. This patch fixup it. Otherwise, audio-graph-card can't handle CPU component correctly if CPU has mult-DAIs and Card uses only one of them Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-23ASoC: audio-graph-card: tidyup asoc_simple_card_canonicalize_cpu() parameterKuninori Morimoto1-2/+1
asoc_simple_card_canonicalize_cpu() 2nd param is asking CPU component's DAI links, not Card links. This patch fixup it. Otherwise, audio-graph-card can't handle CPU component correctly if CPU has mult-DAIs and Card uses only one of them Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-16ASoC: simple-card: use asoc_simple_card_of_parse_widgets()Kuninori Morimoto1-7/+3
Current simple card driver is supporting widgets on DT, other simple/audio card drivers will support it. Encapsulation is one of simple card util's purpose. Let's use asoc_simple_card_of_parse_widgets Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-16ASoC: simple-card-utils: add asoc_simple_card_of_parse_widgets()Kuninori Morimoto1-0/+19
Current simple card drivers are parsing widgets on each own driver (only simple-card at this point, but will be supported on all drivers) Encapsulation is one of simple card util's purpose. Let's add asoc_simple_card_of_parse_widgets for it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-15ASoC: audio-graph-scu-card: use asoc_simple_card_of_parse_routing()Kuninori Morimoto1-2/+2
Current simple/audio scu card drivers are supporting same routing on DT, but, doesn't use same function for it. Encapsulation is one of simple card util's purpose. Let's use asoc_simple_card_of_parse_routing Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-15ASoC: simple-scu-card: use asoc_simple_card_of_parse_routing()Kuninori Morimoto1-1/+1
Current simple/audio scu card drivers are supporting same routing on DT, but, doesn't use same function for it. Encapsulation is one of simple card util's purpose. Let's use asoc_simple_card_of_parse_routing Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-15ASoC: simple-card: use asoc_simple_card_of_parse_routing()Kuninori Morimoto1-7/+3
Current simple/audio scu card drivers are supporting same routing on DT, but, doesn't use same function for it. Encapsulation is one of simple card util's purpose. Let's use asoc_simple_card_of_parse_routing Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-15ASoC: simple-card-utils: add asoc_simple_card_of_parse_routing()Kuninori Morimoto1-0/+22
Current simple card drivers are parsing routing on each own driver. Encapsulation is one of simple card util's purpose. Let's add asoc_simple_card_of_parse_routing for it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-15ASoC: audio-graph-scu-card: use asoc_simple_card_convert_fixup()Kuninori Morimoto1-21/+3
Current simple/audio scu card drivers are supporting same convert-rate/convert-channels on DT, but, doesn't use same function for it. Encapsulation is one of simple card util's purpose. Let's use asoc_simple_card_parse_convert/asoc_simple_card_convert_fixup Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-15ASoC: simple-scu-card: use asoc_simple_card_convert_fixup()Kuninori Morimoto1-21/+3
Current simple/audio scu card drivers are supporting same convert-rate/convert-channels on DT, but, doesn't use same function for it. Encapsulation is one of simple card util's purpose. Let's use asoc_simple_card_parse_convert/asoc_simple_card_convert_fixup Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-15ASoC: simple-card-utils: add asoc_simple_card_convert_fixup()Kuninori Morimoto1-0/+40
Current simple/audio scu card drivers are supporting same convert-rate/convert-channels on DT, but doesn't use same function for it. Encapsulation is one of simple card util's purpose. Let's add asoc_simple_card_parse_convert/asoc_simple_card_convert_fixup Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-14ASoC: audio-graph-scu-card: use asoc_simple_card_of_parse_tdm()Kuninori Morimoto1-5/+1
Current simple card drivers are using asoc_simple_dai's tx_slot_mask, rx_slot_mask, slots, slot_width directly to parse TDM. Encapsulation is one of simple card util's purpose. Let's use asoc_simple_card_of_parse_tdm for it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-14ASoC: audio-graph-card: use asoc_simple_card_of_parse_tdm()Kuninori Morimoto1-10/+2
Current simple card drivers are using asoc_simple_dai's tx_slot_mask, rx_slot_mask, slots, slot_width directly to parse TDM. Encapsulation is one of simple card util's purpose. Let's use asoc_simple_card_of_parse_tdm for it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-14ASoC: simple-scu-card: use asoc_simple_card_of_parse_tdm()Kuninori Morimoto1-5/+1
Current simple card drivers are using asoc_simple_dai's tx_slot_mask, rx_slot_mask, slots, slot_width directly to parse TDM. Encapsulation is one of simple card util's purpose. Let's use asoc_simple_card_of_parse_tdm for it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-14ASoC: simple-card: use asoc_simple_card_of_parse_tdm()Kuninori Morimoto1-8/+2
Current simple card drivers are using asoc_simple_dai's tx_slot_mask, rx_slot_mask, slots, slot_width directly to parse TDM. Encapsulation is one of simple card util's purpose. Let's use asoc_simple_card_of_parse_tdm for it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-14ASoC: simple_card_utils: add EXPORT_SYMBOL_GPL() for asoc_simple_card_clk_xxx()Kuninori Morimoto1-0/+2
commit 891caea41746 ("ASoC: simple_card_utils: add asoc_simple_card_clk_xxx()") added new asoc_simple_card_clk_xxx(), but, it didn't have EXPORT_SYMBOL_GPL(). This patch adds it. Otherwise, we will get below error ERROR: "asoc_simple_card_clk_enable" [sound/soc/generic/snd-soc-simple-scu-card.ko] undefined! ERROR: "asoc_simple_card_clk_disable" [sound/soc/generic/snd-soc-simple-scu-card.ko] undefined! ERROR: "asoc_simple_card_clk_enable" [sound/soc/generic/snd-soc-simple-card.ko] undefined! ERROR: "asoc_simple_card_clk_disable" [sound/soc/generic/snd-soc-simple-card.ko] undefined! ERROR: "asoc_simple_card_clk_enable" [sound/soc/generic/snd-soc-audio-graph-scu-card.ko] undefined! ERROR: "asoc_simple_card_clk_disable" [sound/soc/generic/snd-soc-audio-graph-scu-card.ko] undefined! ERROR: "asoc_simple_card_clk_enable" [sound/soc/generic/snd-soc-audio-graph-card.ko] undefined! ERROR: "asoc_simple_card_clk_disable" [sound/soc/generic/snd-soc-audio-graph-card.ko] undefined! Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-13ASoC: audio-graph-card: use asoc_simple_card_clk_xxx()Kuninori Morimoto1-5/+5
Current simple-card-utils sets asoc_simple_dai::clk via asoc_simple_card_parse_clk(). Current simple card drivers are using it directly for clk_enable/disable. Encapsulation is one of simple card util's purpose. Let's use asoc_simple_card_clk_enable/disable. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-13ASoC: audio-graph-scu-card: use asoc_simple_card_clk_xxx()Kuninori Morimoto1-2/+2
Current simple-card-utils sets asoc_simple_dai::clk via asoc_simple_card_parse_clk(). Current simple card drivers are using it directly for clk_enable/disable. Encapsulation is one of simple card util's purpose. Let's use asoc_simple_card_clk_enable/disable. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-13ASoC: simple-scu-card: use asoc_simple_card_clk_xxx()Kuninori Morimoto1-2/+2
Current simple-card-utils sets asoc_simple_dai::clk via asoc_simple_card_parse_clk(). Current simple card drivers are using it directly for clk_enable/disable. Encapsulation is one of simple card util's purpose. Let's use asoc_simple_card_clk_enable/disable. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-13ASoC: simple-card: use asoc_simple_card_clk_xxx()Kuninori Morimoto1-5/+5
Current simple-card-utils sets asoc_simple_dai::clk via asoc_simple_card_parse_clk(). Current simple card drivers are using it directly for clk_enable/disable. Encapsulation is one of simple card util's purpose. Let's use asoc_simple_card_clk_enable/disable. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-13ASoC: simple_card_utils: add asoc_simple_card_clk_xxx()Kuninori Morimoto1-1/+18
Current simple-card-utils sets asoc_simple_dai::clk via asoc_simple_card_parse_clk(). Current simple card drivers are using it directly for clk_enable/disable. Encapsulation is one of simple card util's purpose. Let's encapsulate it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-13Merge branch 'topic/rcar' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-of-graphMark Brown7-33/+443
2017-06-13Merge branch 'topic/simple' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-of-graphMark Brown1-4/+10
2017-06-07ASoC: simple-scu-card: remove duplicate paramera from asoc_simple_card_parse_ofKuninori Morimoto1-3/+3
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-07ASoC: simple-card: remove duplicate parameter from asoc_simple_card_parse_of()Kuninori Morimoto1-3/+3
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-06ASoC: simple-card-utils: share same dev_dbg() for sysclkKuninori Morimoto5-25/+4
Let's share same debug message for sysclk Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-06ASoC: simple-card-utils: share same dev_dbg() for Dai NameKuninori Morimoto3-2/+2
Let's share same debug message for DAI Name Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-06ASoC: simple-card-utils: share same dev_dbg() for DAI formatKuninori Morimoto3-2/+2
Let's share same debug message for DAI format Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-06ASoC: simple-card-utils: share same dev_dbg() for Card NameKuninori Morimoto3-4/+2
Let's share same debug message for Card Name Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-05-29ASoC: audio-graph-scu-card: tidyup return method from probe()Kuninori Morimoto1-2/+4
Current return method from probe() is very confusable. This patch tidyup it to normal return method Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-05-29ASoC: add audio-graph-scu-card supportKuninori Morimoto3-0/+427
OF-graph base DT binding is used on V4L2, and ALSA SoC is using different style of DT today. Now ALSA SoC supports simple-card driver for generic/simple sound card, and we have simple-scu-card driver for simple-card + ALSA DPCM case. In the future, V4L2 / ALSA will support HDMI, and then, DT bindings between V4L2 / ALSA should be merged. This patch adds new Audio Graph SCU Card which is OF-graph base of simple-scu-card Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-05-29Merge branch 'topic/of-graph' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-rcarMark Brown4-7/+398
2017-05-26ASoC: simple-card-utils: remove strict limitation of bit/frame masterKuninori Morimoto1-2/+1
Current asoc_simple_card_parse_daifmt is keeping backward compatibility for bitmaster/framemaster which didn't use phandle. The keep compatibility, it is checking prefix length, but it is too strict. let's loosen it. Otherwise, OF-graph base sound card which doesn't have prefix can't detect daifmt. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-05-24ASoC: simple-card-utils: support snd_soc_get_dai_id()Kuninori Morimoto1-0/+9
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: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-05-24ASoC: simple-card: Fix misleading error messageJulian Scheel1-1/+7
In case cpu could not be found the error message would always refer to /codec/ not being found in DT. Fix this by catching the cpu node not found case explicitly. Signed-off-by: Julian Scheel <julian@jusst.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-05-19ASoC: simple-card: fix mic jack initializationStefan Agner1-1/+1
Initialize asoc_simple_card_init_mic with the correct struct asoc_simple_jack. Fixes: 9eac361877b3 ("ASoC: simple-card: add new asoc_simple_jack and use it") Signed-off-by: Stefan Agner <stefan@agner.ch> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-05-19ASoC: audio-graph-card: fix spelling mistake: "missmatch" -> "mismatch"Colin Ian King1-1/+1
Trivial fix to spelling mistake in dev_err message Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-05-19ASoC: audio-graph-card: tidyup return method from probe()Kuninori Morimoto1-2/+4
Current return method from probe() is very confusable. This patch tidyup it to normal return method Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-05-19ASoC: simple-scu-card: tidyup return method from probe()Kuninori Morimoto1-2/+4
Current return method from probe() is very confusable. This patch tidyup it to normal return method Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-05-19ASoC: simple-card: tidyup return method from probe()Kuninori Morimoto1-2/+4
Current return method from probe() is very confusable. This patch tidyup it to normal return method Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-05-17ASoC: add audio-graph-card supportKuninori Morimoto3-0/+318
OF-graph base DT binding are used on V4L2, and ALSA SoC is using different style of DT today. Now ALSA SoC supports simple-card driver for generic/simple sound card. In the future, V4L2 / ALSA will support HDMI, and then, DT bindings between V4L2 / ALSA should be merged. This patch adds new Audio Graph Card which is OF-graph base of simple-card Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-05-17ASoC: simple-card-utils: add asoc_simple_card_parse_graph_dai()Kuninori Morimoto1-0/+57
simple-card already has asoc_simple_card_parse_dai(), but graph base parsing needs graph specific version of it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-05-17ASoC: simple-card-utils: enable "label" on asoc_simple_card_parse_card_nameKuninori Morimoto1-5/+11
Current asoc_simple_card_parse_card_name() detects [prefix]name, but in generally, we uses "label" for user visible names. This patch enables it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-04-30Merge remote-tracking branches 'asoc/topic/samsung', 'asoc/topic/sgtl5000', 'asoc/topic/simple', 'asoc/topic/sirf' and 'asoc/topic/ssm4567' into asoc-nextMark Brown2-35/+45
2017-03-24ASoC: simple-card: fix simple_dai clk lookupLucas Stach1-0/+1
The clock needs to be stored in the simple_dai structure, so it can be enabled later on. This has been broken during the conversion to use devm_* functions for the clk lookup. Fixes: e984fd61e860 (ASoC: simple-card: use devm_get_clk_from_child()) Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-16ASoC: simple-scu-card: add new simple_priv_to_card() macroKuninori Morimoto1-15/+20
Current simple card driver is directly calling priv->snd_card everywhere, but it makes unreadable code. Let's use simple_priv_to_card() macro for it Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>