diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/atmel/ac97c.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/sound/atmel/ac97c.c b/sound/atmel/ac97c.c index 3c0a6f4e3585..428121a7e705 100644 --- a/sound/atmel/ac97c.c +++ b/sound/atmel/ac97c.c | |||
@@ -339,7 +339,11 @@ static int atmel_ac97c_playback_prepare(struct snd_pcm_substream *substream) | |||
339 | ac97c_writel(chip, OCA, word); | 339 | ac97c_writel(chip, OCA, word); |
340 | 340 | ||
341 | /* configure sample format and size */ | 341 | /* configure sample format and size */ |
342 | word = AC97C_CMR_DMAEN | AC97C_CMR_SIZE_16; | 342 | word = ac97c_readl(chip, CAMR); |
343 | if (chip->opened <= 1) | ||
344 | word = AC97C_CMR_DMAEN | AC97C_CMR_SIZE_16; | ||
345 | else | ||
346 | word |= AC97C_CMR_DMAEN | AC97C_CMR_SIZE_16; | ||
343 | 347 | ||
344 | switch (runtime->format) { | 348 | switch (runtime->format) { |
345 | case SNDRV_PCM_FORMAT_S16_LE: | 349 | case SNDRV_PCM_FORMAT_S16_LE: |
@@ -426,7 +430,11 @@ static int atmel_ac97c_capture_prepare(struct snd_pcm_substream *substream) | |||
426 | ac97c_writel(chip, ICA, word); | 430 | ac97c_writel(chip, ICA, word); |
427 | 431 | ||
428 | /* configure sample format and size */ | 432 | /* configure sample format and size */ |
429 | word = AC97C_CMR_DMAEN | AC97C_CMR_SIZE_16; | 433 | word = ac97c_readl(chip, CAMR); |
434 | if (chip->opened <= 1) | ||
435 | word = AC97C_CMR_DMAEN | AC97C_CMR_SIZE_16; | ||
436 | else | ||
437 | word |= AC97C_CMR_DMAEN | AC97C_CMR_SIZE_16; | ||
430 | 438 | ||
431 | switch (runtime->format) { | 439 | switch (runtime->format) { |
432 | case SNDRV_PCM_FORMAT_S16_LE: | 440 | case SNDRV_PCM_FORMAT_S16_LE: |
@@ -506,7 +514,7 @@ atmel_ac97c_playback_trigger(struct snd_pcm_substream *substream, int cmd) | |||
506 | } else { | 514 | } else { |
507 | ptcr = ATMEL_PDC_TXTEN; | 515 | ptcr = ATMEL_PDC_TXTEN; |
508 | } | 516 | } |
509 | camr |= AC97C_CMR_CENA; | 517 | camr |= AC97C_CMR_CENA | AC97C_CSR_ENDTX; |
510 | break; | 518 | break; |
511 | case SNDRV_PCM_TRIGGER_PAUSE_PUSH: /* fall through */ | 519 | case SNDRV_PCM_TRIGGER_PAUSE_PUSH: /* fall through */ |
512 | case SNDRV_PCM_TRIGGER_SUSPEND: /* fall through */ | 520 | case SNDRV_PCM_TRIGGER_SUSPEND: /* fall through */ |
@@ -551,7 +559,7 @@ atmel_ac97c_capture_trigger(struct snd_pcm_substream *substream, int cmd) | |||
551 | } else { | 559 | } else { |
552 | ptcr = ATMEL_PDC_RXTEN; | 560 | ptcr = ATMEL_PDC_RXTEN; |
553 | } | 561 | } |
554 | camr |= AC97C_CMR_CENA; | 562 | camr |= AC97C_CMR_CENA | AC97C_CSR_ENDRX; |
555 | break; | 563 | break; |
556 | case SNDRV_PCM_TRIGGER_PAUSE_PUSH: /* fall through */ | 564 | case SNDRV_PCM_TRIGGER_PAUSE_PUSH: /* fall through */ |
557 | case SNDRV_PCM_TRIGGER_SUSPEND: /* fall through */ | 565 | case SNDRV_PCM_TRIGGER_SUSPEND: /* fall through */ |