Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 362469
b: refs/heads/master
c: f1ca493
h: refs/heads/master
i:
  362467: d77ade4
v: v3
  • Loading branch information
Alban Bedel authored and Mark Brown committed Apr 9, 2013
1 parent 32937cf commit 0fcfd17
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 27 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: f255e71f3d837782e815549f32840f911e67d2b1
refs/heads/master: f1ca493b0b5e8f42d3b2dc8877860db2983f47b6
2 changes: 1 addition & 1 deletion trunk/sound/soc/codecs/wm5102.c
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ static int wm5102_sysclk_ev(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{
struct snd_soc_codec *codec = w->codec;
struct arizona *arizona = dev_get_drvdata(codec->dev->parent);
struct arizona *arizona = dev_get_drvdata(codec->dev);
struct regmap *regmap = codec->control_data;
const struct reg_default *patch = NULL;
int i, patch_size;
Expand Down
2 changes: 2 additions & 0 deletions trunk/sound/soc/codecs/wm8903.c
Original file line number Diff line number Diff line change
Expand Up @@ -1083,6 +1083,8 @@ static const struct snd_soc_dapm_route wm8903_intercon[] = {
{ "ROP", NULL, "Right Speaker PGA" },
{ "RON", NULL, "Right Speaker PGA" },

{ "Charge Pump", NULL, "CLK_DSP" },

{ "Left Headphone Output PGA", NULL, "Charge Pump" },
{ "Right Headphone Output PGA", NULL, "Charge Pump" },
{ "Left Line Output PGA", NULL, "Charge Pump" },
Expand Down
17 changes: 5 additions & 12 deletions trunk/sound/soc/samsung/i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,6 @@ static const struct snd_soc_dai_ops samsung_i2s_dai_ops = {
static struct i2s_dai *i2s_alloc_dai(struct platform_device *pdev, bool sec)
{
struct i2s_dai *i2s;
int ret;

i2s = devm_kzalloc(&pdev->dev, sizeof(struct i2s_dai), GFP_KERNEL);
if (i2s == NULL)
Expand All @@ -997,18 +996,16 @@ static struct i2s_dai *i2s_alloc_dai(struct platform_device *pdev, bool sec)
i2s->i2s_dai_drv.capture.channels_max = 2;
i2s->i2s_dai_drv.capture.rates = SAMSUNG_I2S_RATES;
i2s->i2s_dai_drv.capture.formats = SAMSUNG_I2S_FMTS;
dev_set_drvdata(&i2s->pdev->dev, i2s);
} else { /* Create a new platform_device for Secondary */
i2s->pdev = platform_device_alloc("samsung-i2s-sec", -1);
i2s->pdev = platform_device_register_resndata(NULL,
"samsung-i2s-sec", -1, NULL, 0, NULL, 0);
if (IS_ERR(i2s->pdev))
return NULL;

platform_set_drvdata(i2s->pdev, i2s);
ret = platform_device_add(i2s->pdev);
if (ret < 0)
return NULL;
}

/* Pre-assign snd_soc_dai_set_drvdata */
dev_set_drvdata(&i2s->pdev->dev, i2s);

return i2s;
}

Expand Down Expand Up @@ -1110,10 +1107,6 @@ static int samsung_i2s_probe(struct platform_device *pdev)

if (samsung_dai_type == TYPE_SEC) {
sec_dai = dev_get_drvdata(&pdev->dev);
if (!sec_dai) {
dev_err(&pdev->dev, "Unable to get drvdata\n");
return -EFAULT;
}
snd_soc_register_dai(&sec_dai->pdev->dev,
&sec_dai->i2s_dai_drv);
asoc_dma_platform_register(&pdev->dev);
Expand Down
14 changes: 3 additions & 11 deletions trunk/sound/soc/soc-compress.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,27 +211,19 @@ static int soc_compr_set_params(struct snd_compr_stream *cstream,
if (platform->driver->compr_ops && platform->driver->compr_ops->set_params) {
ret = platform->driver->compr_ops->set_params(cstream, params);
if (ret < 0)
goto err;
goto out;
}

if (rtd->dai_link->compr_ops && rtd->dai_link->compr_ops->set_params) {
ret = rtd->dai_link->compr_ops->set_params(cstream);
if (ret < 0)
goto err;
goto out;
}

snd_soc_dapm_stream_event(rtd, SNDRV_PCM_STREAM_PLAYBACK,
SND_SOC_DAPM_STREAM_START);

/* cancel any delayed stream shutdown that is pending */
rtd->pop_wait = 0;
mutex_unlock(&rtd->pcm_mutex);

cancel_delayed_work_sync(&rtd->delayed_work);

return ret;

err:
out:
mutex_unlock(&rtd->pcm_mutex);
return ret;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2963,7 +2963,7 @@ int snd_soc_put_volsw_range(struct snd_kcontrol *kcontrol,
val = val << shift;

ret = snd_soc_update_bits_locked(codec, reg, val_mask, val);
if (ret < 0)
if (ret != 0)
return ret;

if (snd_soc_volsw_is_stereo(mc)) {
Expand Down
24 changes: 23 additions & 1 deletion trunk/sound/soc/tegra/tegra_pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
static const struct snd_pcm_hardware tegra_pcm_hardware = {
.info = SNDRV_PCM_INFO_MMAP |
SNDRV_PCM_INFO_MMAP_VALID |
SNDRV_PCM_INFO_PAUSE |
SNDRV_PCM_INFO_RESUME |
SNDRV_PCM_INFO_INTERLEAVED,
.formats = SNDRV_PCM_FMTBIT_S16_LE,
.channels_min = 2,
Expand Down Expand Up @@ -125,6 +127,26 @@ static int tegra_pcm_hw_free(struct snd_pcm_substream *substream)
return 0;
}

static int tegra_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
{
switch (cmd) {
case SNDRV_PCM_TRIGGER_START:
case SNDRV_PCM_TRIGGER_RESUME:
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
return snd_dmaengine_pcm_trigger(substream,
SNDRV_PCM_TRIGGER_START);

case SNDRV_PCM_TRIGGER_STOP:
case SNDRV_PCM_TRIGGER_SUSPEND:
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
return snd_dmaengine_pcm_trigger(substream,
SNDRV_PCM_TRIGGER_STOP);
default:
return -EINVAL;
}
return 0;
}

static int tegra_pcm_mmap(struct snd_pcm_substream *substream,
struct vm_area_struct *vma)
{
Expand All @@ -142,7 +164,7 @@ static struct snd_pcm_ops tegra_pcm_ops = {
.ioctl = snd_pcm_lib_ioctl,
.hw_params = tegra_pcm_hw_params,
.hw_free = tegra_pcm_hw_free,
.trigger = snd_dmaengine_pcm_trigger,
.trigger = tegra_pcm_trigger,
.pointer = snd_dmaengine_pcm_pointer,
.mmap = tegra_pcm_mmap,
};
Expand Down

0 comments on commit 0fcfd17

Please sign in to comment.