Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 87506549 authored by Mark Brown's avatar Mark Brown
Browse files

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: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 9b0db7e7
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -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,
+4 −4
Original line number Diff line number Diff line
@@ -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;
+2 −2
Original line number Diff line number Diff line
@@ -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,
+2 −2
Original line number Diff line number Diff line
@@ -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,
+2 −2
Original line number Diff line number Diff line
@@ -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,
};
Loading