Skip to content

Commit

Permalink
ALSA: hda - Judge playback stream from stream id in azx_via_get_posit…
Browse files Browse the repository at this point in the history
…ion()

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>
  • Loading branch information
Takashi Iwai committed Jun 7, 2011
1 parent a810364 commit b4a655e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/pci/hda/hda_intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit b4a655e

Please sign in to comment.