Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 22728
b: refs/heads/master
c: d08a23e
h: refs/heads/master
v: v3
  • Loading branch information
Ken Arromdee authored and Jaroslav Kysela committed Mar 22, 2006
1 parent aa05f23 commit 7ddb741
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 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: bd84b0cc99d267d6512f01a55af7dbb673f784af
refs/heads/master: d08a23e2509e8e80637b4dfa5607ea00b9151b0a
15 changes: 9 additions & 6 deletions trunk/sound/isa/ad1816a/ad1816a_lib.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/*
ad1816a.c - lowlevel code for Analog Devices AD1816A chip.
Copyright (C) 1999-2000 by Massimo Piccioni <dafastidio@libero.it>
Expand Down Expand Up @@ -175,7 +174,7 @@ static void snd_ad1816a_close(struct snd_ad1816a *chip, unsigned int mode)


static int snd_ad1816a_trigger(struct snd_ad1816a *chip, unsigned char what,
int channel, int cmd)
int channel, int cmd, int iscapture)
{
int error = 0;

Expand All @@ -184,10 +183,14 @@ static int snd_ad1816a_trigger(struct snd_ad1816a *chip, unsigned char what,
case SNDRV_PCM_TRIGGER_STOP:
spin_lock(&chip->lock);
cmd = (cmd == SNDRV_PCM_TRIGGER_START) ? 0xff: 0x00;
if (what & AD1816A_PLAYBACK_ENABLE)
/* if (what & AD1816A_PLAYBACK_ENABLE) */
/* That is not valid, because playback and capture enable
* are the same bit pattern, just to different addresses
*/
if (! iscapture)
snd_ad1816a_out_mask(chip, AD1816A_PLAYBACK_CONFIG,
AD1816A_PLAYBACK_ENABLE, cmd);
if (what & AD1816A_CAPTURE_ENABLE)
else
snd_ad1816a_out_mask(chip, AD1816A_CAPTURE_CONFIG,
AD1816A_CAPTURE_ENABLE, cmd);
spin_unlock(&chip->lock);
Expand All @@ -204,14 +207,14 @@ static int snd_ad1816a_playback_trigger(struct snd_pcm_substream *substream, int
{
struct snd_ad1816a *chip = snd_pcm_substream_chip(substream);
return snd_ad1816a_trigger(chip, AD1816A_PLAYBACK_ENABLE,
SNDRV_PCM_STREAM_PLAYBACK, cmd);
SNDRV_PCM_STREAM_PLAYBACK, cmd, 0);
}

static int snd_ad1816a_capture_trigger(struct snd_pcm_substream *substream, int cmd)
{
struct snd_ad1816a *chip = snd_pcm_substream_chip(substream);
return snd_ad1816a_trigger(chip, AD1816A_CAPTURE_ENABLE,
SNDRV_PCM_STREAM_CAPTURE, cmd);
SNDRV_PCM_STREAM_CAPTURE, cmd, 1);
}

static int snd_ad1816a_hw_params(struct snd_pcm_substream *substream,
Expand Down

0 comments on commit 7ddb741

Please sign in to comment.