diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2019-06-06 00:22:19 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-06-06 17:20:29 -0400 |
commit | adb76b5b9c4740a11f6ad6c68764515961ae8ade (patch) | |
tree | fdc8c8a14374b7bcf99083d3323f55207353a9b4 /include/sound | |
parent | e1684073ef2142c241375487b1e158abe169ce61 (diff) |
ASoC: soc-core: remove legacy style dai_link
All drivers switched to modern style dai_link
(= struct snd_soc_dai_link_component).
Let's remove legacy style dai_link.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/soc.h | 65 |
1 files changed, 5 insertions, 60 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h index 0fa79b8330d7..055e6d035e04 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
@@ -901,77 +901,33 @@ struct snd_soc_dai_link { | |||
901 | const char *stream_name; /* Stream name */ | 901 | const char *stream_name; /* Stream name */ |
902 | 902 | ||
903 | /* | 903 | /* |
904 | * cpu_name | ||
905 | * cpu_of_node | ||
906 | * cpu_dai_name | ||
907 | * | ||
908 | * These are legacy style, and will be replaced to | ||
909 | * modern style (= snd_soc_dai_link_component) in the future, | ||
910 | * but, not yet supported so far. | ||
911 | * If modern style was supported for CPU, all driver will switch | ||
912 | * to use it, and, legacy style code will be removed from ALSA SoC. | ||
913 | */ | ||
914 | /* | ||
915 | * You MAY specify the link's CPU-side device, either by device name, | 904 | * You MAY specify the link's CPU-side device, either by device name, |
916 | * or by DT/OF node, but not both. If this information is omitted, | 905 | * or by DT/OF node, but not both. If this information is omitted, |
917 | * the CPU-side DAI is matched using .cpu_dai_name only, which hence | 906 | * the CPU-side DAI is matched using .cpu_dai_name only, which hence |
918 | * must be globally unique. These fields are currently typically used | 907 | * must be globally unique. These fields are currently typically used |
919 | * only for codec to codec links, or systems using device tree. | 908 | * only for codec to codec links, or systems using device tree. |
920 | */ | 909 | */ |
921 | const char *cpu_name; | ||
922 | struct device_node *cpu_of_node; | ||
923 | /* | 910 | /* |
924 | * You MAY specify the DAI name of the CPU DAI. If this information is | 911 | * You MAY specify the DAI name of the CPU DAI. If this information is |
925 | * omitted, the CPU-side DAI is matched using .cpu_name/.cpu_of_node | 912 | * omitted, the CPU-side DAI is matched using .cpu_name/.cpu_of_node |
926 | * only, which only works well when that device exposes a single DAI. | 913 | * only, which only works well when that device exposes a single DAI. |
927 | */ | 914 | */ |
928 | const char *cpu_dai_name; | ||
929 | |||
930 | struct snd_soc_dai_link_component *cpus; | 915 | struct snd_soc_dai_link_component *cpus; |
931 | unsigned int num_cpus; | 916 | unsigned int num_cpus; |
932 | 917 | ||
933 | /* | 918 | /* |
934 | * codec_name | ||
935 | * codec_of_node | ||
936 | * codec_dai_name | ||
937 | * | ||
938 | * These are legacy style, it will be converted to modern style | ||
939 | * (= snd_soc_dai_link_component) automatically in soc-core | ||
940 | * if driver is using legacy style. | ||
941 | * Driver shouldn't use both legacy and modern style in the same time. | ||
942 | * If modern style was supported for CPU, all driver will switch | ||
943 | * to use it, and, legacy style code will be removed from ALSA SoC. | ||
944 | */ | ||
945 | /* | ||
946 | * You MUST specify the link's codec, either by device name, or by | 919 | * You MUST specify the link's codec, either by device name, or by |
947 | * DT/OF node, but not both. | 920 | * DT/OF node, but not both. |
948 | */ | 921 | */ |
949 | const char *codec_name; | ||
950 | struct device_node *codec_of_node; | ||
951 | /* You MUST specify the DAI name within the codec */ | 922 | /* You MUST specify the DAI name within the codec */ |
952 | const char *codec_dai_name; | ||
953 | |||
954 | struct snd_soc_dai_link_component *codecs; | 923 | struct snd_soc_dai_link_component *codecs; |
955 | unsigned int num_codecs; | 924 | unsigned int num_codecs; |
956 | 925 | ||
957 | /* | 926 | /* |
958 | * platform_name | ||
959 | * platform_of_node | ||
960 | * | ||
961 | * These are legacy style, it will be converted to modern style | ||
962 | * (= snd_soc_dai_link_component) automatically in soc-core | ||
963 | * if driver is using legacy style. | ||
964 | * Driver shouldn't use both legacy and modern style in the same time. | ||
965 | * If modern style was supported for CPU, all driver will switch | ||
966 | * to use it, and, legacy style code will be removed from ALSA SoC. | ||
967 | */ | ||
968 | /* | ||
969 | * You MAY specify the link's platform/PCM/DMA driver, either by | 927 | * You MAY specify the link's platform/PCM/DMA driver, either by |
970 | * device name, or by DT/OF node, but not both. Some forms of link | 928 | * device name, or by DT/OF node, but not both. Some forms of link |
971 | * do not need a platform. | 929 | * do not need a platform. |
972 | */ | 930 | */ |
973 | const char *platform_name; | ||
974 | struct device_node *platform_of_node; | ||
975 | struct snd_soc_dai_link_component *platforms; | 931 | struct snd_soc_dai_link_component *platforms; |
976 | unsigned int num_platforms; | 932 | unsigned int num_platforms; |
977 | 933 | ||
@@ -1033,13 +989,6 @@ struct snd_soc_dai_link { | |||
1033 | /* Do not create a PCM for this DAI link (Backend link) */ | 989 | /* Do not create a PCM for this DAI link (Backend link) */ |
1034 | unsigned int ignore:1; | 990 | unsigned int ignore:1; |
1035 | 991 | ||
1036 | /* | ||
1037 | * This driver uses legacy platform naming. Set by the core, machine | ||
1038 | * drivers should not modify this value. | ||
1039 | */ | ||
1040 | unsigned int legacy_platform:1; | ||
1041 | unsigned int legacy_cpu:1; | ||
1042 | |||
1043 | struct list_head list; /* DAI link list of the soc card */ | 992 | struct list_head list; /* DAI link list of the soc card */ |
1044 | struct snd_soc_dobj dobj; /* For topology */ | 993 | struct snd_soc_dobj dobj; /* For topology */ |
1045 | }; | 994 | }; |
@@ -1699,15 +1648,11 @@ int snd_soc_fixup_dai_links_platform_name(struct snd_soc_card *card, | |||
1699 | if (!name) | 1648 | if (!name) |
1700 | return -ENOMEM; | 1649 | return -ENOMEM; |
1701 | 1650 | ||
1702 | if (dai_link->platforms) | 1651 | if (!dai_link->platforms) |
1703 | /* only single platform is supported for now */ | 1652 | return -EINVAL; |
1704 | dai_link->platforms->name = name; | 1653 | |
1705 | else | 1654 | /* only single platform is supported for now */ |
1706 | /* | 1655 | dai_link->platforms->name = name; |
1707 | * legacy mode, this case will be removed when all | ||
1708 | * derivers are switched to modern style dai_link. | ||
1709 | */ | ||
1710 | dai_link->platform_name = name; | ||
1711 | } | 1656 | } |
1712 | 1657 | ||
1713 | return 0; | 1658 | return 0; |