Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 148316
b: refs/heads/master
c: be461ba
h: refs/heads/master
v: v3
  • Loading branch information
Chaithrika U S authored and Mark Brown committed May 28, 2009
1 parent f03c270 commit b3dc5f0
Show file tree
Hide file tree
Showing 5 changed files with 93 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 449bd54dcbd0b60070ce4129fedaf0f4ae044099
refs/heads/master: be461ba836770263826457624bc4a5173a1f5040
4 changes: 4 additions & 0 deletions trunk/sound/soc/codecs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ config SND_SOC_ALL_CODECS
select SND_SOC_AK4535 if I2C
select SND_SOC_CS4270 if I2C
select SND_SOC_PCM3008
select SND_SOC_SPDIF
select SND_SOC_SSM2602 if I2C
select SND_SOC_STAC9766 if SND_SOC_AC97_BUS
select SND_SOC_TLV320AIC23 if I2C
Expand Down Expand Up @@ -91,6 +92,9 @@ config SND_SOC_L3
config SND_SOC_PCM3008
tristate

config SND_SOC_SPDIF
tristate

config SND_SOC_SSM2602
tristate

Expand Down
2 changes: 2 additions & 0 deletions trunk/sound/soc/codecs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ snd-soc-ak4535-objs := ak4535.o
snd-soc-cs4270-objs := cs4270.o
snd-soc-l3-objs := l3.o
snd-soc-pcm3008-objs := pcm3008.o
snd-soc-spdif-objs := spdif_transciever.o
snd-soc-ssm2602-objs := ssm2602.o
snd-soc-stac9766-objs := stac9766.o
snd-soc-tlv320aic23-objs := tlv320aic23.o
Expand Down Expand Up @@ -42,6 +43,7 @@ obj-$(CONFIG_SND_SOC_AK4535) += snd-soc-ak4535.o
obj-$(CONFIG_SND_SOC_CS4270) += snd-soc-cs4270.o
obj-$(CONFIG_SND_SOC_L3) += snd-soc-l3.o
obj-$(CONFIG_SND_SOC_PCM3008) += snd-soc-pcm3008.o
obj-$(CONFIG_SND_SOC_SPDIF) += snd-soc-spdif.o
obj-$(CONFIG_SND_SOC_SSM2602) += snd-soc-ssm2602.o
obj-$(CONFIG_SND_SOC_STAC9766) += snd-soc-stac9766.o
obj-$(CONFIG_SND_SOC_TLV320AIC23) += snd-soc-tlv320aic23.o
Expand Down
69 changes: 69 additions & 0 deletions trunk/sound/soc/codecs/spdif_transciever.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/*
* ALSA SoC SPDIF DIT driver
*
* This driver is used by controllers which can operate in DIT (SPDI/F) where
* no codec is needed. This file provides stub codec that can be used
* in these configurations. TI DaVinci Audio controller uses this driver.
*
* Author: Steve Chen, <schen@mvista.com>
* Copyright: (C) 2009 MontaVista Software, Inc., <source@mvista.com>
* Copyright: (C) 2009 Texas Instruments, India
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/

#include <linux/module.h>
#include <linux/moduleparam.h>
#include <sound/soc.h>
#include <sound/pcm.h>

#define STUB_RATES SNDRV_PCM_RATE_8000_96000
#define STUB_FORMATS SNDRV_PCM_FMTBIT_S16_LE


struct snd_soc_dai dit_stub_dai = {
.name = "DIT",
.playback = {
.stream_name = "Playback",
.channels_min = 1,
.channels_max = 384,
.rates = STUB_RATES,
.formats = STUB_FORMATS,
},
};

static int spdif_dit_probe(struct platform_device *pdev)
{
return snd_soc_register_dai(&dit_stub_dai);
}

static int spdif_dit_remove(struct platform_device *pdev)
{
snd_soc_unregister_dai(&dit_stub_dai);
return 0;
}

static struct platform_driver spdif_dit_driver = {
.probe = spdif_dit_probe,
.remove = spdif_dit_remove,
.driver = {
.name = "spdif-dit",
.owner = THIS_MODULE,
},
};

static int __init dit_modinit(void)
{
return platform_driver_register(&spdif_dit_driver);
}

static void __exit dit_exit(void)
{
platform_driver_unregister(&spdif_dit_driver);
}

module_init(dit_modinit);
module_exit(dit_exit);

17 changes: 17 additions & 0 deletions trunk/sound/soc/codecs/spdif_transciever.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* ALSA SoC DIT/DIR driver header
*
* Author: Steve Chen, <schen@mvista.com>
* Copyright: (C) 2008 MontaVista Software, Inc., <source@mvista.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/

#ifndef CODEC_STUBS_H
#define CODEC_STUBS_H

extern struct snd_soc_dai dit_stub_dai;

#endif /* CODEC_STUBS_H */

0 comments on commit b3dc5f0

Please sign in to comment.