]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branch 'fix/hda' into topic/hda
authorTakashi Iwai <tiwai@suse.de>
Fri, 13 Feb 2009 10:59:26 +0000 (11:59 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 13 Feb 2009 10:59:26 +0000 (11:59 +0100)
sound/pci/hda/hda_codec.c
sound/pci/hda/hda_local.h
sound/pci/hda/patch_analog.c
sound/pci/hda/patch_sigmatel.c

index 29eeb748561d5be536848a25d1b73288e6c8b9ae..98884bc8f35f83a3dce58cd3139202a1476f8aff 100644 (file)
@@ -3119,6 +3119,16 @@ int snd_hda_multi_out_dig_prepare(struct hda_codec *codec,
 }
 EXPORT_SYMBOL_HDA(snd_hda_multi_out_dig_prepare);
 
+int snd_hda_multi_out_dig_cleanup(struct hda_codec *codec,
+                                 struct hda_multi_out *mout)
+{
+       mutex_lock(&codec->spdif_mutex);
+       cleanup_dig_out_stream(codec, mout->dig_out_nid);
+       mutex_unlock(&codec->spdif_mutex);
+       return 0;
+}
+EXPORT_SYMBOL_HDA(snd_hda_multi_out_dig_cleanup);
+
 /*
  * release the digital out
  */
index 2ae6b53a46283a23fb1ba764e95008033f9628e3..84e2cf644fd77bbfb3f62c9e1b6ec0ea1b5133ab 100644 (file)
@@ -254,6 +254,8 @@ int snd_hda_multi_out_dig_prepare(struct hda_codec *codec,
                                  unsigned int stream_tag,
                                  unsigned int format,
                                  struct snd_pcm_substream *substream);
+int snd_hda_multi_out_dig_cleanup(struct hda_codec *codec,
+                                 struct hda_multi_out *mout);
 int snd_hda_multi_out_analog_open(struct hda_codec *codec,
                                  struct hda_multi_out *mout,
                                  struct snd_pcm_substream *substream,
index d58c32b5b433a248c22be70f6fc035286c584ca0..af6b0035e2e84b41ec237703586f12b65de33ce4 100644 (file)
@@ -301,6 +301,14 @@ static int ad198x_dig_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
                                             format, substream);
 }
 
+static int ad198x_dig_playback_pcm_cleanup(struct hda_pcm_stream *hinfo,
+                                          struct hda_codec *codec,
+                                          struct snd_pcm_substream *substream)
+{
+       struct ad198x_spec *spec = codec->spec;
+       return snd_hda_multi_out_dig_cleanup(codec, &spec->multiout);
+}
+
 /*
  * Analog capture
  */
@@ -359,7 +367,8 @@ static struct hda_pcm_stream ad198x_pcm_digital_playback = {
        .ops = {
                .open = ad198x_dig_playback_pcm_open,
                .close = ad198x_dig_playback_pcm_close,
-               .prepare = ad198x_dig_playback_pcm_prepare
+               .prepare = ad198x_dig_playback_pcm_prepare,
+               .cleanup = ad198x_dig_playback_pcm_cleanup
        },
 };
 
@@ -1923,8 +1932,8 @@ static hda_nid_t ad1988_capsrc_nids[3] = {
 #define AD1988_SPDIF_OUT_HDMI  0x0b
 #define AD1988_SPDIF_IN                0x07
 
-static hda_nid_t ad1989b_slave_dig_outs[2] = {
-       AD1988_SPDIF_OUT, AD1988_SPDIF_OUT_HDMI
+static hda_nid_t ad1989b_slave_dig_outs[] = {
+       AD1988_SPDIF_OUT, AD1988_SPDIF_OUT_HDMI, 0
 };
 
 static struct hda_input_mux ad1988_6stack_capture_source = {
index c8573e265e00efcad7be2099ea6d362581792abd..aeb5d2126daeb0400d5f1f8050e10859d096d5c7 100644 (file)
@@ -2439,6 +2439,14 @@ static int stac92xx_dig_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
                                             stream_tag, format, substream);
 }
 
+static int stac92xx_dig_playback_pcm_cleanup(struct hda_pcm_stream *hinfo,
+                                       struct hda_codec *codec,
+                                       struct snd_pcm_substream *substream)
+{
+       struct sigmatel_spec *spec = codec->spec;
+       return snd_hda_multi_out_dig_cleanup(codec, &spec->multiout);
+}
+
 
 /*
  * Analog capture callbacks
@@ -2483,7 +2491,8 @@ static struct hda_pcm_stream stac92xx_pcm_digital_playback = {
        .ops = {
                .open = stac92xx_dig_playback_pcm_open,
                .close = stac92xx_dig_playback_pcm_close,
-               .prepare = stac92xx_dig_playback_pcm_prepare
+               .prepare = stac92xx_dig_playback_pcm_prepare,
+               .cleanup = stac92xx_dig_playback_pcm_cleanup
        },
 };