aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_realtek.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2008-02-12 12:37:26 -0500
committerTakashi Iwai <tiwai@suse.de>2008-04-24 06:00:10 -0400
commit9a08160bdbe3148a405f72798f76e2a5d30bd243 (patch)
tree33b6785feb1fda1d381a74ef19eb26c983650749 /sound/pci/hda/patch_realtek.c
parentf6c7e5461e9046445d50c5c7a9a4587824239623 (diff)
[ALSA] hda-codec - Add "IEC958 Default PCM" switch
Added a new mixer switch to enable/disable the sharing of the default PCM stream with analog and SPDIF outputs. When "IEC958 Default PCM" switch is on, the PCM stream is routed both to analog and SPDIF outputs. This is the behavior in the earlier version. Turning this switch off has a merit for some codecs, though. Some codec chips don't support 24bit formats for SPDIF but only for analog outputs. In this case, you can use 24bit format by disabling this switch. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r--sound/pci/hda/patch_realtek.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index d41eafacd86d..6c605813fc6e 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -1520,6 +1520,11 @@ static int alc_build_controls(struct hda_codec *codec)
1520 spec->multiout.dig_out_nid); 1520 spec->multiout.dig_out_nid);
1521 if (err < 0) 1521 if (err < 0)
1522 return err; 1522 return err;
1523 err = snd_hda_create_spdif_share_sw(codec,
1524 &spec->multiout);
1525 if (err < 0)
1526 return err;
1527 spec->multiout.share_spdif = 1;
1523 } 1528 }
1524 if (spec->dig_in_nid) { 1529 if (spec->dig_in_nid) {
1525 err = snd_hda_create_spdif_in_ctls(codec, spec->dig_in_nid); 1530 err = snd_hda_create_spdif_in_ctls(codec, spec->dig_in_nid);
@@ -2325,7 +2330,8 @@ static int alc880_playback_pcm_open(struct hda_pcm_stream *hinfo,
2325 struct snd_pcm_substream *substream) 2330 struct snd_pcm_substream *substream)
2326{ 2331{
2327 struct alc_spec *spec = codec->spec; 2332 struct alc_spec *spec = codec->spec;
2328 return snd_hda_multi_out_analog_open(codec, &spec->multiout, substream); 2333 return snd_hda_multi_out_analog_open(codec, &spec->multiout, substream,
2334 hinfo);
2329} 2335}
2330 2336
2331static int alc880_playback_pcm_prepare(struct hda_pcm_stream *hinfo, 2337static int alc880_playback_pcm_prepare(struct hda_pcm_stream *hinfo,