aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/ctxfi/ctatc.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-06-09 02:19:02 -0400
committerTakashi Iwai <tiwai@suse.de>2009-06-09 02:19:02 -0400
commita5990dc5b96f537618b0f057c8723a6a0b0cdc74 (patch)
treed5c7e3283c2827ab0ce00aaf204315a696114edd /sound/pci/ctxfi/ctatc.c
parent5242bc7613311aa1a3d5ed41e9cf81015b65563f (diff)
ALSA: ctxfi - Clear PCM resources at hw_params and hw_free
Currently the PCM resources are allocated only once and ever in prepare callback, assuming that the PCM parameters are never changed. But it's not true. This patch adds the call of atc->pcm_release_resources() at hw_params and hw_free callbacks to assure that the PCM setup is done correctly for each h/w parameter changes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/ctxfi/ctatc.c')
-rw-r--r--sound/pci/ctxfi/ctatc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/pci/ctxfi/ctatc.c b/sound/pci/ctxfi/ctatc.c
index e54006ef83cf..80fb2baed7a7 100644
--- a/sound/pci/ctxfi/ctatc.c
+++ b/sound/pci/ctxfi/ctatc.c
@@ -523,7 +523,7 @@ atc_pcm_capture_get_resources(struct ct_atc *atc, struct ct_atc_pcm *apcm)
523 struct src_node_conf_t src_node_conf[2] = {{0} }; 523 struct src_node_conf_t src_node_conf[2] = {{0} };
524 524
525 /* first release old resources */ 525 /* first release old resources */
526 atc->pcm_release_resources(atc, apcm); 526 atc_pcm_release_resources(atc, apcm);
527 527
528 /* The numbers of converting SRCs and SRCIMPs should be determined 528 /* The numbers of converting SRCs and SRCIMPs should be determined
529 * by pitch value. */ 529 * by pitch value. */
@@ -802,7 +802,7 @@ static int spdif_passthru_playback_get_resources(struct ct_atc *atc,
802 unsigned int pitch, rsr = atc->pll_rate; 802 unsigned int pitch, rsr = atc->pll_rate;
803 803
804 /* first release old resources */ 804 /* first release old resources */
805 atc->pcm_release_resources(atc, apcm); 805 atc_pcm_release_resources(atc, apcm);
806 806
807 /* Get SRC resource */ 807 /* Get SRC resource */
808 desc.multi = apcm->substream->runtime->channels; 808 desc.multi = apcm->substream->runtime->channels;