aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/hda')
-rw-r--r--sound/pci/hda/hda_codec.c10
-rw-r--r--sound/pci/hda/hda_local.h2
-rw-r--r--sound/pci/hda/patch_analog.c15
-rw-r--r--sound/pci/hda/patch_sigmatel.c11
4 files changed, 34 insertions, 4 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 29eeb748561d..98884bc8f35f 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -3119,6 +3119,16 @@ int snd_hda_multi_out_dig_prepare(struct hda_codec *codec,
3119} 3119}
3120EXPORT_SYMBOL_HDA(snd_hda_multi_out_dig_prepare); 3120EXPORT_SYMBOL_HDA(snd_hda_multi_out_dig_prepare);
3121 3121
3122int snd_hda_multi_out_dig_cleanup(struct hda_codec *codec,
3123 struct hda_multi_out *mout)
3124{
3125 mutex_lock(&codec->spdif_mutex);
3126 cleanup_dig_out_stream(codec, mout->dig_out_nid);
3127 mutex_unlock(&codec->spdif_mutex);
3128 return 0;
3129}
3130EXPORT_SYMBOL_HDA(snd_hda_multi_out_dig_cleanup);
3131
3122/* 3132/*
3123 * release the digital out 3133 * release the digital out
3124 */ 3134 */
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h
index 2ae6b53a4628..84e2cf644fd7 100644
--- a/sound/pci/hda/hda_local.h
+++ b/sound/pci/hda/hda_local.h
@@ -254,6 +254,8 @@ int snd_hda_multi_out_dig_prepare(struct hda_codec *codec,
254 unsigned int stream_tag, 254 unsigned int stream_tag,
255 unsigned int format, 255 unsigned int format,
256 struct snd_pcm_substream *substream); 256 struct snd_pcm_substream *substream);
257int snd_hda_multi_out_dig_cleanup(struct hda_codec *codec,
258 struct hda_multi_out *mout);
257int snd_hda_multi_out_analog_open(struct hda_codec *codec, 259int snd_hda_multi_out_analog_open(struct hda_codec *codec,
258 struct hda_multi_out *mout, 260 struct hda_multi_out *mout,
259 struct snd_pcm_substream *substream, 261 struct snd_pcm_substream *substream,
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c
index d58c32b5b433..af6b0035e2e8 100644
--- a/sound/pci/hda/patch_analog.c
+++ b/sound/pci/hda/patch_analog.c
@@ -301,6 +301,14 @@ static int ad198x_dig_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
301 format, substream); 301 format, substream);
302} 302}
303 303
304static int ad198x_dig_playback_pcm_cleanup(struct hda_pcm_stream *hinfo,
305 struct hda_codec *codec,
306 struct snd_pcm_substream *substream)
307{
308 struct ad198x_spec *spec = codec->spec;
309 return snd_hda_multi_out_dig_cleanup(codec, &spec->multiout);
310}
311
304/* 312/*
305 * Analog capture 313 * Analog capture
306 */ 314 */
@@ -359,7 +367,8 @@ static struct hda_pcm_stream ad198x_pcm_digital_playback = {
359 .ops = { 367 .ops = {
360 .open = ad198x_dig_playback_pcm_open, 368 .open = ad198x_dig_playback_pcm_open,
361 .close = ad198x_dig_playback_pcm_close, 369 .close = ad198x_dig_playback_pcm_close,
362 .prepare = ad198x_dig_playback_pcm_prepare 370 .prepare = ad198x_dig_playback_pcm_prepare,
371 .cleanup = ad198x_dig_playback_pcm_cleanup
363 }, 372 },
364}; 373};
365 374
@@ -1923,8 +1932,8 @@ static hda_nid_t ad1988_capsrc_nids[3] = {
1923#define AD1988_SPDIF_OUT_HDMI 0x0b 1932#define AD1988_SPDIF_OUT_HDMI 0x0b
1924#define AD1988_SPDIF_IN 0x07 1933#define AD1988_SPDIF_IN 0x07
1925 1934
1926static hda_nid_t ad1989b_slave_dig_outs[2] = { 1935static hda_nid_t ad1989b_slave_dig_outs[] = {
1927 AD1988_SPDIF_OUT, AD1988_SPDIF_OUT_HDMI 1936 AD1988_SPDIF_OUT, AD1988_SPDIF_OUT_HDMI, 0
1928}; 1937};
1929 1938
1930static struct hda_input_mux ad1988_6stack_capture_source = { 1939static struct hda_input_mux ad1988_6stack_capture_source = {
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index c8573e265e00..aeb5d2126dae 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -2439,6 +2439,14 @@ static int stac92xx_dig_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
2439 stream_tag, format, substream); 2439 stream_tag, format, substream);
2440} 2440}
2441 2441
2442static int stac92xx_dig_playback_pcm_cleanup(struct hda_pcm_stream *hinfo,
2443 struct hda_codec *codec,
2444 struct snd_pcm_substream *substream)
2445{
2446 struct sigmatel_spec *spec = codec->spec;
2447 return snd_hda_multi_out_dig_cleanup(codec, &spec->multiout);
2448}
2449
2442 2450
2443/* 2451/*
2444 * Analog capture callbacks 2452 * Analog capture callbacks
@@ -2483,7 +2491,8 @@ static struct hda_pcm_stream stac92xx_pcm_digital_playback = {
2483 .ops = { 2491 .ops = {
2484 .open = stac92xx_dig_playback_pcm_open, 2492 .open = stac92xx_dig_playback_pcm_open,
2485 .close = stac92xx_dig_playback_pcm_close, 2493 .close = stac92xx_dig_playback_pcm_close,
2486 .prepare = stac92xx_dig_playback_pcm_prepare 2494 .prepare = stac92xx_dig_playback_pcm_prepare,
2495 .cleanup = stac92xx_dig_playback_pcm_cleanup
2487 }, 2496 },
2488}; 2497};
2489 2498