]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
ASoC: Rename snd_soc_card to snd_soc_machine
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 18 Nov 2008 20:50:34 +0000 (20:50 +0000)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 21 Nov 2008 14:02:01 +0000 (14:02 +0000)
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>
33 files changed:
Documentation/sound/alsa/soc/machine.txt
include/sound/soc.h
sound/soc/atmel/playpaq_wm8510.c
sound/soc/atmel/sam9g20_wm8731.c
sound/soc/au1x/sample-ac97.c
sound/soc/blackfin/bf5xx-ad1980.c
sound/soc/blackfin/bf5xx-ad73311.c
sound/soc/blackfin/bf5xx-ssm2602.c
sound/soc/davinci/davinci-evm.c
sound/soc/davinci/davinci-i2s.c
sound/soc/davinci/davinci-sffsdr.c
sound/soc/fsl/fsl_dma.c
sound/soc/fsl/mpc8610_hpcd.c
sound/soc/fsl/soc-of-simple.c
sound/soc/omap/n810.c
sound/soc/omap/omap2evm.c
sound/soc/omap/omap3beagle.c
sound/soc/omap/osk5912.c
sound/soc/omap/overo.c
sound/soc/pxa/corgi.c
sound/soc/pxa/e800_wm9712.c
sound/soc/pxa/em-x270.c
sound/soc/pxa/palm27x.c
sound/soc/pxa/poodle.c
sound/soc/pxa/spitz.c
sound/soc/pxa/tosa.c
sound/soc/s3c24xx/ln2440sbc_alc650.c
sound/soc/s3c24xx/neo1973_wm8753.c
sound/soc/s3c24xx/s3c24xx_uda134x.c
sound/soc/s3c24xx/smdk2443_wm9710.c
sound/soc/sh/sh7760-ac97.c
sound/soc/soc-core.c
sound/soc/soc-dapm.c

index f370e7db86af6a970de14433523af4b1ca71d390..4a9f51e2905c3c95cff3e0459b7674e47e70c851 100644 (file)
@@ -9,7 +9,7 @@ the audio subsystem with the kernel as a platform device and is represented by
 the following struct:-
 
 /* SoC machine */
