diff options
author | Takashi Iwai <tiwai@suse.de> | 2008-03-14 12:17:09 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-04-24 06:00:25 -0400 |
commit | c93f5a1eca1f6d662d791c14c469b6962e05a08f (patch) | |
tree | c330e76a591158161a5d9b6acba8288de83b88f5 /sound/pci/ice1712/ice1724.c | |
parent | 5d9fab2d84963ec598810c54a67332decdd922a8 (diff) |
[ALSA] ice1724 - Fix the SPDIF input sample-rate on Juli@
AK4114 on Juli@ has the SPDIF input sample rate detection and
causes errors when an incompatible sample rate is chosen.
The patch adds the open hook to check the current rate and limit
the hw constraints.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/ice1712/ice1724.c')
-rw-r--r-- | sound/pci/ice1712/ice1724.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/pci/ice1712/ice1724.c b/sound/pci/ice1712/ice1724.c index f533850ec6e7..3bfd70577d7a 100644 --- a/sound/pci/ice1712/ice1724.c +++ b/sound/pci/ice1712/ice1724.c | |||
@@ -970,6 +970,8 @@ static int snd_vt1724_playback_spdif_open(struct snd_pcm_substream *substream) | |||
970 | VT1724_BUFFER_ALIGN); | 970 | VT1724_BUFFER_ALIGN); |
971 | snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, | 971 | snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, |
972 | VT1724_BUFFER_ALIGN); | 972 | VT1724_BUFFER_ALIGN); |
973 | if (ice->spdif.ops.open) | ||
974 | ice->spdif.ops.open(ice, substream); | ||
973 | return 0; | 975 | return 0; |
974 | } | 976 | } |
975 | 977 | ||
@@ -980,6 +982,8 @@ static int snd_vt1724_playback_spdif_close(struct snd_pcm_substream *substream) | |||
980 | if (PRO_RATE_RESET) | 982 | if (PRO_RATE_RESET) |
981 | snd_vt1724_set_pro_rate(ice, PRO_RATE_DEFAULT, 0); | 983 | snd_vt1724_set_pro_rate(ice, PRO_RATE_DEFAULT, 0); |
982 | ice->playback_con_substream = NULL; | 984 | ice->playback_con_substream = NULL; |
985 | if (ice->spdif.ops.close) | ||
986 | ice->spdif.ops.close(ice, substream); | ||
983 | 987 | ||
984 | return 0; | 988 | return 0; |
985 | } | 989 | } |
@@ -1002,6 +1006,8 @@ static int snd_vt1724_capture_spdif_open(struct snd_pcm_substream *substream) | |||
1002 | VT1724_BUFFER_ALIGN); | 1006 | VT1724_BUFFER_ALIGN); |
1003 | snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, | 1007 | snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, |
1004 | VT1724_BUFFER_ALIGN); | 1008 | VT1724_BUFFER_ALIGN); |
1009 | if (ice->spdif.ops.open) | ||
1010 | ice->spdif.ops.open(ice, substream); | ||
1005 | return 0; | 1011 | return 0; |
1006 | } | 1012 | } |
1007 | 1013 | ||
@@ -1012,6 +1018,8 @@ static int snd_vt1724_capture_spdif_close(struct snd_pcm_substream *substream) | |||
1012 | if (PRO_RATE_RESET) | 1018 | if (PRO_RATE_RESET) |
1013 | snd_vt1724_set_pro_rate(ice, PRO_RATE_DEFAULT, 0); | 1019 | snd_vt1724_set_pro_rate(ice, PRO_RATE_DEFAULT, 0); |
1014 | ice->capture_con_substream = NULL; | 1020 | ice->capture_con_substream = NULL; |
1021 | if (ice->spdif.ops.close) | ||
1022 | ice->spdif.ops.close(ice, substream); | ||
1015 | 1023 | ||
1016 | return 0; | 1024 | return 0; |
1017 | } | 1025 | } |