diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-06-07 10:26:56 (GMT) |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-06-07 10:26:56 (GMT) |
commit | b4a655e81d4d1d12abc92d29dfb7550e66a08799 (patch) | |
tree | ac8646cbcc6363fc9d33273b16995a4078062aea /sound/pci/hda/hda_intel.c | |
parent | a810364a0424c297242c6c66071a42f7675a5568 (diff) | |
download | linux-fsl-qoriq-b4a655e81d4d1d12abc92d29dfb7550e66a08799.tar.xz |
ALSA: hda - Judge playback stream from stream id in azx_via_get_position()
Instead of checking the azx_dev index with a fixed number (4), check
the stream direction of the assigned substream.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_intel.c')
-rw-r--r-- | sound/pci/hda/hda_intel.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 45cd02f..5f2d05a 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -1866,7 +1866,7 @@ static unsigned int azx_via_get_position(struct azx *chip, unsigned int fifo_size; link_pos = azx_sd_readl(azx_dev, SD_LPIB); - if (azx_dev->index >= 4) { + if (azx_dev->substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { /* Playback, no problem using link position */ return link_pos; } |