Add proper Realtek ALC268 support. While we're here, fix a comment in

the ALC262 quirk section. Tested by Sean Davis on an Acer Aspire One.
This commit is contained in:
jmcneill 2009-02-28 17:12:13 +00:00
parent e4b2f37a4b
commit 4ca035a32b
1 changed files with 26 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: azalia_codec.c,v 1.75 2009/02/23 02:34:57 jmcneill Exp $ */
/* $NetBSD: azalia_codec.c,v 1.76 2009/02/28 17:12:13 jmcneill Exp $ */
/*-
* Copyright (c) 2005 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: azalia_codec.c,v 1.75 2009/02/23 02:34:57 jmcneill Exp $");
__KERNEL_RCSID(0, "$NetBSD: azalia_codec.c,v 1.76 2009/02/28 17:12:13 jmcneill Exp $");
#include <sys/param.h>
#include <sys/device.h>
@ -116,6 +116,7 @@ static int alc260_set_port(codec_t *, mixer_ctrl_t *);
static int alc260_get_port(codec_t *, mixer_ctrl_t *);
static int alc260_unsol_event(codec_t *, int);
static int alc262_init_widget(const codec_t *, widget_t *, nid_t);
static int alc268_init_dacgroup(codec_t *);
static int alc662_init_dacgroup(codec_t *);
static int alc861_init_dacgroup(codec_t *);
static int alc861vdgr_init_dacgroup(codec_t *);
@ -197,6 +198,9 @@ azalia_codec_init_vtbl(codec_t *this)
break;
case 0x10ec0268:
this->name = "Realtek ALC268";
this->init_dacgroup = alc268_init_dacgroup;
this->mixer_init = generic_mixer_autoinit;
this->init_widget = generic_mixer_init_widget;
break;
case 0x10ec0269:
this->name = "Realtek ALC269";
@ -2419,7 +2423,7 @@ alc260_unsol_event(codec_t *this, int tag)
}
/* ----------------------------------------------------------------
* Realtek ALC861
* Realtek ALC262
* ---------------------------------------------------------------- */
static int
@ -2434,6 +2438,25 @@ alc262_init_widget(const codec_t *this, widget_t *w, nid_t nid)
return 0;
}
/* ----------------------------------------------------------------
* Realtek ALC268
* ---------------------------------------------------------------- */
static int
alc268_init_dacgroup(codec_t *this)
{
static const convgroupset_t dacs = {
-1, 1,
{{2, {0x02, 0x03}}}}; /* analog 4ch */
static const convgroupset_t adcs = {
-1, 1,
{{2, {0x08, 0x07}}}}; /* analog 4ch */
this->dacs = dacs;
this->adcs = adcs;
return 0;
}
/* ----------------------------------------------------------------
* Realtek ALC662-GR
* ---------------------------------------------------------------- */