From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org,
Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: [PATCH 11/18] ASoC: Use a shared define for AC97 CODEC data formats
Date: Tue, 5 May 2009 11:02:24 +0100 [thread overview]
Message-ID: <1241517751-2634-11-git-send-email-broonie@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <20090505100123.GB2050@rakim.wolfsonmicro.main>
The AC97 wire format is completely fixed so CODECs don't have any choice
about the formats they accept but controllers accept a variety of data
formats and render them down onto the bus. Have a shared define so all
the CODEC drivers will interoperate with any of our controller drivers.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
include/sound/soc-dai.h | 3 +++
sound/soc/codecs/ac97.c | 4 ++--
sound/soc/codecs/ad1980.c | 4 ++--
sound/soc/codecs/wm9705.c | 4 ++--
sound/soc/codecs/wm9712.c | 6 +++---
sound/soc/codecs/wm9713.c | 6 +++---
6 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h
index 22b729f..ea07b4b 100644
--- a/include/sound/soc-dai.h
+++ b/include/sound/soc-dai.h
@@ -96,6 +96,9 @@ struct snd_pcm_substream;
#define SND_SOC_CLOCK_IN 0
#define SND_SOC_CLOCK_OUT 1
+#define SND_SOC_STD_AC97_FMTS (SNDRV_PCM_FMTBIT_S16_LE |\
+ SNDRV_PCM_FMTBIT_S32_LE)
+
struct snd_soc_dai_ops;
struct snd_soc_dai;
struct snd_ac97_bus_ops;
diff --git a/sound/soc/codecs/ac97.c b/sound/soc/codecs/ac97.c
index b0d4af1..932299b 100644
--- a/sound/soc/codecs/ac97.c
+++ b/sound/soc/codecs/ac97.c
@@ -53,13 +53,13 @@ struct snd_soc_dai ac97_dai = {
.channels_min = 1,
.channels_max = 2,
.rates = STD_AC97_RATES,
- .formats = SNDRV_PCM_FMTBIT_S16_LE,},
+ .formats = SND_SOC_STD_AC97_FMTS,},
.capture = {
.stream_name = "AC97 Capture",
.channels_min = 1,
.channels_max = 2,
.rates = STD_AC97_RATES,
- .formats = SNDRV_PCM_FMTBIT_S16_LE,},
+ .formats = SND_SOC_STD_AC97_FMTS,},
.ops = &ac97_dai_ops,
};
EXPORT_SYMBOL_GPL(ac97_dai);
diff --git a/sound/soc/codecs/ad1980.c b/sound/soc/codecs/ad1980.c
index ddb3b08..d7440a9 100644
--- a/sound/soc/codecs/ad1980.c
+++ b/sound/soc/codecs/ad1980.c
@@ -137,13 +137,13 @@ struct snd_soc_dai ad1980_dai = {
.channels_min = 2,
.channels_max = 6,
.rates = SNDRV_PCM_RATE_48000,
- .formats = SNDRV_PCM_FMTBIT_S16_LE, },
+ .formats = SND_SOC_STD_AC97_FMTS, },
.capture = {
.stream_name = "Capture",
.channels_min = 2,
.channels_max = 2,
.rates = SNDRV_PCM_RATE_48000,
- .formats = SNDRV_PCM_FMTBIT_S16_LE, },
+ .formats = SND_SOC_STD_AC97_FMTS, },
};
EXPORT_SYMBOL_GPL(ad1980_dai);
diff --git a/sound/soc/codecs/wm9705.c b/sound/soc/codecs/wm9705.c
index c2d1a7a..fa88b46 100644
--- a/sound/soc/codecs/wm9705.c
+++ b/sound/soc/codecs/wm9705.c
@@ -282,14 +282,14 @@ struct snd_soc_dai wm9705_dai[] = {
.channels_min = 1,
.channels_max = 2,
.rates = WM9705_AC97_RATES,
- .formats = SNDRV_PCM_FMTBIT_S16_LE,
+ .formats = SND_SOC_STD_AC97_FMTS,
},
.capture = {
.stream_name = "HiFi Capture",
.channels_min = 1,
.channels_max = 2,
.rates = WM9705_AC97_RATES,
- .formats = SNDRV_PCM_FMTBIT_S16_LE,
+ .formats = SND_SOC_STD_AC97_FMTS,
},
.ops = &wm9705_dai_ops,
},
diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c
index 765cf1e..550c903 100644
--- a/sound/soc/codecs/wm9712.c
+++ b/sound/soc/codecs/wm9712.c
@@ -534,13 +534,13 @@ struct snd_soc_dai wm9712_dai[] = {
.channels_min = 1,
.channels_max = 2,
.rates = WM9712_AC97_RATES,
- .formats = SNDRV_PCM_FMTBIT_S16_LE,},
+ .formats = SND_SOC_STD_AC97_FMTS,},
.capture = {
.stream_name = "HiFi Capture",
.channels_min = 1,
.channels_max = 2,
.rates = WM9712_AC97_RATES,
- .formats = SNDRV_PCM_FMTBIT_S16_LE,},
+ .formats = SND_SOC_STD_AC97_FMTS,},
.ops = &wm9712_dai_ops_hifi,
},
{
@@ -550,7 +550,7 @@ struct snd_soc_dai wm9712_dai[] = {
.channels_min = 1,
.channels_max = 1,
.rates = WM9712_AC97_RATES,
- .formats = SNDRV_PCM_FMTBIT_S16_LE,},
+ .formats = SND_SOC_STD_AC97_FMTS,},
.ops = &wm9712_dai_ops_aux,
}
};
diff --git a/sound/soc/codecs/wm9713.c b/sound/soc/codecs/wm9713.c
index a6feb78..d1744e9 100644
--- a/sound/soc/codecs/wm9713.c
+++ b/sound/soc/codecs/wm9713.c
@@ -1040,13 +1040,13 @@ struct snd_soc_dai wm9713_dai[] = {
.channels_min = 1,
.channels_max = 2,
.rates = WM9713_RATES,
- .formats = SNDRV_PCM_FMTBIT_S16_LE,},
+ .formats = SND_SOC_STD_AC97_FMTS,},
.capture = {
.stream_name = "HiFi Capture",
.channels_min = 1,
.channels_max = 2,
.rates = WM9713_RATES,
- .formats = SNDRV_PCM_FMTBIT_S16_LE,},
+ .formats = SND_SOC_STD_AC97_FMTS,},
.ops = &wm9713_dai_ops_hifi,
},
{
@@ -1056,7 +1056,7 @@ struct snd_soc_dai wm9713_dai[] = {
.channels_min = 1,
.channels_max = 1,
.rates = WM9713_RATES,
- .formats = SNDRV_PCM_FMTBIT_S16_LE,},
+ .formats = SND_SOC_STD_AC97_FMTS,},
.ops = &wm9713_dai_ops_aux,
},
{
--
1.6.2.4
next prev parent reply other threads:[~2009-05-05 10:02 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-05 10:01 ASoC updates for 2.6.31 Mark Brown
2009-05-05 10:02 ` [PATCH 01/18] ASoC: Fix error message formatting in s3c64xx-i2s driver Mark Brown
2009-05-05 10:02 ` [PATCH 02/18] ASoC: Check for supported CPUs when building s3c-i2s-v2 Mark Brown
2009-05-05 10:02 ` [PATCH 03/18] ASoC: Make S3C64xx clock export function to return struct clk Mark Brown
2009-05-05 10:02 ` [PATCH 04/18] ASoC: Fix data format configuration for S3C64xx IISv2 and add 24 bit Mark Brown
2009-05-05 10:02 ` [PATCH 05/18] ASoC: Fix boot warnings from S3C IISv2 Mark Brown
2009-05-05 10:02 ` [PATCH 06/18] ASoC: Allow use of resource from the platform device for " Mark Brown
2009-05-05 10:02 ` [PATCH 07/18] ASoC: Display the clock rate used as the basis for rate calculation Mark Brown
2009-05-05 10:02 ` [PATCH 08/18] ASoC: Display S3C IISv2 mode and MS errors by default Mark Brown
2009-05-05 10:02 ` [PATCH 09/18] ASoC: Staticise txctrl and rxctrl for S3C IISv2 Mark Brown
2009-05-05 10:02 ` [PATCH 10/18] ASoC: Use platform device resource for S3C64xx IISv2 Mark Brown
2009-05-05 10:02 ` Mark Brown [this message]
2009-05-05 10:02 ` [PATCH 12/18] ASoC: Remove unused DAI format defines Mark Brown
2009-05-05 10:02 ` [PATCH 13/18] ASoC: Fix errors in WM8990 Mark Brown
2009-05-05 10:02 ` [PATCH 14/18] ASoC: TWL4030: Add VDL analog bypass Mark Brown
2009-05-05 10:02 ` [PATCH 15/18] ASoC: TWL4030: Add voice digital loopback: sidetone Mark Brown
2009-05-05 10:02 ` [PATCH 16/18] ASoC: IMote2 ASoC Support Mark Brown
2009-05-05 10:02 ` [PATCH 17/18] ASoC: TWL4030: Add VIBRA output Mark Brown
2009-05-05 10:02 ` [PATCH 18/18] ASoC: Remove redundant codec pointer from DAIs Mark Brown
2009-05-05 10:45 ` ASoC updates for 2.6.31 Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1241517751-2634-11-git-send-email-broonie@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox