* [PATCH 16/30] ALSA: HDA VIA: Replace via_playback_pcm_prepare/cleanup
@ 2009-10-09 10:40 LoganLi
0 siblings, 0 replies; 2+ messages in thread
From: LoganLi @ 2009-10-09 10:40 UTC (permalink / raw)
To: alsa-devel; +Cc: tiwai, HaraldWelte, LydiaWang
From: Lydia Wang <lydiawang@viatech.com.cn>
Subject: 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>
---
pci/hda/patch_via.c | 40 +++++++++-------------------------------
1 file changed, 9 insertions(+), 31 deletions(-)
--- a/pci/hda/patch_via.c
+++ b/pci/hda/patch_via.c
@@ -1022,28 +1022,6 @@
hinfo);
}
-static int via_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
- struct hda_codec *codec,
- unsigned int stream_tag,
- unsigned int format,
- struct snd_pcm_substream *substream)
-{
- struct via_spec *spec = codec->spec;
- vt1708_start_hp_work(spec);
- return snd_hda_multi_out_analog_prepare(codec, &spec->multiout,
- stream_tag, format,
substream);
-}
-
-static int via_playback_pcm_cleanup(struct hda_pcm_stream *hinfo,
- struct hda_codec *codec,
- struct snd_pcm_substream *substream)
-{
- struct via_spec *spec = codec->spec;
- vt1708_stop_hp_work(spec);
- return snd_hda_multi_out_analog_cleanup(codec, &spec->multiout);
-}
-
-
static void playback_multi_pcm_prep_0(struct hda_codec *codec,
unsigned int stream_tag,
unsigned int format,
@@ -1252,7 +1230,7 @@
};
static struct hda_pcm_stream vt1708_pcm_analog_s16_playback = {
- .substreams = 1,
+ .substreams = 2,
.channels_min = 2,
.channels_max = 8,
.nid = 0x10, /* NID to query formats and rates */
@@ -1263,8 +1241,8 @@
.formats = SNDRV_PCM_FMTBIT_S16_LE,
.ops = {
.open = via_playback_pcm_open,
- .prepare = via_playback_pcm_prepare,
- .cleanup = via_playback_pcm_cleanup
+ .prepare = via_playback_multi_pcm_prepare,
+ .cleanup = via_playback_multi_pcm_cleanup
},
};
@@ -2061,8 +2039,8 @@
.nid = 0x10, /* NID to query formats and rates */
.ops = {
.open = via_playback_pcm_open,
- .prepare = via_playback_pcm_prepare,
- .cleanup = via_playback_pcm_cleanup
+ .prepare = via_playback_multi_pcm_prepare,
+ .cleanup = via_playback_multi_pcm_cleanup,
},
};
@@ -2073,8 +2051,8 @@
.nid = 0x10, /* NID to query formats and rates */
.ops = {
.open = via_playback_pcm_open,
- .prepare = via_playback_pcm_prepare,
- .cleanup = via_playback_pcm_cleanup
+ .prepare = via_playback_multi_pcm_prepare,
+ .cleanup = via_playback_multi_pcm_cleanup,
},
};
@@ -3165,8 +3143,8 @@
.nid = 0x10, /* NID to query formats and rates */
.ops = {
.open = via_playback_pcm_open,
- .prepare = via_playback_pcm_prepare,
- .cleanup = via_playback_pcm_cleanup,
+ .prepare = via_playback_multi_pcm_prepare,
+ .cleanup = via_playback_multi_pcm_cleanup,
.close = via_pcm_open_close
},
};
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 16/30] ALSA: HDA VIA: Replace via_playback_pcm_prepare/cleanup
@ 2009-10-10 11:08 Logan Li
0 siblings, 0 replies; 2+ messages in thread
From: Logan Li @ 2009-10-10 11:08 UTC (permalink / raw)
To: alsa-devel; +Cc: tiwai, HaraldWelte, LydiaWang
From: Lydia Wang <lydiawang@viatech.com.cn>
Subject: 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>
---
sound/pci/hda/patch_via.c | 40 +++++++++-------------------------------
1 file changed, 9 insertions(+), 31 deletions(-)
--- a/sound/pci/hda/patch_via.c
+++ b/sound/pci/hda/patch_via.c
@@ -1022,28 +1022,6 @@
hinfo);
}
-static int via_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
- struct hda_codec *codec,
- unsigned int stream_tag,
- unsigned int format,
- struct snd_pcm_substream *substream)
-{
- struct via_spec *spec = codec->spec;
- vt1708_start_hp_work(spec);
- return snd_hda_multi_out_analog_prepare(codec, &spec->multiout,
- stream_tag, format, substream);
-}
-
-static int via_playback_pcm_cleanup(struct hda_pcm_stream *hinfo,
- struct hda_codec *codec,
- struct snd_pcm_substream *substream)
-{
- struct via_spec *spec = codec->spec;
- vt1708_stop_hp_work(spec);
- return snd_hda_multi_out_analog_cleanup(codec, &spec->multiout);
-}
-
-
static void playback_multi_pcm_prep_0(struct hda_codec *codec,
unsigned int stream_tag,
unsigned int format,
@@ -1252,7 +1230,7 @@
};
static struct hda_pcm_stream vt1708_pcm_analog_s16_playback = {
- .substreams = 1,
+ .substreams = 2,
.channels_min = 2,
.channels_max = 8,
.nid = 0x10, /* NID to query formats and rates */
@@ -1263,8 +1241,8 @@
.formats = SNDRV_PCM_FMTBIT_S16_LE,
.ops = {
.open = via_playback_pcm_open,
- .prepare = via_playback_pcm_prepare,
- .cleanup = via_playback_pcm_cleanup
+ .prepare = via_playback_multi_pcm_prepare,
+ .cleanup = via_playback_multi_pcm_cleanup
},
};
@@ -2062,8 +2040,8 @@
.nid = 0x10, /* NID to query formats and rates */
.ops = {
.open = via_playback_pcm_open,
- .prepare = via_playback_pcm_prepare,
- .cleanup = via_playback_pcm_cleanup
+ .prepare = via_playback_multi_pcm_prepare,
+ .cleanup = via_playback_multi_pcm_cleanup,
},
};
@@ -2074,8 +2052,8 @@
.nid = 0x10, /* NID to query formats and rates */
.ops = {
.open = via_playback_pcm_open,
- .prepare = via_playback_pcm_prepare,
- .cleanup = via_playback_pcm_cleanup
+ .prepare = via_playback_multi_pcm_prepare,
+ .cleanup = via_playback_multi_pcm_cleanup,
},
};
@@ -3166,8 +3144,8 @@
.nid = 0x10, /* NID to query formats and rates */
.ops = {
.open = via_playback_pcm_open,
- .prepare = via_playback_pcm_prepare,
- .cleanup = via_playback_pcm_cleanup,
+ .prepare = via_playback_multi_pcm_prepare,
+ .cleanup = via_playback_multi_pcm_cleanup,
.close = via_pcm_open_close
},
};
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-10-10 11:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-10 11:08 [PATCH 16/30] ALSA: HDA VIA: Replace via_playback_pcm_prepare/cleanup Logan Li
-- strict thread matches above, loose matches on Subject: below --
2009-10-09 10:40 LoganLi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.