-struct snd_soc_machine {
+struct snd_soc_card {_
        char *name;
 
        int (*probe)(struct platform_device *pdev);
@@ -67,10 +67,10 @@ static struct snd_soc_dai_link corgi_dai = {
        .ops = &corgi_ops,
 };
 
-struct snd_soc_machine then sets up the machine with it's DAIs. e.g.
+struct snd_soc_card then sets up the machine with it's DAIs. e.g.
 
 /* corgi audio machine driver */
-static struct snd_soc_machine snd_soc_machine_corgi = {
+static struct snd_soc_card snd_soc_corgi = {
        .name = "Corgi",
        .dai_link = &corgi_dai,
        .num_links = 1,
@@ -90,7 +90,7 @@ static struct wm8731_setup_data corgi_wm8731_setup = {
 
 /* corgi audio subsystem */
 static struct snd_soc_device corgi_snd_devdata = {
-       .machine = &snd_soc_machine_corgi,
+       .machine = &snd_soc_corgi,
        .platform = &pxa2xx_soc_platform,
        .codec_dev = &soc_codec_dev_wm8731,
        .codec_data = &corgi_wm8731_setup,
index 077dfe4e51f01c927a55c17512b52297329276ae..3be17b3c650c6d60259a0474894e9a6f7c548bd7 100644 (file)
@@ -482,8 +482,8 @@ struct snd_soc_dai_link  {
        struct snd_pcm *pcm;
 };
 
-/* SoC machine */
-struct snd_soc_machine {
+/* SoC card */
+struct snd_soc_card {
        char *name;
 
        int (*probe)(struct platform_device *pdev);
@@ -497,7 +497,7 @@ struct snd_soc_machine {
        int (*resume_post)(struct platform_device *pdev);
 
        /* callbacks */
-       int (*set_bias_level)(struct snd_soc_machine *,
+       int (*set_bias_level)(struct snd_soc_card *,
                              enum snd_soc_bias_level level);
 
        /* CPU <--> Codec DAI links  */
@@ -508,7 +508,7 @@ struct snd_soc_machine {
 /* SoC Device - the audio subsystem */
 struct snd_soc_device {
        struct device *dev;
-       struct snd_soc_machine *machine;
+       struct snd_soc_card *card;
        struct snd_soc_platform *platform;
        struct snd_soc_codec *codec;
        struct snd_soc_codec_device *codec_dev;
index ea7935d2a66d4ad5298fbd1df01c35c2bc4610ce..d40b5a52a8d28169dc9375985894696913bada6b 100644 (file)
@@ -361,7 +361,7 @@ static struct snd_soc_dai_link playpaq_wm8510_dai = {
 
 
 
-static struct snd_soc_machine snd_soc_machine_playpaq = {
+static struct snd_soc_card snd_soc_playpaq = {
        .name = "LRS_PlayPaq_WM8510",
        .dai_link = &playpaq_wm8510_dai,
        .num_links = 1,
@@ -377,7 +377,7 @@ static struct wm8510_setup_data playpaq_wm8510_setup = {
 
 
 static struct snd_soc_device playpaq_wm8510_snd_devdata = {
-       .machine = &snd_soc_machine_playpaq,
+       .card = &snd_soc_playpaq,
        .platform = &at32_soc_platform,
        .codec_dev = &soc_codec_dev_wm8510,
        .codec_data = &playpaq_wm8510_setup,
index 710addcc66b34deeaf167402e04a51386fee59ae..fdc1d0206e0b5406fb784f12d3c2c41b87c64915 100644 (file)
@@ -242,7 +242,7 @@ static struct snd_soc_dai_link at91sam9g20ek_dai = {
        .ops = &at91sam9g20ek_ops,
 };
 
-static struct snd_soc_machine snd_soc_machine_at91sam9g20ek = {
+static struct snd_soc_card snd_soc_at91sam9g20ek = {
        .name = "WM8731",
        .dai_link = &at91sam9g20ek_dai,
        .num_links = 1,
@@ -254,7 +254,7 @@ static struct wm8731_setup_data at91sam9g20ek_wm8731_setup = {
 };
 
 static struct snd_soc_device at91sam9g20ek_snd_devdata = {
-       .machine = &snd_soc_machine_at91sam9g20ek,
+       .card = &snd_soc_at91sam9g20ek,
        .platform = &atmel_soc_platform,
        .codec_dev = &soc_codec_dev_wm8731,
        .codec_data = &at91sam9g20ek_wm8731_setup,
index f75ae7f62c3d4c157ec1b51729b972e173464474..27683eb7905e305f800211dcfa21718e73a4c5c9 100644 (file)
@@ -42,14 +42,14 @@ static struct snd_soc_dai_link au1xpsc_sample_ac97_dai = {
        .ops            = NULL,
 };
 
-static struct snd_soc_machine au1xpsc_sample_ac97_machine = {
+static struct snd_soc_card au1xpsc_sample_ac97_machine = {
        .name           = "Au1xxx PSC AC97 Audio",
        .dai_link       = &au1xpsc_sample_ac97_dai,
        .num_links      = 1,
 };
 
 static struct snd_soc_device au1xpsc_sample_ac97_devdata = {
-       .machine        = &au1xpsc_sample_ac97_machine,
+       .card           = &au1xpsc_sample_ac97_machine,
        .platform       = &au1xpsc_soc_platform, /* see dbdma2.c */
        .codec_dev      = &soc_codec_dev_ac97,
 };
index 124425d223202aeb308a45023616e26a152dc4c0..36c569a43ce18b37765f65ce4ee3e16a8f524910 100644 (file)
@@ -43,7 +43,7 @@
 #include "bf5xx-ac97-pcm.h"
 #include "bf5xx-ac97.h"
 
-static struct snd_soc_machine bf5xx_board;
+static struct snd_soc_card bf5xx_board;
 
 static int bf5xx_board_startup(struct snd_pcm_substream *substream)
 {
@@ -67,14 +67,14 @@ static struct snd_soc_dai_link bf5xx_board_dai = {
        .ops = &bf5xx_board_ops,
 };
 
-static struct snd_soc_machine bf5xx_board = {
+static struct snd_soc_card bf5xx_board = {
        .name = "bf5xx-board",
        .dai_link = &bf5xx_board_dai,
        .num_links = 1,
 };
 
 static struct snd_soc_device bf5xx_board_snd_devdata = {
-       .machine = &bf5xx_board,
+       .card = &bf5xx_board,
        .platform = &bf5xx_ac97_soc_platform,
        .codec_dev = &soc_codec_dev_ad1980,
 };
index 47da49b9aeac35a9764b36a554898d463cc1b8f4..57da14799375d93a82a90dc373c448a934356299 100644 (file)
@@ -65,7 +65,7 @@
 
 #define GPIO_SE CONFIG_SND_BFIN_AD73311_SE
 
-static struct snd_soc_machine bf5xx_ad73311;
+static struct snd_soc_card bf5xx_ad73311;
 
 static int snd_ad73311_startup(void)
 {
@@ -190,7 +190,7 @@ static struct snd_soc_dai_link bf5xx_ad73311_dai = {
        .ops = &bf5xx_ad73311_ops,
 };
 
-static struct snd_soc_machine bf5xx_ad73311 = {
+static struct snd_soc_card bf5xx_ad73311 = {
        .name = "bf5xx_ad73311",
        .probe = bf5xx_probe,
        .dai_link = &bf5xx_ad73311_dai,
@@ -198,7 +198,7 @@ static struct snd_soc_machine bf5xx_ad73311 = {
 };
 
 static struct snd_soc_device bf5xx_ad73311_snd_devdata = {
-       .machine = &bf5xx_ad73311,
+       .card = &bf5xx_ad73311,
        .platform = &bf5xx_i2s_soc_platform,
        .codec_dev = &soc_codec_dev_ad73311,
 };
index 744a90e765d922b62a589592df6c652271e72fbe..0078dfcd95b92e09053f598f12d8034becdfc179 100644 (file)
@@ -44,7 +44,7 @@
 #include "bf5xx-i2s-pcm.h"
 #include "bf5xx-i2s.h"
 
-static struct snd_soc_machine bf5xx_ssm2602;
+static struct snd_soc_card bf5xx_ssm2602;
 
 static int bf5xx_ssm2602_startup(struct snd_pcm_substream *substream)
 {
@@ -135,14 +135,14 @@ static struct ssm2602_setup_data bf5xx_ssm2602_setup = {
        .i2c_address = 0x1b,
 };
 
-static struct snd_soc_machine bf5xx_ssm2602 = {
+static struct snd_soc_card bf5xx_ssm2602 = {
        .name = "bf5xx_ssm2602",
        .dai_link = &bf5xx_ssm2602_dai,
        .num_links = 1,
 };
 
 static struct snd_soc_device bf5xx_ssm2602_snd_devdata = {
-       .machine = &bf5xx_ssm2602,
+       .card = &bf5xx_ssm2602,
        .platform = &bf5xx_i2s_soc_platform,
        .codec_dev = &soc_codec_dev_ssm2602,
        .codec_data = &bf5xx_ssm2602_setup,
index 9e6062cd6b59957f6df964470a52b8756f7f9398..2ce34d44b15c82229cb5ae38e4ed3754135a0562 100644 (file)
@@ -128,7 +128,7 @@ static struct snd_soc_dai_link evm_dai = {
 };
 
 /* davinci-evm audio machine driver */
-static struct snd_soc_machine snd_soc_machine_evm = {
+static struct snd_soc_card snd_soc_card_evm = {
        .name = "DaVinci EVM",
        .dai_link = &evm_dai,
        .num_links = 1,
@@ -142,7 +142,7 @@ static struct aic3x_setup_data evm_aic3x_setup = {
 
 /* evm audio subsystem */
 static struct snd_soc_device evm_snd_devdata = {
-       .machine = &snd_soc_machine_evm,
+       .card = &snd_soc_card_evm,
        .platform = &davinci_soc_platform,
        .codec_dev = &soc_codec_dev_aic3x,
        .codec_data = &evm_aic3x_setup,
index 11c20d0b7bccb4fbbfb97e4ea3519ee74d455fef..95df51e803b4012a00b8ebffaf0773eeee76b3d2 100644 (file)
@@ -375,8 +375,8 @@ static int davinci_i2s_probe(struct platform_device *pdev,
                             struct snd_soc_dai *dai)
 {
        struct snd_soc_device *socdev = platform_get_drvdata(pdev);
-       struct snd_soc_machine *machine = socdev->machine;
-       struct snd_soc_dai *cpu_dai = machine->dai_link[pdev->id].cpu_dai;
+       struct snd_soc_card *card = socdev->card;
+       struct snd_soc_dai *cpu_dai = card->dai_link[pdev->id].cpu_dai;
        struct davinci_mcbsp_dev *dev;
        struct resource *mem, *ioarea;
        struct evm_snd_platform_data *pdata;
@@ -437,8 +437,8 @@ static void davinci_i2s_remove(struct platform_device *pdev,
                               struct snd_soc_dai *dai)
 {
        struct snd_soc_device *socdev = platform_get_drvdata(pdev);
-       struct snd_soc_machine *machine = socdev->machine;
-       struct snd_soc_dai *cpu_dai = machine->dai_link[pdev->id].cpu_dai;
+       struct snd_soc_card *card = socdev->card;
+       struct snd_soc_dai *cpu_dai = card->dai_link[pdev->id].cpu_dai;
        struct davinci_mcbsp_dev *dev = cpu_dai->private_data;
        struct resource *mem;
 
index 69a8a769f4d8b8223899a9db5ad9b1bf263e8e85..fa38f9cd3506bbf508383b84da83caa050688acb 100644 (file)
@@ -73,7 +73,7 @@ static struct snd_soc_dai_link sffsdr_dai = {
 };
 
 /* davinci-sffsdr audio machine driver */
-static struct snd_soc_machine snd_soc_machine_sffsdr = {
+static struct snd_soc_card snd_soc_sffsdr = {
        .name = "DaVinci SFFSDR",
        .dai_link = &sffsdr_dai,
        .num_links = 1,
@@ -89,7 +89,7 @@ static struct pcm3008_setup_data sffsdr_pcm3008_setup = {
 
 /* sffsdr audio subsystem */
 static struct snd_soc_device sffsdr_snd_devdata = {
-       .machine = &snd_soc_machine_sffsdr,
+       .card = &snd_soc_sffsdr,
        .platform = &davinci_soc_platform,
        .codec_dev = &soc_codec_dev_pcm3008,
        .codec_data = &sffsdr_pcm3008_setup,
index d2d3da9729f25f56d7563fefabe3f7d94b51f2fa..bf92331b4768184c85f4171ca73191ac41d56ed4 100644 (file)
@@ -284,7 +284,7 @@ static irqreturn_t fsl_dma_isr(int irq, void *dev_id)
  * fsl_dma_new: initialize this PCM driver.
  *
  * This function is called when the codec driver calls snd_soc_new_pcms(),
- * once for each .dai_link in the machine driver's snd_soc_machine
+ * once for each .dai_link in the machine driver's snd_soc_card
  * structure.
  */
 static int fsl_dma_new(struct snd_card *card, struct snd_soc_dai *dai,
index 94f89debde1fa463a043741b022040bad7971b3e..1cf4d6eeb5384e7f659fca54d87aee20ac55f7eb 100644 (file)
@@ -29,7 +29,7 @@
 struct mpc8610_hpcd_data {
        struct snd_soc_device sound_devdata;
        struct snd_soc_dai_link dai;
-       struct snd_soc_machine machine;
+       struct snd_soc_card machine;
        unsigned int dai_format;
        unsigned int codec_clk_direction;
        unsigned int cpu_clk_direction;
@@ -185,7 +185,7 @@ static struct snd_soc_ops mpc8610_hpcd_ops = {
 /**
  * mpc8610_hpcd_machine: ASoC machine data
  */
-static struct snd_soc_machine mpc8610_hpcd_machine = {
+static struct snd_soc_card mpc8610_hpcd_machine = {
        .probe = mpc8610_hpcd_machine_probe,
        .remove = mpc8610_hpcd_machine_remove,
        .name = "MPC8610 HPCD",
@@ -465,7 +465,7 @@ static int mpc8610_hpcd_probe(struct of_device *ofdev,
                goto error;
        }
 
-       machine_data->sound_devdata.machine = &mpc8610_hpcd_machine;
+       machine_data->sound_devdata.card = &mpc8610_hpcd_machine;
        machine_data->sound_devdata.codec_dev = &soc_codec_device_cs4270;
        machine_data->sound_devdata.platform = &fsl_soc_platform;
 
index 0382fdac51cd44d615ea0cae24ecff239eb4bcc7..53be6491320a944beed760873b766c5fb71f294e 100644 (file)
@@ -31,7 +31,7 @@ struct of_snd_soc_device {
        int id;
        struct list_head list;
        struct snd_soc_device device;
-       struct snd_soc_machine machine;
+       struct snd_soc_card card;
        struct snd_soc_dai_link dai_link;
        struct platform_device *pdev;
        struct device_node *platform_node;
@@ -58,9 +58,9 @@ of_snd_soc_get_device(struct device_node *codec_node)
        /* Initialize the structure and add it to the global list */
        of_soc->codec_node = codec_node;
        of_soc->id = of_snd_soc_next_index++;
-       of_soc->machine.dai_link = &of_soc->dai_link;
-       of_soc->machine.num_links = 1;
-       of_soc->device.machine = &of_soc->machine;
+       of_soc->card.dai_link = &of_soc->dai_link;
+       of_soc->card.num_links = 1;
+       of_soc->device.card = &of_soc->card;
        of_soc->dai_link.ops = &of_snd_soc_ops;
        list_add(&of_soc->list, &of_snd_soc_device_list);
 
@@ -159,7 +159,7 @@ int of_snd_soc_register_platform(struct snd_soc_platform *platform,
        of_soc->platform_node = node;
        of_soc->dai_link.cpu_dai = cpu_dai;
        of_soc->device.platform = platform;
-       of_soc->machine.name = of_soc->dai_link.cpu_dai->name;
+       of_soc->card.name = of_soc->dai_link.cpu_dai->name;
 
        /* Now try to register the SoC device */
        of_snd_soc_register_device(of_soc);
index fae3ad36e0bfc3e03606561c48c0c54bb7d192b6..d216b4f9e14ecb7ffd076ce3c1db5d5bec69b80c 100644 (file)
@@ -282,7 +282,7 @@ static struct snd_soc_dai_link n810_dai = {
 };
 
 /* Audio machine driver */
-static struct snd_soc_machine snd_soc_machine_n810 = {
+static struct snd_soc_card snd_soc_n810 = {
        .name = "N810",
        .dai_link = &n810_dai,
        .num_links = 1,
@@ -298,7 +298,7 @@ static struct aic3x_setup_data n810_aic33_setup = {
 
 /* Audio subsystem */
 static struct snd_soc_device n810_snd_devdata = {
-       .machine = &snd_soc_machine_n810,
+       .card = &snd_soc_n810,
        .platform = &omap_soc_platform,
        .codec_dev = &soc_codec_dev_aic3x,
        .codec_data = &n810_aic33_setup,
index c37621357d00c8d1f7155524980e5610d868ba39..5bea31157a94f431501d55bece2b1a51dfe2ff0f 100644 (file)
@@ -90,7 +90,7 @@ static struct snd_soc_dai_link omap2evm_dai = {
 };
 
 /* Audio machine driver */
-static struct snd_soc_machine snd_soc_machine_omap2evm = {
+static struct snd_soc_card snd_soc_omap2evm = {
        .name = "omap2evm",
        .dai_link = &omap2evm_dai,
        .num_links = 1,
@@ -98,7 +98,7 @@ static struct snd_soc_machine snd_soc_machine_omap2evm = {
 
 /* Audio subsystem */
 static struct snd_soc_device omap2evm_snd_devdata = {
-       .machine = &snd_soc_machine_omap2evm,
+       .card = &snd_soc_omap2evm,
        .platform = &omap_soc_platform,
        .codec_dev = &soc_codec_dev_twl4030,
 };
index ec84a9bbc5631aac1c1755bc462b3a72c1732611..3ed25464627f01acd49c70b12005e585269d3f0b 100644 (file)
@@ -88,7 +88,7 @@ static struct snd_soc_dai_link omap3beagle_dai = {
 };
 
 /* Audio machine driver */
-static struct snd_soc_machine snd_soc_machine_omap3beagle = {
+static struct snd_soc_card snd_soc_omap3beagle = {
        .name = "omap3beagle",
        .dai_link = &omap3beagle_dai,
        .num_links = 1,
@@ -96,7 +96,7 @@ static struct snd_soc_machine snd_soc_machine_omap3beagle = {
 
 /* Audio subsystem */
 static struct snd_soc_device omap3beagle_snd_devdata = {
-       .machine = &snd_soc_machine_omap3beagle,
+       .card = &snd_soc_omap3beagle,
        .platform = &omap_soc_platform,
        .codec_dev = &soc_codec_dev_twl4030,
 };
index 0fe733796898149471013ba47db2d6394343921d..7a8f14d0c772201f905f1214fc0db35a24b9b3af 100644 (file)
@@ -143,7 +143,7 @@ static struct snd_soc_dai_link osk_dai = {
 };
 
 /* Audio machine driver */
-static struct snd_soc_machine snd_soc_machine_osk = {
+static struct snd_soc_card snd_soc_card_osk = {
        .name = "OSK5912",
        .dai_link = &osk_dai,
        .num_links = 1,
@@ -151,7 +151,7 @@ static struct snd_soc_machine snd_soc_machine_osk = {
 
 /* Audio subsystem */
 static struct snd_soc_device osk_snd_devdata = {
-       .machine = &snd_soc_machine_osk,
+       .card = &snd_soc_card_osk,
        .platform = &omap_soc_platform,
        .codec_dev = &soc_codec_dev_tlv320aic23,
 };
index c26d1de7da515ed4ce0083094b8bbe96e67cd090..eea0c372bb3f950f9fb2b2efacb067a3fac6e5ac 100644 (file)
@@ -88,7 +88,7 @@ static struct snd_soc_dai_link overo_dai = {
 };
 
 /* Audio machine driver */
-static struct snd_soc_machine snd_soc_machine_overo = {
+static struct snd_soc_card snd_soc_card_overo = {
        .name = "overo",
        .dai_link = &overo_dai,
        .num_links = 1,
@@ -96,7 +96,7 @@ static struct snd_soc_machine snd_soc_machine_overo = {
 
 /* Audio subsystem */
 static struct snd_soc_device overo_snd_devdata = {
-       .machine = &snd_soc_machine_overo,
+       .card = &snd_soc_card_overo,
        .platform = &omap_soc_platform,
        .codec_dev = &soc_codec_dev_twl4030,
 };
index 2718eaf7895f39d4db2e5d93e4227400b995b1a7..647f056a3cb33749e7572dbf666d78a1e4df84c0 100644 (file)
@@ -314,7 +314,7 @@ static struct snd_soc_dai_link corgi_dai = {
 };
 
 /* corgi audio machine driver */
-static struct snd_soc_machine snd_soc_machine_corgi = {
+static struct snd_soc_card snd_soc_corgi = {
        .name = "Corgi",
        .dai_link = &corgi_dai,
        .num_links = 1,
@@ -328,7 +328,7 @@ static struct wm8731_setup_data corgi_wm8731_setup = {
 
 /* corgi audio subsystem */
 static struct snd_soc_device corgi_snd_devdata = {
-       .machine = &snd_soc_machine_corgi,
+       .card = &snd_soc_corgi,
        .platform = &pxa2xx_soc_platform,
        .codec_dev = &soc_codec_dev_wm8731,
        .codec_data = &corgi_wm8731_setup,
index 6781c5be242fb75e3716eaa5bdbc3de3baf4c336..60c64861512a813f481f62f38d990d6dc70d2d7d 100644 (file)
@@ -29,7 +29,7 @@
 #include "pxa2xx-pcm.h"
 #include "pxa2xx-ac97.h"
 
-static struct snd_soc_machine e800;
+static struct snd_soc_card e800;
 
 static struct snd_soc_dai_link e800_dai[] = {
 {
@@ -40,14 +40,14 @@ static struct snd_soc_dai_link e800_dai[] = {
 },
 };
 
-static struct snd_soc_machine e800 = {
+static struct snd_soc_card e800 = {
        .name = "Toshiba e800",
        .dai_link = e800_dai,
        .num_links = ARRAY_SIZE(e800_dai),
 };
 
 static struct snd_soc_device e800_snd_devdata = {
-       .machine = &e800,
+       .card = &e800,
        .platform = &pxa2xx_soc_platform,
        .codec_dev = &soc_codec_dev_wm9712,
 };
index e6ff6929ab4b799f7b9875144681469c15e6d8fe..4a61925c3104da1e5cad6412b941e49067445916 100644 (file)
@@ -53,14 +53,14 @@ static struct snd_soc_dai_link em_x270_dai[] = {
        },
 };
 
-static struct snd_soc_machine em_x270 = {
+static struct snd_soc_card em_x270 = {
        .name = "EM-X270",
        .dai_link = em_x270_dai,
        .num_links = ARRAY_SIZE(em_x270_dai),
 };
 
 static struct snd_soc_device em_x270_snd_devdata = {
-       .machine = &em_x270,
+       .card = &em_x270,
        .platform = &pxa2xx_soc_platform,
        .codec_dev = &soc_codec_dev_wm9712,
 };
index e364abc700db1c21f0e06ee42c0b4a6aa7ca9fef..3bb8879ac8a2f1f2477e666659b4816ad7af8fc9 100644 (file)
@@ -189,14 +189,14 @@ static struct snd_soc_dai_link palm27x_dai[] = {
 },
 };
 
-static struct snd_soc_machine palm27x_asoc = {
+static struct snd_soc_card palm27x_asoc = {
        .name = "Palm/PXA27x",
        .dai_link = palm27x_dai,
        .num_links = ARRAY_SIZE(palm27x_dai),
 };
 
 static struct snd_soc_device palm27x_snd_devdata = {
-       .machine = &palm27x_asoc,
+       .card = &palm27x_asoc,
        .platform = &pxa2xx_soc_platform,
        .codec_dev = &soc_codec_dev_wm9712,
 };
index 4d9930c52789989313a8a1189bbc99b26160d8b2..03b510ab282446ba672d24da909ffbc83d5c8435 100644 (file)
@@ -276,7 +276,7 @@ static struct snd_soc_dai_link poodle_dai = {
 };
 
 /* poodle audio machine driver */
-static struct snd_soc_machine snd_soc_machine_poodle = {
+static struct snd_soc_card snd_soc_poodle = {
        .name = "Poodle",
        .dai_link = &poodle_dai,
        .num_links = 1,
@@ -290,7 +290,7 @@ static struct wm8731_setup_data poodle_wm8731_setup = {
 
 /* poodle audio subsystem */
 static struct snd_soc_device poodle_snd_devdata = {
-       .machine = &snd_soc_machine_poodle,
+       .card = &snd_soc_poodle,
        .platform = &pxa2xx_soc_platform,
        .codec_dev = &soc_codec_dev_wm8731,
        .codec_data = &poodle_wm8731_setup,
index d307b6757e9550646b565a4cffaac5abc0a02007..579d93368f14892e37ac1277856ef976339226ce 100644 (file)
@@ -319,7 +319,7 @@ static struct snd_soc_dai_link spitz_dai = {
 };
 
 /* spitz audio machine driver */
-static struct snd_soc_machine snd_soc_machine_spitz = {
+static struct snd_soc_card snd_soc_spitz = {
        .name = "Spitz",
        .dai_link = &spitz_dai,
        .num_links = 1,
@@ -333,7 +333,7 @@ static struct wm8750_setup_data spitz_wm8750_setup = {
 
 /* spitz audio subsystem */
 static struct snd_soc_device spitz_snd_devdata = {
-       .machine = &snd_soc_machine_spitz,
+       .card = &snd_soc_spitz,
        .platform = &pxa2xx_soc_platform,
        .codec_dev = &soc_codec_dev_wm8750,
        .codec_data = &spitz_wm8750_setup,
index afefe41b8c46c9f47ae255b14ec1ebed56e3522e..9d9be5a14d1449833ef306a3f25cfd7449452bae 100644 (file)
@@ -38,7 +38,7 @@
 #include "pxa2xx-pcm.h"
 #include "pxa2xx-ac97.h"
 
-static struct snd_soc_machine tosa;
+static struct snd_soc_card tosa;
 
 #define TOSA_HP        0
 #define TOSA_MIC_INT   1
@@ -230,14 +230,14 @@ static struct snd_soc_dai_link tosa_dai[] = {
 },
 };
 
-static struct snd_soc_machine tosa = {
+static struct snd_soc_card tosa = {
        .name = "Tosa",
        .dai_link = tosa_dai,
        .num_links = ARRAY_SIZE(tosa_dai),
 };
 
 static struct snd_soc_device tosa_snd_devdata = {
-       .machine = &tosa,
+       .card = &tosa,
        .platform = &pxa2xx_soc_platform,
        .codec_dev = &soc_codec_dev_wm9712,
 };
index 4eab2c19c454dbda65a62a4e000f05841332c0c5..a70cbc0fa070d716ffe6695c119974ad488705d9 100644 (file)
@@ -27,7 +27,7 @@
 #include "s3c24xx-pcm.h"
 #include "s3c24xx-ac97.h"
 
-static struct snd_soc_machine ln2440sbc;
+static struct snd_soc_card ln2440sbc;
 
 static struct snd_soc_dai_link ln2440sbc_dai[] = {
 {
@@ -38,14 +38,14 @@ static struct snd_soc_dai_link ln2440sbc_dai[] = {
 },
 };
 
-static struct snd_soc_machine ln2440sbc = {
+static struct snd_soc_card ln2440sbc = {
        .name = "LN2440SBC",
        .dai_link = ln2440sbc_dai,
        .num_links = ARRAY_SIZE(ln2440sbc_dai),
 };
 
 static struct snd_soc_device ln2440sbc_snd_ac97_devdata = {
-       .machine = &ln2440sbc,
+       .card = &ln2440sbc,
        .platform = &s3c24xx_soc_platform,
        .codec_dev = &soc_codec_dev_ac97,
 };
index 87ddfefcc2fba18b821f3b154fbe03d86e1bf3e7..528fc3f1b45bd0fb187bfff676c93759b9568236 100644 (file)
@@ -59,7 +59,7 @@
 #define NEO_CAPTURE_HEADSET            7
 #define NEO_CAPTURE_BLUETOOTH          8
 
-static struct snd_soc_machine neo1973;
+static struct snd_soc_card neo1973;
 static struct i2c_client *i2c;
 
 static int neo1973_hifi_hw_params(struct snd_pcm_substream *substream,
@@ -579,7 +579,7 @@ static struct snd_soc_dai_link neo1973_dai[] = {
 },
 };
 
-static struct snd_soc_machine neo1973 = {
+static struct snd_soc_card neo1973 = {
        .name = "neo1973",
        .dai_link = neo1973_dai,
        .num_links = ARRAY_SIZE(neo1973_dai),
@@ -591,7 +591,7 @@ static struct wm8753_setup_data neo1973_wm8753_setup = {
 };
 
 static struct snd_soc_device neo1973_snd_devdata = {
-       .machine = &neo1973,
+       .card = &neo1973,
        .platform = &s3c24xx_soc_platform,
        .codec_dev = &soc_codec_dev_wm8753,
        .codec_data = &neo1973_wm8753_setup,
index 92d90f2f6901e48d4408f0ab8e161035d0953f1e..23325fca1f64e4c074d89862d818d55f0fe4e25e 100644 (file)
@@ -232,7 +232,7 @@ static struct snd_soc_dai_link s3c24xx_uda134x_dai_link = {
        .ops = &s3c24xx_uda134x_ops,
 };
 
-static struct snd_soc_machine snd_soc_machine_s3c24xx_uda134x = {
+static struct snd_soc_card snd_soc_s3c24xx_uda134x = {
        .name = "S3C24XX_UDA134X",
        .dai_link = &s3c24xx_uda134x_dai_link,
        .num_links = 1,
@@ -270,7 +270,7 @@ static struct uda134x_platform_data s3c24xx_uda134x = {
 };
 
 static struct snd_soc_device s3c24xx_uda134x_snd_devdata = {
-       .machine = &snd_soc_machine_s3c24xx_uda134x,
+       .card = &snd_soc_s3c24xx_uda134x,
        .platform = &s3c24xx_soc_platform,
        .codec_dev = &soc_codec_dev_uda134x,
        .codec_data = &s3c24xx_uda134x,
index 8515d6ff03f2c50c5220f8a39cf9ec7a0389693d..3d2e6a0417ececed4e2c79805b036a327e20c78a 100644 (file)
@@ -23,7 +23,7 @@
 #include "s3c24xx-pcm.h"
 #include "s3c24xx-ac97.h"
 
-static struct snd_soc_machine smdk2443;
+static struct snd_soc_card smdk2443;
 
 static struct snd_soc_dai_link smdk2443_dai[] = {
 {
@@ -34,14 +34,14 @@ static struct snd_soc_dai_link smdk2443_dai[] = {
 },
 };
 
-static struct snd_soc_machine smdk2443 = {
+static struct snd_soc_card smdk2443 = {
        .name = "SMDK2443",
        .dai_link = smdk2443_dai,
        .num_links = ARRAY_SIZE(smdk2443_dai),
 };
 
 static struct snd_soc_device smdk2443_snd_ac97_devdata = {
-       .machine = &smdk2443,
+       .card = &smdk2443,
        .platform = &s3c24xx_soc_platform,
        .codec_dev = &soc_codec_dev_ac97,
 };
index 92bfaf4774a7d05fec84bf270539c8be09a6b05d..8b44f9c8a9ff32d574877cafc8f759fad506a310 100644 (file)
@@ -38,14 +38,14 @@ static struct snd_soc_dai_link sh7760_ac97_dai = {
        .ops = NULL,
 };
 
-static struct snd_soc_machine sh7760_ac97_soc_machine  = {
+static struct snd_soc_card sh7760_ac97_soc_machine  = {
        .name = "SH7760 AC97",
        .dai_link = &sh7760_ac97_dai,
        .num_links = 1,
 };
 
 static struct snd_soc_device sh7760_ac97_snd_devdata = {
-       .machine = &sh7760_ac97_soc_machine,
+       .card = &sh7760_ac97_soc_machine,
        .platform = &sh7760_soc_platform,
        .codec_dev = &soc_codec_dev_ac97,
 };
index 9feaa7b6dc348ca9701267abee09d5116b27bfaf..c5cb9516fea4cba1d5a515e423edd34aeccee791 100644 (file)
@@ -620,7 +620,7 @@ static struct snd_pcm_ops soc_pcm_ops = {
 static int soc_suspend(struct platform_device *pdev, pm_message_t state)
 {
        struct snd_soc_device *socdev = platform_get_drvdata(pdev);
-       struct snd_soc_machine *machine = socdev->machine;
+       struct snd_soc_card *card = socdev->card;
        struct snd_soc_platform *platform = socdev->platform;
        struct snd_soc_codec_device *codec_dev = socdev->codec_dev;
        struct snd_soc_codec *codec = socdev->codec;
@@ -644,14 +644,14 @@ static int soc_suspend(struct platform_device *pdev, pm_message_t state)
        }
 
        /* suspend all pcms */
-       for (i = 0; i < machine->num_links; i++)
-               snd_pcm_suspend_all(machine->dai_link[i].pcm);
+       for (i = 0; i < card->num_links; i++)
+               snd_pcm_suspend_all(card->dai_link[i].pcm);
 
-       if (machine->suspend_pre)
-               machine->suspend_pre(pdev, state);
+       if (card->suspend_pre)
+               card->suspend_pre(pdev, state);
 
-       for (i = 0; i < machine->num_links; i++) {
-               struct snd_soc_dai  *cpu_dai = machine->dai_link[i].cpu_dai;
+       for (i = 0; i < card->num_links; i++) {
+               struct snd_soc_dai  *cpu_dai = card->dai_link[i].cpu_dai;
                if (cpu_dai->suspend && cpu_dai->type != SND_SOC_DAI_AC97)
                        cpu_dai->suspend(pdev, cpu_dai);
                if (platform->suspend)
@@ -676,14 +676,14 @@ static int soc_suspend(struct platform_device *pdev, pm_message_t state)
        if (codec_dev->suspend)
                codec_dev->suspend(pdev, state);
 
-       for (i = 0; i < machine->num_links; i++) {
-               struct snd_soc_dai *cpu_dai = machine->dai_link[i].cpu_dai;
+       for (i = 0; i < card->num_links; i++) {
+               struct snd_soc_dai *cpu_dai = card->dai_link[i].cpu_dai;
                if (cpu_dai->suspend && cpu_dai->type == SND_SOC_DAI_AC97)
                        cpu_dai->suspend(pdev, cpu_dai);
        }
 
-       if (machine->suspend_post)
-               machine->suspend_post(pdev, state);
+       if (card->suspend_post)
+               card->suspend_post(pdev, state);
 
        return 0;
 }
@@ -696,7 +696,7 @@ static void soc_resume_deferred(struct work_struct *work)
        struct snd_soc_device *socdev = container_of(work,
                                                     struct snd_soc_device,
                                                     deferred_resume_work);
-       struct snd_soc_machine *machine = socdev->machine;
+       struct snd_soc_card *card = socdev->card;
        struct snd_soc_platform *platform = socdev->platform;
        struct snd_soc_codec_device *codec_dev = socdev->codec_dev;
        struct snd_soc_codec *codec = socdev->codec;
@@ -709,11 +709,11 @@ static void soc_resume_deferred(struct work_struct *work)
 
        dev_info(socdev->dev, "starting resume work\n");
 
-       if (machine->resume_pre)
-               machine->resume_pre(pdev);
+       if (card->resume_pre)
+               card->resume_pre(pdev);
 
-       for (i = 0; i < machine->num_links; i++) {
-               struct snd_soc_dai *cpu_dai = machine->dai_link[i].cpu_dai;
+       for (i = 0; i < card->num_links; i++) {
+               struct snd_soc_dai *cpu_dai = card->dai_link[i].cpu_dai;
                if (cpu_dai->resume && cpu_dai->type == SND_SOC_DAI_AC97)
                        cpu_dai->resume(pdev, cpu_dai);
        }
@@ -739,16 +739,16 @@ static void soc_resume_deferred(struct work_struct *work)
                        dai->dai_ops.digital_mute(dai, 0);
        }
 
-       for (i = 0; i < machine->num_links; i++) {
-               struct snd_soc_dai *cpu_dai = machine->dai_link[i].cpu_dai;
+       for (i = 0; i < card->num_links; i++) {
+               struct snd_soc_dai *cpu_dai = card->dai_link[i].cpu_dai;
                if (cpu_dai->resume && cpu_dai->type != SND_SOC_DAI_AC97)
                        cpu_dai->resume(pdev, cpu_dai);
                if (platform->resume)
                        platform->resume(pdev, cpu_dai);
        }
 
-       if (machine->resume_post)
-               machine->resume_post(pdev);
+       if (card->resume_post)
+               card->resume_post(pdev);
 
        dev_info(socdev->dev, "resume work completed\n");
 
@@ -779,18 +779,18 @@ static int soc_probe(struct platform_device *pdev)
 {
        int ret = 0, i;
        struct snd_soc_device *socdev = platform_get_drvdata(pdev);
-       struct snd_soc_machine *machine = socdev->machine;
+       struct snd_soc_card *card = socdev->card;
        struct snd_soc_platform *platform = socdev->platform;
        struct snd_soc_codec_device *codec_dev = socdev->codec_dev;
 
-       if (machine->probe) {
-               ret = machine->probe(pdev);
+       if (card->probe) {
+               ret = card->probe(pdev);
                if (ret < 0)
                        return ret;
        }
 
-       for (i = 0; i < machine->num_links; i++) {
-               struct snd_soc_dai *cpu_dai = machine->dai_link[i].cpu_dai;
+       for (i = 0; i < card->num_links; i++) {
+               struct snd_soc_dai *cpu_dai = card->dai_link[i].cpu_dai;
                if (cpu_dai->probe) {
                        ret = cpu_dai->probe(pdev, cpu_dai);
                        if (ret < 0)
@@ -825,13 +825,13 @@ platform_err:
 
 cpu_dai_err:
        for (i--; i >= 0; i--) {
-               struct snd_soc_dai *cpu_dai = machine->dai_link[i].cpu_dai;
+               struct snd_soc_dai *cpu_dai = card->dai_link[i].cpu_dai;
                if (cpu_dai->remove)
                        cpu_dai->remove(pdev, cpu_dai);
        }
 
-       if (machine->remove)
-               machine->remove(pdev);
+       if (card->remove)
+               card->remove(pdev);
 
        return ret;
 }
@@ -841,7 +841,7 @@ static int soc_remove(struct platform_device *pdev)
 {
        int i;
        struct snd_soc_device *socdev = platform_get_drvdata(pdev);
-       struct snd_soc_machine *machine = socdev->machine;
+       struct snd_soc_card *card = socdev->card;
        struct snd_soc_platform *platform = socdev->platform;
        struct snd_soc_codec_device *codec_dev = socdev->codec_dev;
 
@@ -853,14 +853,14 @@ static int soc_remove(struct platform_device *pdev)
        if (codec_dev->remove)
                codec_dev->remove(pdev);
 
-       for (i = 0; i < machine->num_links; i++) {
-               struct snd_soc_dai *cpu_dai = machine->dai_link[i].cpu_dai;
+       for (i = 0; i < card->num_links; i++) {
+               struct snd_soc_dai *cpu_dai = card->dai_link[i].cpu_dai;
                if (cpu_dai->remove)
                        cpu_dai->remove(pdev, cpu_dai);
        }
 
-       if (machine->remove)
-               machine->remove(pdev);
+       if (card->remove)
+               card->remove(pdev);
 
        return 0;
 }
@@ -1212,7 +1212,7 @@ EXPORT_SYMBOL_GPL(snd_soc_test_bits);
 int snd_soc_new_pcms(struct snd_soc_device *socdev, int idx, const char *xid)
 {
        struct snd_soc_codec *codec = socdev->codec;
-       struct snd_soc_machine *machine = socdev->machine;
+       struct snd_soc_card *card = socdev->card;
        int ret = 0, i;
 
        mutex_lock(&codec->mutex);
@@ -1231,11 +1231,11 @@ int snd_soc_new_pcms(struct snd_soc_device *socdev, int idx, const char *xid)
        strncpy(codec->card->driver, codec->name, sizeof(codec->card->driver));
 
        /* create the pcms */
-       for (i = 0; i < machine->num_links; i++) {
-               ret = soc_new_pcm(socdev, &machine->dai_link[i], i);
+       for (i = 0; i < card->num_links; i++) {
+               ret = soc_new_pcm(socdev, &card->dai_link[i], i);
                if (ret < 0) {
                        printk(KERN_ERR "asoc: can't create pcm %s\n",
-                               machine->dai_link[i].stream_name);
+                               card->dai_link[i].stream_name);
                        mutex_unlock(&codec->mutex);
                        return ret;
                }
@@ -1258,26 +1258,26 @@ EXPORT_SYMBOL_GPL(snd_soc_new_pcms);
 int snd_soc_register_card(struct snd_soc_device *socdev)
 {
        struct snd_soc_codec *codec = socdev->codec;
-       struct snd_soc_machine *machine = socdev->machine;
+       struct snd_soc_card *card = socdev->card;
        int ret = 0, i, ac97 = 0, err = 0;
 
-       for (i = 0; i < machine->num_links; i++) {
-               if (socdev->machine->dai_link[i].init) {
-                       err = socdev->machine->dai_link[i].init(codec);
+       for (i = 0; i < card->num_links; i++) {
+               if (card->dai_link[i].init) {
+                       err = card->dai_link[i].init(codec);
                        if (err < 0) {
                                printk(KERN_ERR "asoc: failed to init %s\n",
-                                       socdev->machine->dai_link[i].stream_name);
+                                       card->dai_link[i].stream_name);
                                continue;
                        }
                }
-               if (socdev->machine->dai_link[i].codec_dai->type ==
+               if (card->dai_link[i].codec_dai->type ==
                        SND_SOC_DAI_AC97_BUS)
                        ac97 = 1;
        }
        snprintf(codec->card->shortname, sizeof(codec->card->shortname),
-                "%s", machine->name);
+                "%s",  card->name);
        snprintf(codec->card->longname, sizeof(codec->card->longname),
-                "%s (%s)", machine->name, codec->name);
+                "%s (%s)", card->name, codec->name);
 
        ret = snd_card_register(codec->card);
        if (ret < 0) {
index 0fecbb44726b9d7fb19e2ca550461f4589fa242c..61d7d85aa578f9062c43ae7fcaba2703c42aa54d 100644 (file)
@@ -1402,11 +1402,11 @@ int snd_soc_dapm_set_bias_level(struct snd_soc_device *socdev,
                                enum snd_soc_bias_level level)
 {
        struct snd_soc_codec *codec = socdev->codec;
-       struct snd_soc_machine *machine = socdev->machine;
+       struct snd_soc_card *card = socdev->card;
        int ret = 0;
 
-       if (machine->set_bias_level)
-               ret = machine->set_bias_level(machine, level);
+       if (card->set_bias_level)
+               ret = card->set_bias_level(card, level);
        if (ret == 0 && codec->set_bias_level)
                ret = codec->set_bias_level(codec, level);