Subject: Re: kern/34071: azalia device driver doesn't support pin sensing
To: None <kent@NetBSD.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,>
From: TAMURA Kent <kent@NetBSD.org>
List: netbsd-bugs
Date: 05/08/2007 02:25:02
The following reply was made to PR kern/34071; it has been noted by GNATS.

From: "TAMURA Kent" <kent@NetBSD.org>
To: gnats-bugs@netbsd.org, wulf@netbsd.org, simonb@netbsd.org
Cc: 
Subject: Re: kern/34071: azalia device driver doesn't support pin sensing
Date: Mon, 7 May 2007 19:21:43 -0700

 ------=_Part_52357_5199710.1178590903578
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline
 
 Would you test the attached patch please?
 
 -- 
 TAMURA Kent <kent_2007 at hauN.org> <kent at NetBSD.org>
 
 ------=_Part_52357_5199710.1178590903578
 Content-Type: application/octet-stream; name=azalia_codec.diff
 Content-Transfer-Encoding: base64
 X-Attachment-Id: f_f1fqgaoj
 Content-Disposition: attachment; filename="azalia_codec.diff"
 
 SW5kZXg6IGF6YWxpYV9jb2RlYy5jCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KUkNTIGZpbGU6IC9jdnNyb290L3NyYy9z
 eXMvZGV2L3BjaS9hemFsaWFfY29kZWMuYyx2CnJldHJpZXZpbmcgcmV2aXNpb24gMS4zNgpkaWZm
 IC11IC1yMS4zNiBhemFsaWFfY29kZWMuYwotLS0gYXphbGlhX2NvZGVjLmMJMTkgTWFyIDIwMDcg
 MTY6Mjc6MDAgLTAwMDAJMS4zNgorKysgYXphbGlhX2NvZGVjLmMJOCBNYXkgMjAwNyAwMjoxNjo1
 MSAtMDAwMApAQCAtOTUsNiArOTUsNyBAQAogc3RhdGljIGludAlnZW5lcmljX21peGVyX2Vuc3Vy
 ZV9jYXBhY2l0eShjb2RlY190ICosIHNpemVfdCk7CiBzdGF0aWMgaW50CWdlbmVy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