diff options
author | Lydia Wang <lydiawang@viatech.com.cn> | 2009-10-10 07:08:21 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-10-11 11:57:40 -0400 |
commit | c873cc25280113d71463ad5075413d283be6b766 (patch) | |
tree | 48e2eb900ad7152d71fd254a9c60b07df54c0ba3 /sound | |
parent | 82ef9e45c48634af5e3f6ab9ac75b6642c538020 (diff) |
ALSA: HDA VIA: Replace via_playback_pcm_prepare/cleanup
Replaced with via_playback_multi_pcm_prepare/cleanup to support
multi-stream operations
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_via.c | 40 |
1 files changed, 9 insertions, 31 deletions
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c index dc416ec0c6d4..4d3c447342b0 100644 --- a/sound/pci/hda/patch_via.c +++ b/sound/pci/hda/patch_via.c | |||
@@ -1022,28 +1022,6 @@ static int via_playback_pcm_open(struct hda_pcm_stream *hinfo, | |||
1022 | hinfo); | 1022 | hinfo); |
1023 | } | 1023 | } |
1024 | 1024 | ||
1025 | static int via_playback_pcm_prepare(struct hda_pcm_stream *hinfo, | ||
1026 | struct hda_codec *codec, | ||
1027 | unsigned int stream_tag, | ||
1028 | unsigned int format, | ||
1029 | struct snd_pcm_substream *substream) | ||
1030 | { | ||
1031 | struct via_spec *spec = codec->spec; | ||
1032 | vt1708_start_hp_work(spec); | ||
1033 | return snd_hda_multi_out_analog_prepare(codec, &spec->multiout, | ||
1034 | stream_tag, format, substream); | ||
1035 | } | ||
1036 | |||
1037 | static int via_playback_pcm_cleanup(struct hda_pcm_stream *hinfo, | ||
1038 | struct hda_codec *codec, | ||
1039 | struct snd_pcm_substream *substream) | ||
1040 | { | ||
1041 | struct via_spec *spec = codec->spec; | ||
1042 | vt1708_stop_hp_work(spec); | ||
1043 | return snd_hda_multi_out_analog_cleanup(codec, &spec->multiout); | ||
1044 | } | ||
1045 | |||
1046 | |||
1047 | static void playback_multi_pcm_prep_0(struct hda_codec *codec, | 1025 | static void playback_multi_pcm_prep_0(struct hda_codec *codec, |
1048 | unsigned int stream_tag, | 1026 | unsigned int stream_tag, |
1049 | unsigned int format, | 1027 | unsigned int format, |
@@ -1252,7 +1230,7 @@ static struct hda_pcm_stream vt1708_pcm_analog_playback = { | |||
1252 | }; | 1230 | }; |
1253 | 1231 | ||
1254 | static struct hda_pcm_stream vt1708_pcm_analog_s16_playback = { | 1232 | static struct hda_pcm_stream vt1708_pcm_analog_s16_playback = { |
1255 | .substreams = 1, | 1233 | .substreams = 2, |
1256 | .channels_min = 2, | 1234 | .channels_min = 2, |
1257 | .channels_max = 8, | 1235 | .channels_max = 8, |
1258 | .nid = 0x10, /* NID to query formats and rates */ | 1236 | .nid = 0x10, /* NID to query formats and rates */ |
@@ -1263,8 +1241,8 @@ static struct hda_pcm_stream vt1708_pcm_analog_s16_playback = { | |||
1263 | .formats = SNDRV_PCM_FMTBIT_S16_LE, | 1241 | .formats = SNDRV_PCM_FMTBIT_S16_LE, |
1264 | .ops = { | 1242 | .ops = { |
1265 | .open = via_playback_pcm_open, | 1243 | .open = via_playback_pcm_open, |
1266 | .prepare = via_playback_pcm_prepare, | 1244 | .prepare = via_playback_multi_pcm_prepare, |
1267 | .cleanup = via_playback_pcm_cleanup | 1245 | .cleanup = via_playback_multi_pcm_cleanup |
1268 | }, | 1246 | }, |
1269 | }; | 1247 | }; |
1270 | 1248 | ||
@@ -2062,8 +2040,8 @@ static struct hda_pcm_stream vt1709_10ch_pcm_analog_playback = { | |||
2062 | .nid = 0x10, /* NID to query formats and rates */ | 2040 | .nid = 0x10, /* NID to query formats and rates */ |
2063 | .ops = { | 2041 | .ops = { |
2064 | .open = via_playback_pcm_open, | 2042 | .open = via_playback_pcm_open, |
2065 | .prepare = via_playback_pcm_prepare, | 2043 | .prepare = via_playback_multi_pcm_prepare, |
2066 | .cleanup = via_playback_pcm_cleanup | 2044 | .cleanup = via_playback_multi_pcm_cleanup, |
2067 | }, | 2045 | }, |
2068 | }; | 2046 | }; |
2069 | 2047 | ||
@@ -2074,8 +2052,8 @@ static struct hda_pcm_stream vt1709_6ch_pcm_analog_playback = { | |||
2074 | .nid = 0x10, /* NID to query formats and rates */ | 2052 | .nid = 0x10, /* NID to query formats and rates */ |
2075 | .ops = { | 2053 | .ops = { |
2076 | .open = via_playback_pcm_open, | 2054 | .open = via_playback_pcm_open, |
2077 | .prepare = via_playback_pcm_prepare, | 2055 | .prepare = via_playback_multi_pcm_prepare, |
2078 | .cleanup = via_playback_pcm_cleanup | 2056 | .cleanup = via_playback_multi_pcm_cleanup, |
2079 | }, | 2057 | }, |
2080 | }; | 2058 | }; |
2081 | 2059 | ||
@@ -3166,8 +3144,8 @@ static struct hda_pcm_stream vt1708S_pcm_analog_playback = { | |||
3166 | .nid = 0x10, /* NID to query formats and rates */ | 3144 | .nid = 0x10, /* NID to query formats and rates */ |
3167 | .ops = { | 3145 | .ops = { |
3168 | .open = via_playback_pcm_open, | 3146 | .open = via_playback_pcm_open, |
3169 | .prepare = via_playback_pcm_prepare, | 3147 | .prepare = via_playback_multi_pcm_prepare, |
3170 | .cleanup = via_playback_pcm_cleanup, | 3148 | .cleanup = via_playback_multi_pcm_cleanup, |
3171 | .close = via_pcm_open_close | 3149 | .close = via_pcm_open_close |
3172 | }, | 3150 | }, |
3173 | }; | 3151 | }; |