Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 170177
b: refs/heads/master
c: e697cd4
h: refs/heads/master
i:
  170175: b0a3c5e
v: v3
  • Loading branch information
Manuel Lauss authored and Mark Brown committed Oct 19, 2009
1 parent a9a3d88 commit 99dd109
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 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: d8707cecdf396bdb506252829d03837b2c67c939
refs/heads/master: e697cd410a0c3aaea697c9915837e99933d8935b
11 changes: 8 additions & 3 deletions trunk/sound/soc/au1x/psc-ac97.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ static unsigned short au1xpsc_ac97_read(struct snd_ac97 *ac97,
{
/* FIXME */
struct au1xpsc_audio_data *pscdata = au1xpsc_ac97_workdata;
unsigned short data, retry, tmo;
unsigned short retry, tmo;
unsigned long data;

au_writel(PSC_AC97EVNT_CD, AC97_EVNT(pscdata));
au_sync();
Expand All @@ -79,15 +80,19 @@ static unsigned short au1xpsc_ac97_read(struct snd_ac97 *ac97,
&& --tmo)
udelay(2);

data = au_readl(AC97_CDC(pscdata)) & 0xffff;
data = au_readl(AC97_CDC(pscdata));

au_writel(PSC_AC97EVNT_CD, AC97_EVNT(pscdata));
au_sync();

mutex_unlock(&pscdata->lock);

if (reg != ((data >> 16) & 0x7f))
tmo = 1; /* wrong register, try again */

} while (--retry && !tmo);

return retry ? data : 0xffff;
return retry ? data & 0xffff : 0xffff;
}

/* AC97 controller writes to codec register */
Expand Down

0 comments on commit 99dd109

Please sign in to comment.