aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_analog.c
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2011-06-01 13:14:18 -0400
committerTakashi Iwai <tiwai@suse.de>2011-06-06 06:51:59 -0400
commit74b654c957e901e7596ebc7b9f5a1bea62b20509 (patch)
tree2ae316f1b481c0ad4a84c1caff9b99ca57fe63ba /sound/pci/hda/patch_analog.c
parent7c9359762797ba7a70bbaa6364aaecc16786ac83 (diff)
ALSA: hda: Virtualize SPDIF out controls
The SPDIF output controls apply to converter widgets. A future change will create a PCM device per pin widget, and hence a set of SPDIF output controls per pin widget, for certain HDMI codecs. To support this, we need the ability to virtualize the SPDIF output controls. Specifically: * Controls can be "unassigned" from real hardware when a converter is not used for the PCM the control was created for. * Control puts only write to hardware when they are assigned. * Controls can be "assigned" to real hardware when a converter is picked to support output for a particular PCM. * When a converter is assigned, the hardware is updated to the cached configuration. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_analog.c')
-rw-r--r--sound/pci/hda/patch_analog.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c
index d694e9d4921d..0f7b8951440f 100644
--- a/sound/pci/hda/patch_analog.c
+++ b/sound/pci/hda/patch_analog.c
@@ -213,7 +213,9 @@ static int ad198x_build_controls(struct hda_codec *codec)
213 return err; 213 return err;
214 } 214 }
215 if (spec->multiout.dig_out_nid) { 215 if (spec->multiout.dig_out_nid) {
216 err = snd_hda_create_spdif_out_ctls(codec, spec->multiout.dig_out_nid); 216 err = snd_hda_create_spdif_out_ctls(codec,
217 spec->multiout.dig_out_nid,
218 spec->multiout.dig_out_nid);
217 if (err < 0) 219 if (err < 0)
218 return err; 220 return err;
219 err = snd_hda_create_spdif_share_sw(codec, 221 err = snd_hda_create_spdif_share_sw(codec,