From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [patch] for 9880 spdif out Date: Fri, 18 Mar 2005 14:46:42 +0100 Message-ID: References: <92C0412E07F63549B2A2F2345D3DB515F7D69F@cm-msg-02.cmedia.com.tw> Mime-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: multipart/mixed; boundary="Multipart_Fri_Mar_18_14:46:42_2005-1" Received: from Cantor.suse.de (ns.suse.de [195.135.220.2]) by alsa.alsa-project.org (ALSA's E-mail Delivery System) with ESMTP id 2E27C23B for ; Fri, 18 Mar 2005 14:46:48 +0100 (MET) In-Reply-To: Sender: alsa-devel-admin@lists.sourceforge.net Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: "Tien, C.L." Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org --Multipart_Fri_Mar_18_14:46:42_2005-1 Content-Type: text/plain; charset=US-ASCII At Thu, 17 Mar 2005 12:41:24 +0100, I wrote: > > > --- alsa-kernel/pci/hda/hda_codec.c 16 Mar 2005 13:37:09 -0000 1.7 > > +++ alsa-kernel/pci/hda/hda_codec.c 17 Mar 2005 04:40:12 -0000 > > @@ -955,6 +955,8 @@ > > if (change || codec->in_resume) { > > codec->spdif_ctls = val; > > snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_DIGI_CONVERT_1, val & 0xff); > > + put_vol_mute(codec, nid, 0, HDA_OUTPUT, 0, val ? 0 : 0x80); > > + put_vol_mute(codec, nid, 1, HDA_OUTPUT, 0, val ? 0 : 0x80); > > It should check only the enable bit (bit0) of val. > Also, these two calls can be a single verb, e.g. > > snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_AMP_GAIN_MUTE, > AC_AMP_SET_LEFT|AC_AMP_SET_RIGHT|AC_AMP_SET_OUTPUT| > ((val & 1) ? 0 : 0x80)); > > Could you check whether this works? OK the patch is below. Please let me know if it works. Takashi --Multipart_Fri_Mar_18_14:46:42_2005-1 Content-Type: text/plain; charset=US-ASCII Index: alsa-kernel/pci/hda/hda_codec.c =================================================================== RCS file: /home/iwai/cvs/alsa/alsa-kernel/pci/hda/hda_codec.c,v retrieving revision 1.8 diff -u -r1.8 hda_codec.c --- alsa-kernel/pci/hda/hda_codec.c 16 Mar 2005 13:36:04 -0000 1.8 +++ alsa-kernel/pci/hda/hda_codec.c 18 Mar 2005 13:45:34 -0000 @@ -955,6 +955,9 @@ if (change || codec->in_resume) { codec->spdif_ctls = val; snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_DIGI_CONVERT_1, val & 0xff); + snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_AMP_GAIN_MUTE, + AC_AMP_SET_RIGHT | AC_AMP_SET_LEFT | + AC_AMP_SET_OUTPUT | ((val & 1) ? 0 : 0x80)); } up(&codec->spdif_mutex); return change; --Multipart_Fri_Mar_18_14:46:42_2005-1-- ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click