aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/fsl
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2008-11-18 15:50:34 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2008-11-21 09:02:01 -0500
commit875065491fba8eb13219f16c36e79a6fb4e15c68 (patch)
treeb95327a466e6b79cb5d8a1d9be0f33697dd05db8 /sound/soc/fsl
parent9b0db7e7fd20d5a38844e9435f7d4246ea44978a (diff)
ASoC: Rename snd_soc_card to snd_soc_machine
One of the issues with the ASoC v1 API which has been addressed in the ASoC v2 work that Liam Girdwood has done is that the ALSA card provided by ASoC is distributed around the ASoC structures. For example, machine wide data such as the struct snd_card are maintained as part of the CODEC data structure, preventing the use of multiple codecs. This has been addressed by refactoring the data structures so that all the data for the ALSA card is contained in a single structure snd_soc_card which replaces the existing snd_soc_machine and snd_soc_device. Begin the process of backporting this by renaming struct snd_soc_machine to struct snd_soc_card, better reflecting its function and bringing it closer to standard ALSA terminology. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/fsl')
-rw-r--r--sound/soc/fsl/fsl_dma.c2
-rw-r--r--sound/soc/fsl/mpc8610_hpcd.c6
-rw-r--r--sound/soc/fsl/soc-of-simple.c10
3 files changed, 9 insertions, 9 deletions
diff --git a/sound/soc/fsl/fsl_dma.c b/sound/soc/fsl/fsl_dma.c
index d2d3da9729f2..bf92331b4768 100644
--- a/sound/soc/fsl/fsl_dma.c
+++ b/sound/soc/fsl/fsl_dma.c
@@ -284,7 +284,7 @@ static irqreturn_t fsl_dma_isr(int irq, void *dev_id)
284 * fsl_dma_new: initialize this PCM driver. 284 * fsl_dma_new: initialize this PCM driver.
285 * 285 *
286 * This function is called when the codec driver calls snd_soc_new_pcms(), 286 * This function is called when the codec driver calls snd_soc_new_pcms(),
287 * once for each .dai_link in the machine driver's snd_soc_machine 287 * once for each .dai_link in the machine driver's snd_soc_card
288 * structure. 288 * structure.
289 */ 289 */
290static int fsl_dma_new(struct snd_card *card, struct snd_soc_dai *dai, 290static int fsl_dma_new(struct snd_card *card, struct snd_soc_dai *dai,
diff --git a/sound/soc/fsl/mpc8610_hpcd.c b/sound/soc/fsl/mpc8610_hpcd.c
index 94f89debde1f..1cf4d6eeb538 100644
--- a/sound/soc/fsl/mpc8610_hpcd.c
+++ b/sound/soc/fsl/mpc8610_hpcd.c
@@ -29,7 +29,7 @@
29struct mpc8610_hpcd_data { 29struct mpc8610_hpcd_data {
30 struct snd_soc_device sound_devdata; 30 struct snd_soc_device sound_devdata;
31 struct snd_soc_dai_link dai; 31 struct snd_soc_dai_link dai;
32 struct snd_soc_machine machine; 32 struct snd_soc_card machine;
33 unsigned int dai_format; 33 unsigned int dai_format;
34 unsigned int codec_clk_direction; 34 unsigned int codec_clk_direction;
35 unsigned int cpu_clk_direction; 35 unsigned int cpu_clk_direction;
@@ -185,7 +185,7 @@ static struct snd_soc_ops mpc8610_hpcd_ops = {
185/** 185/**
186 * mpc8610_hpcd_machine: ASoC machine data 186 * mpc8610_hpcd_machine: ASoC machine data
187 */ 187 */
188static struct snd_soc_machine mpc8610_hpcd_machine = { 188static struct snd_soc_card mpc8610_hpcd_machine = {
189 .probe = mpc8610_hpcd_machine_probe, 189 .probe = mpc8610_hpcd_machine_probe,
190 .remove = mpc8610_hpcd_machine_remove, 190 .remove = mpc8610_hpcd_machine_remove,
191 .name = "MPC8610 HPCD", 191 .name = "MPC8610 HPCD",
@@ -465,7 +465,7 @@ static int mpc8610_hpcd_probe(struct of_device *ofdev,
465 goto error; 465 goto error;
466 } 466 }
467 467
468 machine_data->sound_devdata.machine = &mpc8610_hpcd_machine; 468 machine_data->sound_devdata.card = &mpc8610_hpcd_machine;
469 machine_data->sound_devdata.codec_dev = &soc_codec_device_cs4270; 469 machine_data->sound_devdata.codec_dev = &soc_codec_device_cs4270;
470 machine_data->sound_devdata.platform = &fsl_soc_platform; 470 machine_data->sound_devdata.platform = &fsl_soc_platform;
471 471
diff --git a/sound/soc/fsl/soc-of-simple.c b/sound/soc/fsl/soc-of-simple.c
index 0382fdac51cd..53be6491320a 100644
--- a/sound/soc/fsl/soc-of-simple.c
+++ b/sound/soc/fsl/soc-of-simple.c
@@ -31,7 +31,7 @@ struct of_snd_soc_device {
31 int id; 31 int id;
32 struct list_head list; 32 struct list_head list;
33 struct snd_soc_device device; 33 struct snd_soc_device device;
34 struct snd_soc_machine machine; 34 struct snd_soc_card card;
35 struct snd_soc_dai_link dai_link; 35 struct snd_soc_dai_link dai_link;
36 struct platform_device *pdev; 36 struct platform_device *pdev;
37 struct device_node *platform_node; 37 struct device_node *platform_node;
@@ -58,9 +58,9 @@ of_snd_soc_get_device(struct device_node *codec_node)
58 /* Initialize the structure and add it to the global list */ 58 /* Initialize the structure and add it to the global list */
59 of_soc->codec_node = codec_node; 59 of_soc->codec_node = codec_node;
60 of_soc->id = of_snd_soc_next_index++; 60 of_soc->id = of_snd_soc_next_index++;
61 of_soc->machine.dai_link = &of_soc->dai_link; 61 of_soc->card.dai_link = &of_soc->dai_link;
62 of_soc->machine.num_links = 1; 62 of_soc->card.num_links = 1;
63 of_soc->device.machine = &of_soc->machine; 63 of_soc->device.card = &of_soc->card;
64 of_soc->dai_link.ops = &of_snd_soc_ops; 64 of_soc->dai_link.ops = &of_snd_soc_ops;
65 list_add(&of_soc->list, &of_snd_soc_device_list); 65 list_add(&of_soc->list, &of_snd_soc_device_list);
66 66
@@ -159,7 +159,7 @@ int of_snd_soc_register_platform(struct snd_soc_platform *platform,
159 of_soc->platform_node = node; 159 of_soc->platform_node = node;
160 of_soc->dai_link.cpu_dai = cpu_dai; 160 of_soc->dai_link.cpu_dai = cpu_dai;
161 of_soc->device.platform = platform; 161 of_soc->device.platform = platform;
162 of_soc->machine.name = of_soc->dai_link.cpu_dai->name; 162 of_soc->card.name = of_soc->dai_link.cpu_dai->name;
163 163
164 /* Now try to register the SoC device */ 164 /* Now try to register the SoC device */
165 of_snd_soc_register_device(of_soc); 165 of_snd_soc_register_device(of_soc);