Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 148323
b: refs/heads/master
c: f692fce
h: refs/heads/master
i:
  148321: bcd744e
  148319: fc7dfc9
v: v3
  • Loading branch information
Cliff Cai authored and Mark Brown committed Jun 3, 2009
1 parent 98f479c commit 1fb2f35
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 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: cf485da15a3b507c7dab42337639e4f4025d3373
refs/heads/master: f692fce0cf8625b6cc8678e802fb0e2e657b1ca6
25 changes: 16 additions & 9 deletions trunk/sound/soc/codecs/ssm2602.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,15 +336,17 @@ static int ssm2602_startup(struct snd_pcm_substream *substream,
master_runtime->sample_bits,
master_runtime->rate);

snd_pcm_hw_constraint_minmax(substream->runtime,
SNDRV_PCM_HW_PARAM_RATE,
master_runtime->rate,
master_runtime->rate);

snd_pcm_hw_constraint_minmax(substream->runtime,
SNDRV_PCM_HW_PARAM_SAMPLE_BITS,
master_runtime->sample_bits,
master_runtime->sample_bits);
if (master_runtime->rate != 0)
snd_pcm_hw_constraint_minmax(substream->runtime,
SNDRV_PCM_HW_PARAM_RATE,
master_runtime->rate,
master_runtime->rate);

if (master_runtime->sample_bits != 0)
snd_pcm_hw_constraint_minmax(substream->runtime,
SNDRV_PCM_HW_PARAM_SAMPLE_BITS,
master_runtime->sample_bits,
master_runtime->sample_bits);

ssm2602->slave_substream = substream;
} else
Expand Down Expand Up @@ -372,6 +374,11 @@ static void ssm2602_shutdown(struct snd_pcm_substream *substream,
struct snd_soc_device *socdev = rtd->socdev;
struct snd_soc_codec *codec = socdev->card->codec;
struct ssm2602_priv *ssm2602 = codec->private_data;

if (ssm2602->master_substream == substream)
ssm2602->master_substream = ssm2602->slave_substream;

ssm2602->slave_substream = NULL;
/* deactivate */
if (!codec->active)
ssm2602_write(codec, SSM2602_ACTIVE, 0);
Expand Down

0 comments on commit 1fb2f35

Please sign in to comment.