At Tue, 22 Jan 2008 21:20:49 +0100, Martin Egge wrote: > > Hi, > > is there any way to use the digital output via toslink on my Samsung P50 > notebook? > > It has an integrated Intel Corporation 82801G (ICH7 Family) High Definition > Audio Controller. The soundchip is supported via HDA-Intel and the codec is > Analog Devices AD1986A. > > If the digital output is not supported at the moment, I'd like to help the > developers with information, testing an even coding. > > You can find all alsa related information about my system at [1] The SPDIF is disabled intentionally for your model because no one could test it. Does the patch below work? Takashi --- diff -r 8ba16b4a9e2d pci/hda/patch_analog.c --- a/pci/hda/patch_analog.c Wed Jan 23 11:52:38 2008 +0100 +++ b/pci/hda/patch_analog.c Wed Jan 23 12:05:02 2008 +0100 @@ -921,6 +921,13 @@ static struct hda_amp_list ad1986a_loopb }; #endif +static int is_jack_available(struct hda_codec *codec, hda_nid_t nid) +{ + unsigned int conf = snd_hda_codec_read(codec, nid, 0, + AC_VERB_GET_CONFIG_DEFAULT, 0); + return get_defcfg_connect(conf) != AC_JACK_PORT_NONE; +} + static int patch_ad1986a(struct hda_codec *codec) { struct ad198x_spec *spec; @@ -980,7 +987,8 @@ static int patch_ad1986a(struct hda_code spec->multiout.max_channels = 2; spec->multiout.num_dacs = 1; spec->multiout.dac_nids = ad1986a_laptop_dac_nids; - spec->multiout.dig_out_nid = 0; + if (!is_jack_available(codec, 0x25)) + spec->multiout.dig_out_nid = 0; spec->input_mux = &ad1986a_laptop_eapd_capture_source; break; case AD1986A_LAPTOP_AUTOMUTE: @@ -991,7 +999,8 @@ static int patch_ad1986a(struct hda_code spec->multiout.max_channels = 2; spec->multiout.num_dacs = 1; spec->multiout.dac_nids = ad1986a_laptop_dac_nids; - spec->multiout.dig_out_nid = 0; + if (!is_jack_available(codec, 0x25)) + spec->multiout.dig_out_nid = 0; spec->input_mux = &ad1986a_laptop_eapd_capture_source; codec->patch_ops.unsol_event = ad1986a_hp_unsol_event; codec->patch_ops.init = ad1986a_hp_init; _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel