summaryrefslogtreecommitdiff
path: root/sound/pci/hda/hda_controller.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-04-17 14:34:30 +0300
committerTakashi Iwai <tiwai@suse.de>2015-04-17 14:34:30 +0300
commit6d23c8f5440e33cb854e394d38b8c19315f21428 (patch)
tree6d656667e796f0e273396a746fc03c4e4ddba0a3 /sound/pci/hda/hda_controller.c
parent0a50575b64ee365bba4960756c394a28ed0710a4 (diff)
downloadlinux-6d23c8f5440e33cb854e394d38b8c19315f21428.tar.xz
ALSA: hda - Move prepared flag into struct hdac_stream
This flag seems used commonly, so deserves to be located there. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_controller.c')
-rw-r--r--sound/pci/hda/hda_controller.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/pci/hda/hda_controller.c b/sound/pci/hda/hda_controller.c
index 9bc8eaf0e5ac..14ffb6bd986c 100644
--- a/sound/pci/hda/hda_controller.c
+++ b/sound/pci/hda/hda_controller.c
@@ -145,7 +145,7 @@ static int azx_pcm_hw_free(struct snd_pcm_substream *substream)
snd_hda_codec_cleanup(apcm->codec, hinfo, substream);
err = chip->ops->substream_free_pages(chip, substream);
- azx_dev->prepared = 0;
+ azx_stream(azx_dev)->prepared = 0;
dsp_unlock(azx_dev);
return err;
}
@@ -214,7 +214,7 @@ static int azx_pcm_prepare(struct snd_pcm_substream *substream)
unlock:
if (!err)
- azx_dev->prepared = 1;
+ azx_stream(azx_dev)->prepared = 1;
dsp_unlock(azx_dev);
return err;
}
@@ -240,7 +240,7 @@ static int azx_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
else
sync_reg = AZX_REG_SSYNC;
- if (dsp_is_locked(azx_dev) || !azx_dev->prepared)
+ if (dsp_is_locked(azx_dev) || !hstr->prepared)
return -EPIPE;
switch (cmd) {
@@ -843,7 +843,7 @@ int snd_hda_codec_load_dsp_prepare(struct hda_codec *codec, unsigned int format,
return err;
}
- azx_dev->prepared = 0;
+ hstr->prepared = 0;
return err;
}
EXPORT_SYMBOL_GPL(snd_hda_codec_load_dsp_prepare);