Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 206621
b: refs/heads/master
c: 49e7042
h: refs/heads/master
i:
  206619: d16d243
v: v3
  • Loading branch information
Takashi Iwai committed Jul 21, 2010
1 parent 3300329 commit fc4da3b
Show file tree
Hide file tree
Showing 31 changed files with 323 additions and 114 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 01ea6ba2bce64112623dbf8c45ce487062b65446
refs/heads/master: 49e704279953b652ec6adc7f5dec412ad118a938
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-davinci/board-da830-evm.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ static struct snd_platform_data da830_evm_snd_data = {
.num_serializer = ARRAY_SIZE(da830_iis_serializer_direction),
.tdm_slots = 2,
.serial_dir = da830_iis_serializer_direction,
.eventq_no = EVENTQ_0,
.asp_chan_q = EVENTQ_0,
.version = MCASP_VERSION_2,
.txnumevt = 1,
.rxnumevt = 1,
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-davinci/board-da850-evm.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ static struct snd_platform_data da850_evm_snd_data = {
.num_serializer = ARRAY_SIZE(da850_iis_serializer_direction),
.tdm_slots = 2,
.serial_dir = da850_iis_serializer_direction,
.eventq_no = EVENTQ_1,
.asp_chan_q = EVENTQ_1,
.version = MCASP_VERSION_2,
.txnumevt = 1,
.rxnumevt = 1,
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/arm/mach-davinci/board-dm646x-evm.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ static struct snd_platform_data dm646x_evm_snd_data[] = {
.num_serializer = ARRAY_SIZE(dm646x_iis_serializer_direction),
.tdm_slots = 2,
.serial_dir = dm646x_iis_serializer_direction,
.eventq_no = EVENTQ_0,
.asp_chan_q = EVENTQ_0,
},
{
.tx_dma_offset = 0x400,
Expand All @@ -332,7 +332,7 @@ static struct snd_platform_data dm646x_evm_snd_data[] = {
.num_serializer = ARRAY_SIZE(dm646x_dit_serializer_direction),
.tdm_slots = 32,
.serial_dir = dm646x_dit_serializer_direction,
.eventq_no = EVENTQ_0,
.asp_chan_q = EVENTQ_0,
},
};

Expand Down
3 changes: 2 additions & 1 deletion trunk/arch/arm/mach-davinci/include/mach/asp.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@
struct snd_platform_data {
u32 tx_dma_offset;
u32 rx_dma_offset;
enum dma_event_q eventq_no; /* event queue number */
enum dma_event_q asp_chan_q; /* event queue number for ASP channel */
enum dma_event_q ram_chan_q; /* event queue number for RAM channel */
unsigned int codec_fmt;
/*
* Allowing this is more efficient and eliminates left and right swaps
Expand Down
47 changes: 41 additions & 6 deletions trunk/include/sound/sh_fsi.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
* published by the Free Software Foundation.
*/

#define FSI_PORT_A 0
#define FSI_PORT_B 1

/* flags format
* 0xABCDEEFF
Expand Down Expand Up @@ -55,12 +58,12 @@
#define SH_FSI_GET_IFMT(x) ((x >> 8) & SH_FSI_FMT_MASK)
#define SH_FSI_GET_OFMT(x) ((x >> 0) & SH_FSI_FMT_MASK)

#define SH_FSI_FMT_MONO (1 << 0)
#define SH_FSI_FMT_MONO_DELAY (1 << 1)
#define SH_FSI_FMT_PCM (1 << 2)
#define SH_FSI_FMT_I2S (1 << 3)
#define SH_FSI_FMT_TDM (1 << 4)
#define SH_FSI_FMT_TDM_DELAY (1 << 5)
#define SH_FSI_FMT_MONO 0
#define SH_FSI_FMT_MONO_DELAY 1
#define SH_FSI_FMT_PCM 2
#define SH_FSI_FMT_I2S 3
#define SH_FSI_FMT_TDM 4
#define SH_FSI_FMT_TDM_DELAY 5

#define SH_FSI_IFMT_TDM_CH(x) \
(SH_FSI_IFMT(TDM) | SH_FSI_SET_CH_I(x))
Expand All @@ -72,9 +75,41 @@
#define SH_FSI_OFMT_TDM_DELAY_CH(x) \
(SH_FSI_OFMT(TDM_DELAY) | SH_FSI_SET_CH_O(x))


/*
* set_rate return value
*
* see ACKMD/BPFMD on
* ACK_MD (FSI2)
* CKG1 (FSI)
*
* err: return value < 0
*
* 0x-00000AB
*
* A: ACKMD value
* B: BPFMD value
*/

#define SH_FSI_ACKMD_MASK (0xF << 0)
#define SH_FSI_ACKMD_512 (1 << 0)
#define SH_FSI_ACKMD_256 (2 << 0)
#define SH_FSI_ACKMD_128 (3 << 0)
#define SH_FSI_ACKMD_64 (4 << 0)
#define SH_FSI_ACKMD_32 (5 << 0)

#define SH_FSI_BPFMD_MASK (0xF << 4)
#define SH_FSI_BPFMD_512 (1 << 4)
#define SH_FSI_BPFMD_256 (2 << 4)
#define SH_FSI_BPFMD_128 (3 << 4)
#define SH_FSI_BPFMD_64 (4 << 4)
#define SH_FSI_BPFMD_32 (5 << 4)
#define SH_FSI_BPFMD_16 (6 << 4)

struct sh_fsi_platform_info {
unsigned long porta_flags;
unsigned long portb_flags;
int (*set_rate)(int is_porta, int rate); /* for master mode */
};

extern struct snd_soc_dai fsi_soc_dai[2];
Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/soc/au1x/psc-i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ struct snd_soc_dai au1xpsc_i2s_dai = {
};
EXPORT_SYMBOL(au1xpsc_i2s_dai);

static int __init au1xpsc_i2s_drvprobe(struct platform_device *pdev)
static int __devinit au1xpsc_i2s_drvprobe(struct platform_device *pdev)
{
struct resource *r;
unsigned long sel;
Expand Down
6 changes: 2 additions & 4 deletions trunk/sound/soc/blackfin/bf5xx-ac97.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,7 @@ EXPORT_SYMBOL_GPL(soc_ac97_ops);
#ifdef CONFIG_PM
static int bf5xx_ac97_suspend(struct snd_soc_dai *dai)
{
struct sport_device *sport =
(struct sport_device *)dai->private_data;
struct sport_device *sport = dai->private_data;

pr_debug("%s : sport %d\n", __func__, dai->id);
if (!dai->active)
Expand All @@ -271,8 +270,7 @@ static int bf5xx_ac97_suspend(struct snd_soc_dai *dai)
static int bf5xx_ac97_resume(struct snd_soc_dai *dai)
{
int ret;
struct sport_device *sport =
(struct sport_device *)dai->private_data;
struct sport_device *sport = dai->private_data;

pr_debug("%s : sport %d\n", __func__, dai->id);
if (!dai->active)
Expand Down
6 changes: 2 additions & 4 deletions trunk/sound/soc/blackfin/bf5xx-tdm.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,7 @@ static int bf5xx_tdm_set_channel_map(struct snd_soc_dai *dai,
#ifdef CONFIG_PM
static int bf5xx_tdm_suspend(struct snd_soc_dai *dai)
{
struct sport_device *sport =
(struct sport_device *)dai->private_data;
struct sport_device *sport = dai->private_data;

if (!dai->active)
return 0;
Expand All @@ -225,8 +224,7 @@ static int bf5xx_tdm_suspend(struct snd_soc_dai *dai)
static int bf5xx_tdm_resume(struct snd_soc_dai *dai)
{
int ret;
struct sport_device *sport =
(struct sport_device *)dai->private_data;
struct sport_device *sport = dai->private_data;

if (!dai->active)
return 0;
Expand Down
4 changes: 2 additions & 2 deletions trunk/sound/soc/codecs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ config SND_SOC_ALL_CODECS

config SND_SOC_WM_HUBS
tristate
default y if SND_SOC_WM8993=y
default m if SND_SOC_WM8993=m
default y if SND_SOC_WM8993=y || SND_SOC_WM8994=y
default m if SND_SOC_WM8993=m || SND_SOC_WM8994=m

config SND_SOC_AC97_CODEC
tristate
Expand Down
2 changes: 2 additions & 0 deletions trunk/sound/soc/codecs/wm8727.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ static __devinit int wm8727_platform_probe(struct platform_device *pdev)
goto err_codec;
}

return 0;

err_codec:
snd_soc_unregister_codec(codec);
err:
Expand Down
1 change: 0 additions & 1 deletion trunk/sound/soc/codecs/wm8776.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ SOC_DAPM_SINGLE("Bypass Switch", WM8776_OUTMUX, 2, 1, 0),

static const struct snd_soc_dapm_widget wm8776_dapm_widgets[] = {
SND_SOC_DAPM_INPUT("AUX"),
SND_SOC_DAPM_INPUT("AUX"),

SND_SOC_DAPM_INPUT("AIN1"),
SND_SOC_DAPM_INPUT("AIN2"),
Expand Down
1 change: 0 additions & 1 deletion trunk/sound/soc/codecs/wm8988.c
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,6 @@ static int wm8988_register(struct wm8988_priv *wm8988,
ret = snd_soc_register_dai(&wm8988_dai);
if (ret != 0) {
dev_err(codec->dev, "Failed to register DAI: %d\n", ret);
snd_soc_unregister_codec(codec);
goto err_codec;
}

Expand Down
32 changes: 32 additions & 0 deletions trunk/sound/soc/codecs/wm8994.c
Original file line number Diff line number Diff line change
Expand Up @@ -2361,6 +2361,20 @@ SOC_DAPM_SINGLE("AIF2 Switch", WM8994_AIF1_ADC1_RIGHT_MIXER_ROUTING,
0, 1, 0),
};

static const struct snd_kcontrol_new aif1adc2l_mix[] = {
SOC_DAPM_SINGLE("DMIC Switch", WM8994_AIF1_ADC2_LEFT_MIXER_ROUTING,
1, 1, 0),
SOC_DAPM_SINGLE("AIF2 Switch", WM8994_AIF1_ADC2_LEFT_MIXER_ROUTING,
0, 1, 0),
};

static const struct snd_kcontrol_new aif1adc2r_mix[] = {
SOC_DAPM_SINGLE("DMIC Switch", WM8994_AIF1_ADC2_RIGHT_MIXER_ROUTING,
1, 1, 0),
SOC_DAPM_SINGLE("AIF2 Switch", WM8994_AIF1_ADC2_RIGHT_MIXER_ROUTING,
0, 1, 0),
};

static const struct snd_kcontrol_new aif2dac2l_mix[] = {
SOC_DAPM_SINGLE("Right Sidetone Switch", WM8994_DAC2_LEFT_MIXER_ROUTING,
5, 1, 0),
Expand Down Expand Up @@ -2527,6 +2541,11 @@ SND_SOC_DAPM_MIXER("AIF1ADC1L Mixer", SND_SOC_NOPM, 0, 0,
SND_SOC_DAPM_MIXER("AIF1ADC1R Mixer", SND_SOC_NOPM, 0, 0,
aif1adc1r_mix, ARRAY_SIZE(aif1adc1r_mix)),

SND_SOC_DAPM_MIXER("AIF1ADC2L Mixer", SND_SOC_NOPM, 0, 0,
aif1adc2l_mix, ARRAY_SIZE(aif1adc2l_mix)),
SND_SOC_DAPM_MIXER("AIF1ADC2R Mixer", SND_SOC_NOPM, 0, 0,
aif1adc2r_mix, ARRAY_SIZE(aif1adc2r_mix)),

SND_SOC_DAPM_MIXER("AIF2DAC2L Mixer", SND_SOC_NOPM, 0, 0,
aif2dac2l_mix, ARRAY_SIZE(aif2dac2l_mix)),
SND_SOC_DAPM_MIXER("AIF2DAC2R Mixer", SND_SOC_NOPM, 0, 0,
Expand Down Expand Up @@ -2689,6 +2708,14 @@ static const struct snd_soc_dapm_route intercon[] = {
{ "AIF1ADC1R Mixer", "ADC/DMIC Switch", "ADCR Mux" },
{ "AIF1ADC1R Mixer", "AIF2 Switch", "AIF2DACR" },

{ "AIF1ADC2L", NULL, "AIF1ADC2L Mixer" },
{ "AIF1ADC2L Mixer", "DMIC Switch", "DMIC2L" },
{ "AIF1ADC2L Mixer", "AIF2 Switch", "AIF2DACL" },

{ "AIF1ADC2R", NULL, "AIF1ADC2R Mixer" },
{ "AIF1ADC2R Mixer", "DMIC Switch", "DMIC2R" },
{ "AIF1ADC2R Mixer", "AIF2 Switch", "AIF2DACR" },

/* Pin level routing for AIF3 */
{ "AIF1DAC1L", NULL, "AIF1DAC Mux" },
{ "AIF1DAC1R", NULL, "AIF1DAC Mux" },
Expand Down Expand Up @@ -4047,6 +4074,11 @@ static int wm8994_codec_probe(struct platform_device *pdev)
1 << WM8994_AIF2DAC_3D_GAIN_SHIFT,
1 << WM8994_AIF2DAC_3D_GAIN_SHIFT);

/* Unconditionally enable AIF1 ADC TDM mode; it only affects
* behaviour on idle TDM clock cycles. */
snd_soc_update_bits(codec, WM8994_AIF1_CONTROL_1,
WM8994_AIF1ADC_TDM, WM8994_AIF1ADC_TDM);

wm8994_update_class_w(codec);

ret = snd_soc_register_codec(codec);
Expand Down
2 changes: 2 additions & 0 deletions trunk/sound/soc/codecs/wm_hubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,8 @@ static int hp_event(struct snd_soc_dapm_widget *w,
WM8993_HPOUT1L_DLY |
WM8993_HPOUT1R_DLY, 0);

snd_soc_write(codec, WM8993_DC_SERVO_0, 0);

snd_soc_update_bits(codec, WM8993_POWER_MANAGEMENT_1,
WM8993_HPOUT1L_ENA | WM8993_HPOUT1R_ENA,
0);
Expand Down
10 changes: 10 additions & 0 deletions trunk/sound/soc/davinci/davinci-i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,8 @@ static int davinci_i2s_probe(struct platform_device *pdev)
struct snd_platform_data *pdata = pdev->dev.platform_data;
struct davinci_mcbsp_dev *dev;
struct resource *mem, *ioarea, *res;
enum dma_event_q asp_chan_q = EVENTQ_0;
enum dma_event_q ram_chan_q = EVENTQ_1;
int ret;

mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
Expand Down Expand Up @@ -676,7 +678,15 @@ static int davinci_i2s_probe(struct platform_device *pdev)
pdata->sram_size_capture;
dev->clk_input_pin = pdata->clk_input_pin;
dev->i2s_accurate_sck = pdata->i2s_accurate_sck;
asp_chan_q = pdata->asp_chan_q;
ram_chan_q = pdata->ram_chan_q;
}

dev->dma_params[SNDRV_PCM_STREAM_PLAYBACK].asp_chan_q = asp_chan_q;
dev->dma_params[SNDRV_PCM_STREAM_PLAYBACK].ram_chan_q = ram_chan_q;
dev->dma_params[SNDRV_PCM_STREAM_CAPTURE].asp_chan_q = asp_chan_q;
dev->dma_params[SNDRV_PCM_STREAM_CAPTURE].ram_chan_q = ram_chan_q;

dev->clk = clk_get(&pdev->dev, NULL);
if (IS_ERR(dev->clk)) {
ret = -ENODEV;
Expand Down
6 changes: 4 additions & 2 deletions trunk/sound/soc/davinci/davinci-mcasp.c
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,8 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
dev->rxnumevt = pdata->rxnumevt;

dma_data = &dev->dma_params[SNDRV_PCM_STREAM_PLAYBACK];
dma_data->eventq_no = pdata->eventq_no;
dma_data->asp_chan_q = pdata->asp_chan_q;
dma_data->ram_chan_q = pdata->ram_chan_q;
dma_data->dma_addr = (dma_addr_t) (pdata->tx_dma_offset +
io_v2p(dev->base));

Expand All @@ -904,7 +905,8 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
dma_data->channel = res->start;

dma_data = &dev->dma_params[SNDRV_PCM_STREAM_CAPTURE];
dma_data->eventq_no = pdata->eventq_no;
dma_data->asp_chan_q = pdata->asp_chan_q;
dma_data->ram_chan_q = pdata->ram_chan_q;
dma_data->dma_addr = (dma_addr_t)(pdata->rx_dma_offset +
io_v2p(dev->base));

Expand Down
7 changes: 4 additions & 3 deletions trunk/sound/soc/davinci/davinci-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ static int request_ping_pong(struct snd_pcm_substream *substream,
/* Request ram master channel */
link = prtd->ram_channel = edma_alloc_channel(EDMA_CHANNEL_ANY,
davinci_pcm_dma_irq, substream,
EVENTQ_1);
prtd->params->ram_chan_q);
if (link < 0)
goto exit1;

Expand Down Expand Up @@ -477,7 +477,8 @@ static int davinci_pcm_dma_request(struct snd_pcm_substream *substream)

/* Request asp master DMA channel */
link = prtd->asp_channel = edma_alloc_channel(params->channel,
davinci_pcm_dma_irq, substream, EVENTQ_0);
davinci_pcm_dma_irq, substream,
prtd->params->asp_chan_q);
if (link < 0)
goto exit1;

Expand Down Expand Up @@ -800,7 +801,7 @@ static void davinci_pcm_free(struct snd_pcm *pcm)
dma_free_writecombine(pcm->card->dev, buf->bytes,
buf->area, buf->addr);
buf->area = NULL;
iram_dma = (struct snd_dma_buffer *)buf->private_data;
iram_dma = buf->private_data;
if (iram_dma) {
sram_free(iram_dma->area, iram_dma->bytes);
kfree(iram_dma);
Expand Down
3 changes: 2 additions & 1 deletion trunk/sound/soc/davinci/davinci-pcm.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ struct davinci_pcm_dma_params {
unsigned short acnt;
dma_addr_t dma_addr; /* device physical address for DMA */
unsigned sram_size;
enum dma_event_q eventq_no; /* event queue number */
enum dma_event_q asp_chan_q; /* event queue number for ASP channel */
enum dma_event_q ram_chan_q; /* event queue number for RAM channel */
unsigned char data_type; /* xfer data type */
unsigned char convert_mono_stereo;
unsigned int fifo_level;
Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/soc/davinci/davinci-vcif.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ static int davinci_vcif_probe(struct platform_device *pdev)
int ret;

davinci_vcif_dev = kzalloc(sizeof(struct davinci_vcif_dev), GFP_KERNEL);
if (!davinci_vc) {
if (!davinci_vcif_dev) {
dev_dbg(&pdev->dev,
"could not allocate memory for private data\n");
return -ENOMEM;
Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/soc/imx/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ config SND_SOC_EUKREA_TLV320
select SND_SOC_TLV320AIC23
help
Enable I2S based access to the TLV320AIC23B codec attached
to the SSI4 interface
to the SSI interface

endif # SND_IMX_SOC
3 changes: 2 additions & 1 deletion trunk/sound/soc/imx/eukrea-tlv320.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ static int __init eukrea_tlv320_init(void)
{
int ret;

if (!machine_is_eukrea_cpuimx27() && !machine_is_eukrea_cpuimx25sd())
if (!machine_is_eukrea_cpuimx27() && !machine_is_eukrea_cpuimx25sd()
&& !machine_is_eukrea_cpuimx35sd())
/* return happy. We might run on a totally different machine */
return 0;

Expand Down
Loading

0 comments on commit fc4da3b

Please sign in to comment.