azalia: better conveter group configuration

classic Classic list List threaded Threaded
28 messages Options
12
Reply | Threaded
Open this post in threaded view
|

azalia: better conveter group configuration

j4nKy
this is an important patch to test on all azalia.

this sets up converter (DACs and ADCs) groups in a generic way.
we have to get this right before mixer item naming can be fixed
in a meaningful way, as the converters are the most important
part of the device as a whole.

please test that you can still play and record as before.  if you
have any regressions, please send along a complete dmesg.  if you
were successfully playing multi-channel, or multi-streaming via
aucat, test that too.

please remove any azalia related patch(es) before applying this
and test with only this diff.

thanks.

--
[hidden email]
SDF Public Access UNIX System - http://sdf.lonestar.org

Index: azalia.c
===================================================================
RCS file: /home2/cvs/OpenBSD/src/sys/dev/pci/azalia.c,v
retrieving revision 1.73
diff -u -r1.73 azalia.c
--- azalia.c 19 Nov 2008 03:44:14 -0000 1.73
+++ azalia.c 23 Nov 2008 08:43:01 -0000
@@ -1289,6 +1289,13 @@
  }
  DPRINTF(("\n"));
  }
+ for (i = 0; i < this->adcs.ngroups; i++) {
+ DPRINTF(("%s: adcgroup[%d]:", __func__, i));
+ for (n = 0; n < this->adcs.groups[i].nconv; n++) {
+ DPRINTF((" %2.2x", this->adcs.groups[i].conv[n]));
+ }
+ DPRINTF(("\n"));
+ }
 #endif
 
  /* set invalid values for azalia_codec_construct_format() to work */
Index: azalia.h
===================================================================
RCS file: /home2/cvs/OpenBSD/src/sys/dev/pci/azalia.h,v
retrieving revision 1.21
diff -u -r1.21 azalia.h
--- azalia.h 19 Nov 2008 03:44:14 -0000 1.21
+++ azalia.h 23 Nov 2008 08:43:01 -0000
@@ -501,7 +501,7 @@
 } __packed rirb_entry_t;
 
 
-/* #define AZALIA_DEBUG */
+#define AZALIA_DEBUG 1
 #ifdef AZALIA_DEBUG
 # define DPRINTF(x) do { printf x; } while (0/*CONSTCOND*/)
 #else
Index: azalia_codec.c
===================================================================
RCS file: /home2/cvs/OpenBSD/src/sys/dev/pci/azalia_codec.c,v
retrieving revision 1.67
diff -u -r1.67 azalia_codec.c
--- azalia_codec.c 19 Nov 2008 21:49:44 -0000 1.67
+++ azalia_codec.c 23 Nov 2008 08:43:01 -0000
@@ -71,10 +71,10 @@
 #define STAC9205_DELL_V1500 0x02281028
 
 int azalia_generic_codec_init_dacgroup(codec_t *);
-int azalia_generic_codec_add_dacgroup(codec_t *, int, uint32_t);
-int azalia_generic_codec_find_pin(const codec_t *, int, int, uint32_t);
-int azalia_generic_codec_find_dac(const codec_t *, int, int);
-
+int azalia_generic_codec_is_live_pin(widget_t *, uint32_t, uint32_t);
+int azalia_generic_codec_find_node(codec_t *, nid_t, int, int);
+int azalia_generic_codec_add_convgroup(codec_t *, convgroupset_t *,
+    uint32_t, uint32_t);
 int azalia_generic_mixer_init(codec_t *);
 int azalia_generic_mixer_autoinit(codec_t *);
 
@@ -94,16 +94,8 @@
 int azalia_generic_get_port(codec_t *, mixer_ctrl_t *);
 int azalia_gpio_unmute(codec_t *, int);
 
-int azalia_alc260_init_dacgroup(codec_t *);
 int azalia_alc260_mixer_init(codec_t *);
-int azalia_alc662_init_dacgroup(codec_t *);
-int azalia_alc861_init_dacgroup(codec_t *);
 int azalia_alc88x_mixer_init(codec_t *);
-int azalia_alc880_init_dacgroup(codec_t *);
-int azalia_alc882_init_dacgroup(codec_t *);
-int azalia_alc883_init_dacgroup(codec_t *);
-int azalia_alc885_init_dacgroup(codec_t *);
-int azalia_alc888_init_dacgroup(codec_t *);
 int azalia_ad1984_init_dacgroup(codec_t *);
 int azalia_ad1984_mixer_init(codec_t *);
 int azalia_ad1984_set_port(codec_t *, mixer_ctrl_t *);
@@ -112,13 +104,10 @@
 int azalia_cmi9880_init_dacgroup(codec_t *);
 int azalia_cmi9880_mixer_init(codec_t *);
 int azalia_stac9200_mixer_init(codec_t *);
-int azalia_stac9205_init_dacgroup(codec_t *);
-int azalia_stac9221_mixer_init(codec_t *);
 int azalia_stac9221_init_dacgroup(codec_t *);
+int azalia_stac9221_mixer_init(codec_t *);
 int azalia_stac9221_set_port(codec_t *, mixer_ctrl_t *);
 int azalia_stac9221_get_port(codec_t *, mixer_ctrl_t *);
-int azalia_stac9227_init_dacgroup(codec_t *);
-int azalia_stac9271_init_dacgroup(codec_t *);
 int azalia_stac7661_init_dacgroup(codec_t *);
 int azalia_stac7661_mixer_init(codec_t *);
 int azalia_stac7661_set_port(codec_t *, mixer_ctrl_t *);
@@ -141,7 +130,6 @@
  case 0x10ec0260:
  this->name = "Realtek ALC260";
  this->mixer_init = azalia_alc260_mixer_init;
- this->init_dacgroup = azalia_alc260_init_dacgroup;
  break;
  case 0x10ec0268:
  this->name = "Realtek ALC268";
@@ -151,36 +139,29 @@
  break;
  case 0x10ec0662:
  this->name = "Realtek ALC662-GR";
- this->init_dacgroup = azalia_alc662_init_dacgroup;
  break;
  case 0x10ec0861:
  this->name = "Realtek ALC861";
- this->init_dacgroup = azalia_alc861_init_dacgroup;
  break;
  case 0x10ec0880:
  this->name = "Realtek ALC880";
- this->init_dacgroup = azalia_alc880_init_dacgroup;
  this->mixer_init = azalia_alc88x_mixer_init;
  break;
  case 0x10ec0882:
  this->name = "Realtek ALC882";
- this->init_dacgroup = azalia_alc882_init_dacgroup;
  this->mixer_init = azalia_alc88x_mixer_init;
  break;
  case 0x10ec0883:
  /* ftp://209.216.61.149/pc/audio/ALC883_DataSheet_1.3.pdf */
  this->name = "Realtek ALC883";
- this->init_dacgroup = azalia_alc883_init_dacgroup;
  this->mixer_init = azalia_alc88x_mixer_init;
  break;
  case 0x10ec0885:
  this->name = "Realtek ALC885";
- this->init_dacgroup = azalia_alc885_init_dacgroup;
  this->mixer_init = azalia_alc88x_mixer_init;
  break;
  case 0x10ec0888:
  this->name = "Realtek ALC888";
- this->init_dacgroup = azalia_alc888_init_dacgroup;
  this->mixer_init = azalia_alc88x_mixer_init;
  break;
  case 0x11d41983:
@@ -221,31 +202,24 @@
  break;
  case 0x83847616:
  this->name = "Sigmatel STAC9228X";
- this->init_dacgroup = azalia_stac9227_init_dacgroup;
  break;
  case 0x83847617:
  this->name = "Sigmatel STAC9228D";
- this->init_dacgroup = azalia_stac9227_init_dacgroup;
  break;
  case 0x83847618:
  this->name = "Sigmatel STAC9227X";
- this->init_dacgroup = azalia_stac9227_init_dacgroup;
  break;
  case 0x83847620:
  this->name = "Sigmatel STAC9274";
- this->init_dacgroup = azalia_stac9271_init_dacgroup;
  break;
  case 0x83847621:
  this->name = "Sigmatel STAC9274D";
- this->init_dacgroup = azalia_stac9271_init_dacgroup;
  break;
  case 0x83847626:
  this->name = "Sigmatel STAC9271X";
- this->init_dacgroup = azalia_stac9271_init_dacgroup;
  break;
  case 0x83847627:
  this->name = "Sigmatel STAC9271D";
- this->init_dacgroup = azalia_stac9271_init_dacgroup;
  break;
  case 0x83847632:
  this->name = "Sigmatel STAC9202";
@@ -292,19 +266,15 @@
  break;
  case 0x838476a0:
  this->name = "Sigmatel STAC9205X";
- this->init_dacgroup = azalia_stac9205_init_dacgroup;
  break;
  case 0x838476a1:
  this->name = "Sigmatel STAC9205D";
- this->init_dacgroup = azalia_stac9205_init_dacgroup;
  break;
  case 0x838476a2:
  this->name = "Sigmatel STAC9204X";
- this->init_dacgroup = azalia_stac9205_init_dacgroup;
  break;
  case 0x838476a3:
  this->name = "Sigmatel STAC9204D";
- this->init_dacgroup = azalia_stac9205_init_dacgroup;
  break;
  }
  return 0;
@@ -317,153 +287,161 @@
 int
 azalia_generic_codec_init_dacgroup(codec_t *this)
 {
- int i, j, assoc, group;
-
- /*
- * grouping DACs
- *   [0] the lowest assoc DACs
- *   [1] the lowest assoc digital outputs
- *   [2] the 2nd assoc DACs
- *      :
- */
  this->dacs.ngroups = 0;
- for (assoc = 0; assoc < CORB_CD_ASSOCIATION_MAX; assoc++) {
- azalia_generic_codec_add_dacgroup(this, assoc, 0);
- azalia_generic_codec_add_dacgroup(this, assoc, COP_AWCAP_DIGITAL);
- }
-
- /* find DACs which do not connect with any pins by default */
- FOR_EACH_WIDGET(this, i) {
- boolean_t found;
-
- if (this->w[i].type != COP_AWTYPE_AUDIO_OUTPUT)
- continue;
- found = FALSE;
- for (group = 0; group < this->dacs.ngroups; group++) {
- for (j = 0; j < this->dacs.groups[group].nconv; j++) {
- if (i == this->dacs.groups[group].conv[j]) {
- found = TRUE;
- group = this->dacs.ngroups;
- break;
- }
- }
- }
- if (found)
- continue;
- if (this->dacs.ngroups >= 32)
- break;
- this->dacs.groups[this->dacs.ngroups].nconv = 1;
- this->dacs.groups[this->dacs.ngroups].conv[0] = i;
- this->dacs.ngroups++;
- }
+ azalia_generic_codec_add_convgroup(this, &this->dacs,
+    COP_AWTYPE_AUDIO_OUTPUT, 0);
+ azalia_generic_codec_add_convgroup(this, &this->dacs,
+    COP_AWTYPE_AUDIO_OUTPUT, COP_AWCAP_DIGITAL);
  this->dacs.cur = 0;
 
- /* enumerate ADCs */
  this->adcs.ngroups = 0;
- FOR_EACH_WIDGET(this, i) {
- if (this->w[i].type != COP_AWTYPE_AUDIO_INPUT)
- continue;
- this->adcs.groups[this->adcs.ngroups].nconv = 1;
- this->adcs.groups[this->adcs.ngroups].conv[0] = i;
- this->adcs.ngroups++;
- if (this->adcs.ngroups >= 32)
- break;
- }
+ azalia_generic_codec_add_convgroup(this, &this->adcs,
+    COP_AWTYPE_AUDIO_INPUT, 0);
+ azalia_generic_codec_add_convgroup(this, &this->adcs,
+    COP_AWTYPE_AUDIO_INPUT, COP_AWCAP_DIGITAL);
  this->adcs.cur = 0;
+
  return 0;
 }
 
 int
-azalia_generic_codec_add_dacgroup(codec_t *this, int assoc, uint32_t digital)
+azalia_generic_codec_add_convgroup(codec_t *this, convgroupset_t *group,
+    uint32_t type, uint32_t digital)
 {
- int i, j, n, dac, seq;
+ nid_t all_convs[HDA_MAX_CHANNELS];
+ int nall_convs;
+ nid_t convs[HDA_MAX_CHANNELS];
+ int nconvs;
+ nid_t conv;
+ int i, j, k, l;
 
- n = 0;
- for (seq = 0 ; seq < CORB_CD_SEQUENCE_MAX; seq++) {
- i = azalia_generic_codec_find_pin(this, assoc, seq, digital);
- if (i < 0)
- continue;
- dac = azalia_generic_codec_find_dac(this, i, 0);
- if (dac < 0)
- continue;
- /* duplication check */
- for (j = 0; j < n; j++) {
- if (this->dacs.groups[this->dacs.ngroups].conv[j] == dac)
- break;
- }
- if (j < n) /* this group already has <dac> */
- continue;
- this->dacs.groups[this->dacs.ngroups].conv[n++] = dac;
+ nall_convs = 0;
+ FOR_EACH_WIDGET(this, i) {
+ if (this->w[i].type == type &&
+    (this->w[i].widgetcap & COP_AWCAP_DIGITAL) == digital &&
+    nall_convs < HDA_MAX_CHANNELS)
+ all_convs[nall_convs++] = this->w[i].nid;
  }
- if (n <= 0) /* no such DACs */
- return 0;
- this->dacs.groups[this->dacs.ngroups].nconv = n;
 
- /* check if the same combination is already registered */
- for (i = 0; i < this->dacs.ngroups; i++) {
- if (n != this->dacs.groups[i].nconv)
- continue;
- for (j = 0; j < n; j++) {
- if (this->dacs.groups[this->dacs.ngroups].conv[j] !=
-    this->dacs.groups[i].conv[j])
+ nconvs = 0;
+ FOR_EACH_WIDGET(this, i) {
+ if (type == COP_AWTYPE_AUDIO_OUTPUT) {
+ if (azalia_generic_codec_is_live_pin(&this->w[i],
+    COP_PINCAP_OUTPUT, digital) == 0)
+ continue;
+ } else {
+ if (azalia_generic_codec_is_live_pin(&this->w[i],
+    COP_PINCAP_INPUT, digital) == 0)
+ continue;
+ }
+ for (j = 0; j < nall_convs; j++) {
+ conv = all_convs[j];
+ for (k = 0; k < nconvs; k++) {
+ if (convs[k] == conv)
+ break;
+ }
+ if (k < nconvs)
+ continue;
+ if (type == COP_AWTYPE_AUDIO_OUTPUT) {
+ k = azalia_generic_codec_find_node(this, conv,
+    i, 0);
+ if (k < 0 || this->w[k].nid != conv)
+ continue;
+ } else {
+ for (l = 0; l < this->wend; l++)
+ if (this->w[l].nid == conv)
+ break;
+ k = azalia_generic_codec_find_node(this,
+    this->w[i].nid, l, 0);
+ if (k < 0 || this->w[k].nid != this->w[i].nid)
+ continue;
+ }
+ /* insert in ascending NID order */
+ for (k = 0; k < nconvs; k++) {
+ if (convs[k] > conv) {
+ for (l = nconvs; l > k; l--) {
+ convs[l] = convs[l - 1];
+ }
+ convs[l] = conv;
+ break;
+ }
+ }
+ if (k == nconvs)
+ convs[nconvs] = conv;
+ nconvs++;
+ if (nconvs >= nall_convs ||
+    nconvs >= HDA_MAX_CHANNELS)
  break;
  }
- if (j >= n) /* matched */
- return 0;
+ if (nconvs >= nall_convs || nconvs >= HDA_MAX_CHANNELS)
+ break;
+ }
+
+ for (i = 0; i < nconvs; i++)
+ group->groups[group->ngroups].conv[i] = convs[i];
+ if (nconvs > 0) {
+ group->groups[group->ngroups].nconv = i;
+ group->ngroups++;
  }
- /* found no equivalent group */
- this->dacs.ngroups++;
+
  return 0;
 }
 
 int
-azalia_generic_codec_find_pin(const codec_t *this, int assoc, int seq, uint32_t digital)
+azalia_generic_codec_is_live_pin(widget_t *w, uint32_t iocap, uint32_t digital)
 {
- int i;
+ uint8_t conn, dev;
 
- FOR_EACH_WIDGET(this, i) {
- if (this->w[i].type != COP_AWTYPE_PIN_COMPLEX)
- continue;
- if ((this->w[i].d.pin.cap & COP_PINCAP_OUTPUT) == 0)
- continue;
- if ((this->w[i].widgetcap & COP_AWCAP_DIGITAL) != digital)
- continue;
- if (this->w[i].d.pin.association != assoc)
- continue;
- if (this->w[i].d.pin.sequence == seq) {
- return i;
- }
+ if (w->type != COP_AWTYPE_PIN_COMPLEX)
+ return 0;
+ if ((w->d.pin.cap & iocap) == 0)
+ return 0;
+ if ((w->widgetcap & COP_AWCAP_DIGITAL) != digital)
+ return 0;
+ PIN_STATUS(w, conn);
+ if (conn == CORB_CD_NONE)
+ return 0;
+ dev = CORB_CD_DEVICE(w->d.pin.config);
+ if (iocap == COP_PINCAP_OUTPUT) {
+ if (dev == CORB_CD_LINEOUT || dev == CORB_CD_SPEAKER ||
+    dev == CORB_CD_HEADPHONE ||
+    (digital == COP_AWCAP_DIGITAL &&
+    (dev == CORB_CD_SPDIFOUT || dev == CORB_CD_DIGITALOUT)))
+ return 1;
+ } else {
+ if (dev == CORB_CD_MICIN || dev == CORB_CD_LINEIN ||
+    (digital == COP_AWCAP_DIGITAL &&
+    (dev == CORB_CD_SPDIFIN || dev == CORB_CD_DIGITALIN)))
+ return 1;
  }
- return -1;
+
+ return 0;
 }
 
 int
-azalia_generic_codec_find_dac(const codec_t *this, int index, int depth)
+azalia_generic_codec_find_node(codec_t *this, nid_t node, int index, int depth)
 {
  const widget_t *w;
- int i, j, ret;
+ int i, j, k, ret;
 
  w = &this->w[index];
- if (w->type == COP_AWTYPE_AUDIO_OUTPUT)
+ if (w->nid == node)
  return index;
- if (++depth > 50) {
+ if (++depth > 50)
  return -1;
- }
- if (w->selected >= 0) {
- j = w->connections[w->selected];
- if (VALID_WIDGET_NID(j, this)) {
- ret = azalia_generic_codec_find_dac(this, j, depth);
- if (ret >= 0)
- return ret;
- }
- }
  for (i = 0; i < w->nconnections; i++) {
  j = w->connections[i];
  if (!VALID_WIDGET_NID(j, this))
  continue;
- ret = azalia_generic_codec_find_dac(this, j, depth);
- if (ret >= 0)
- return ret;
+ FOR_EACH_WIDGET(this, k)
+ if (this->w[k].nid == j)
+ break;
+ if (k < this->wend) {
+ ret = azalia_generic_codec_find_node(this, node, k,
+    depth);
+ if (ret >= 0)
+ return ret;
+ }
  }
  return -1;
 }
@@ -1813,63 +1791,6 @@
  return 0;
 }
 
-int
-azalia_alc260_init_dacgroup(codec_t *this)
-{
- static const convgroupset_t dacs = {
- -1, 2,
- {{1, {0x02}}, /* analog 2ch */
- {1, {0x03}}}}; /* digital */
- static const convgroupset_t adcs = {
- -1, 3,
- {{1, {0x04}}, /* analog 2ch */
- {1, {0x05}}, /* analog 2ch */
- {1, {0x06}}}}; /* digital */
-
- this->dacs = dacs;
- this->adcs = adcs;
- return 0;
-}
-
-/* ----------------------------------------------------------------
- * Realtek ALC662-GR
- * ---------------------------------------------------------------- */
-
-int
-azalia_alc662_init_dacgroup(codec_t *this)
-{
- static const convgroupset_t dacs = {
- -1, 1,
- {{3, {0x02, 0x03, 0x04}}}}; /* analog 6ch */
- static const convgroupset_t adcs = {
- -1, 1,
- {{2, {0x09, 0x08}}}}; /* analog 4ch */
-
- this->dacs = dacs;
- this->adcs = adcs;
- return 0;
-}
-
-/* ----------------------------------------------------------------
- * Realtek ALC861
- * ---------------------------------------------------------------- */
-
-int
-azalia_alc861_init_dacgroup(codec_t *this)
-{
- static const convgroupset_t dacs = {
- -1, 2,
- {{4, {0x03, 0x04, 0x05, 0x06}}, /* analog 8ch */
- {1, {0x07}}}}; /* digital */
- static const convgroupset_t adcs = {
- -1, 1,
- {{1, {0x08}}}}; /* analog 2ch */
-
- this->dacs = dacs;
- this->adcs = adcs;
- return 0;
-}
-
 /* ----------------------------------------------------------------
  * Realtek ALC88x mixer init - volume control is on the mixer
  * instead of the DAC.
@@ -1886,113 +1807,6 @@
 }
 
 /* ----------------------------------------------------------------
- * Realtek ALC880
- * ---------------------------------------------------------------- */
-
-int
-azalia_alc880_init_dacgroup(codec_t *this)
-{
- static const convgroupset_t dacs = {
- -1, 2,
- {{4, {0x02, 0x03, 0x04, 0x05}}, /* analog 8ch */
- {1, {0x06}}}}; /* digital */
- static const convgroupset_t adcs = {
- -1, 2,
- {{3, {0x07, 0x08, 0x09}}, /* analog 6ch */
- {1, {0x0a}}}}; /* digital */
-
- this->dacs = dacs;
- this->adcs = adcs;
- return 0;
-}
-
-/* ----------------------------------------------------------------
- * Realtek ALC882
- * ---------------------------------------------------------------- */
-
-int
-azalia_alc882_init_dacgroup(codec_t *this)
-{
- static const convgroupset_t dacs = {
- -1, 2,
- {{5, {0x02, 0x03, 0x04, 0x05, 0x25}}, /* analog 10ch */
- {1, {0x06}}}}; /* digital */
- static const convgroupset_t adcs = {
- -1, 2,
- {{3, {0x07, 0x08, 0x09}}, /* analog 6ch */
- {1, {0x0a}}}}; /* digital */
-
- this->dacs = dacs;
- this->adcs = adcs;
- return 0;
-}
-
-/* ----------------------------------------------------------------
- * Realtek ALC883
- * ALC882 without adc07 and mix24.
- * ---------------------------------------------------------------- */
-
-int
-azalia_alc883_init_dacgroup(codec_t *this)
-{
- static const convgroupset_t dacs = {
- -1, 2,
- {{5, {0x02, 0x03, 0x04, 0x05, 0x25}}, /* analog 10ch */
- {1, {0x06}}}}; /* digital */
- static const convgroupset_t adcs = {
- -1, 2,
- {{2, {0x08, 0x09}}, /* analog 4ch */
- {1, {0x0a}}}}; /* digital */
-
- this->dacs = dacs;
- this->adcs = adcs;
- return 0;
-}
-
-/* ----------------------------------------------------------------
- * Realtek ALC885
- * ---------------------------------------------------------------- */
-
-int
-azalia_alc885_init_dacgroup(codec_t *this)
-{
- static const convgroupset_t dacs = {
- -1, 2,
- {{5, {0x02, 0x03, 0x04, 0x05, 0x25}}, /* analog 10ch */
- {1, {0x06}}}}; /* digital */
- static const convgroupset_t adcs = {
- -1, 2,
- {{3, {0x07, 0x08, 0x09}}, /* analog 6ch */
- {1, {0x0a}}}}; /* digital */
-
- this->dacs = dacs;
- this->adcs = adcs;
- return 0;
-}
-
-/* ----------------------------------------------------------------
- * Realtek ALC888
- * ---------------------------------------------------------------- */
-
-int
-azalia_alc888_init_dacgroup(codec_t *this)
-{
- static const convgroupset_t dacs = {
- -1, 2,
- {{5, {0x02, 0x03, 0x04, 0x05, 0x25}}, /* analog 10ch */
- {1, {0x06}}}}; /* digital */
- /* ALC888S has another SPDIF-out 0x10 */
- static const convgroupset_t adcs = {
- -1, 2,
- {{2, {0x08, 0x09}}, /* analog 4ch */
- {1, {0x0a}}}}; /* digital */
-
- this->dacs = dacs;
- this->adcs = adcs;
- return 0;
-}
-
-/* ----------------------------------------------------------------
  * Analog Devices AD1984
  * ---------------------------------------------------------------- */
 
@@ -2445,62 +2259,6 @@
     MI_TARGET_OUTAMP, mc);
  return azalia_generic_mixer_get(this, m->nid, m->target, mc);
 }
-
-
-int
-azalia_stac9205_init_dacgroup(codec_t *this)
-{
- /* volume knob at nid 24 */
- static const convgroupset_t dacs = {
- -1, 1,
- {{2, {0x10, 0x11}}}};
-
- /* vols: 1d:1b, 1e:1a */
- static const convgroupset_t adcs = {
- -1, 1,
- {{2, {0x1d, 0x1e}}}};
-
- this->dacs = dacs;
- this->adcs = adcs;
- return 0;
-}
-
-int
-azalia_stac9227_init_dacgroup(codec_t *this)
-{
- /* volume knob at nid 24 */
- static const convgroupset_t dacs = {
- -1, 1,
- {{4, {0x02, 0x03, 0x04, 0x05}}}};
-
- /* vols: 07:18, 08:19, 09:1a */
- static const convgroupset_t adcs = {
- -1, 1,
- {{3, {0x07, 0x08, 0x09}}}};
-
- this->dacs = dacs;
- this->adcs = adcs;
- return 0;
-}
-
-int
-azalia_stac9271_init_dacgroup(codec_t *this)
-{
- /* volume knob at nid 24 */
- static const convgroupset_t dacs = {
- -1, 1,
- {{5, {0x02, 0x03, 0x04, 0x05, 0x06}}}};
-
- /* vols: 07:18, 08:19, 09:1a */
- static const convgroupset_t adcs = {
- -1, 1,
- {{3, {0x07, 0x08, 0x09}}}};
-
- this->dacs = dacs;
- this->adcs = adcs;
- return 0;
-}
-
 
 /* ----------------------------------------------------------------
  * Sony VAIO FE and SZ

Reply | Threaded
Open this post in threaded view
|

Re: azalia: better conveter group configuration

guilherme m. schroeder-2
Jacob,

Here's my dmesg and mixerctl outputs with the patch.
I still get no sound on speakers/headphone.

Gonna reply the email you sent me some time ago shortly.

OpenBSD 4.4-current (GENERIC.MP) #2: Sun Nov 23 21:38:38 BRST 2008
    root@dub:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 3694915584 (3523MB)
avail mem = 3585925120 (3419MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xf6590 (57 entries)
bios0: vendor Dell Inc. version "A06" date 10/10/2008
bios0: Dell Inc. Latitude E6400
acpi0 at bios0: rev 2
acpi0: tables DSDT FACP HPET DMAR APIC ASF! MCFG SLIC TCPA SSDT
acpi0: wakeup devices PCI0(S4) PCIE(S4) USB1(S0) USB2(S0) USB3(S0) USB4
(S0) USB5(S0) USB6(S0) EHC2(S0) EHCI(S0) AZAL(S3) RP01(S4) RP02(S4) RP03
(S4) RP04(S3) RP05(S3) RP06(S5) LID_(S3) PBTN(S4) acpitimer0 at acpi0:
3579545 Hz, 24 bits acpihpet0 at acpi0: 14318179 Hz acpimadt0 at acpi0
addr 0xfee00000: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM)2 Duo CPU P8400 @ 2.26GHz, 2261.37 MHz
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,SMX,EST,TM2,CX16,xTPR,NXE,LONG
cpu0: 3MB 64b/line 8-way L2 cache cpu0: apic clock running at 266MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM)2 Duo CPU P8400 @ 2.26GHz, 2261.00 MHz
cpu1:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,SMX,EST,TM2,CX16,xTPR,NXE,LONG
cpu1: 3MB 64b/line 8-way L2 cache ioapic0 at mainbus0 apid 2 pa
0xfec00000, version 20, 24 pins ioapic0: misconfigured as apic 0,
remapped to apid 2 acpiprt0 at acpi0: bus 3 (PCIE)
acpiprt1 at acpi0: bus -1 (AGP_)
acpiprt2 at acpi0: bus 11 (RP01)
acpiprt3 at acpi0: bus 12 (RP02)
acpiprt4 at acpi0: bus 13 (RP03)
acpiprt5 at acpi0: bus 14 (RP04)
acpiprt6 at acpi0: bus -1 (RP05)
acpiprt7 at acpi0: bus -1 (RP06)
acpiprt8 at acpi0: bus 0 (PCI0)
acpiec0 at acpi0
acpicpu0 at acpi0: C3, C2, C1, PSS
acpicpu1 at acpi0: C3, C2, C1, PSS
acpitz0 at acpi0: critical temperature 107 degC
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: PBTN
acpibtn2 at acpi0: SBTN
acpiac0 at acpi0: AC unit online
acpibat0 at acpi0: BAT0 model "DELL FU27488" serial 30161 type LION oem
"Sony" acpibat1 at acpi0: BAT1 not present
acpivideo at acpi0 not configured
acpivideo at acpi0 not configured
acpivideo at acpi0 not configured
cpu0: Enhanced SpeedStep 2261 MHz: speeds: 2268, 2267, 1600, 800 MHz
pci0 at mainbus0 bus 0: configuration mode 1
pchb0 at pci0 dev 0 function 0 "Intel GM45 Host" rev 0x07
vga1 at pci0 dev 2 function 0 "Intel GM45 Video" rev 0x07
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
intagp at vga1 not configured
inteldrm0 at vga1
drm0 at inteldrm0: couldn't find agp
"Intel GM45 Video" rev 0x07 at pci0 dev 2 function 1 not configured
em0 at pci0 dev 25 function 0 "Intel ICH9 IGP M AMT" rev 0x03: apic 2
int 22 (irq 10), address 00:21:70:a5:77:b8 uhci0 at pci0 dev 26
function 0 "Intel 82801I USB" rev 0x03: apic 2 int 20 (irq 7) uhci1 at
pci0 dev 26 function 1 "Intel 82801I USB" rev 0x03: apic 2 int 21 (irq
4) uhci2 at pci0 dev 26 function 2 "Intel 82801I USB" rev 0x03: apic 2
int 22 (irq 10) ehci0 at pci0 dev 26 function 7 "Intel 82801I USB" rev
0x03: apic 2 int 22 (irq 10) usb0 at ehci0: USB revision 2.0 uhub0 at
usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1 azalia0 at pci0 dev 27
function 0 "Intel 82801I HD Audio" rev 0x03: apic 2 int 21 (irq 4)
azalia0: host: High Definition Audio rev. 1.0 azalia0: host: 4 output,
4 input, and 0 bidi streams azalia_attach: resetting
azalia_attach: reset counter = 4999
azalia_attach: reset counter = 4985
azalia0: found a codec at #0
azalia0: found a codec at #2
azalia_init_corb: CORB allocation succeeded.
azalia_init_corb: CORBWP=0; size=256
azalia_init_rirb: RIRB allocation succeeded.
azalia_init_rirb: RIRBRP=0, size=256
azalia0: codec[0] vid 0x111d76b2, subid 0x02331028, rev. 3.2, HDA
version 1.0 azalia_codec_init: nidstart=1 #functions=1
azalia_codec_init: FTYPE result = 0x00000101
azalia_codec_init: There are 31 widgets in the audio function.
        encodings=1<PCM>
        PCM
formats=e07e0<24bit,20bit,16bit,192kHz,176.4kHz,96kHz,88.2kHz,48kHz,44.1kHz>
inamp: mute=1 size=0 steps=0 offset=0 outamp: mute=1 size=2 steps=127
offset=127 gpio: wake=1 unsol=1 gpis=0 gpos=0 gpios=8
azalia0: black0a wcap=400181<CONNLIST,UNSOL,STEREO>
        cap=1c<OUTPUT,HEADPHONE,PRESENCE>
        [01/15] color=black device=hp conn=jack conntype=1/8
        location=right chassis=external special=none
        connections=0x10,0x11,0x17; selected=0x10
azalia0: black0b wcap=400081<UNSOL,STEREO>
        cap=1724<VREF80,VREFGND,VREF50,VREFHIZ,INPUT,PRESENCE>
        [02/01] color=black device=mic conn=jack conntype=1/8
        location=right chassis=external special=none
azalia0: unknown0c wcap=400081<UNSOL,STEREO>
        cap=1724<VREF80,VREFGND,VREF50,VREFHIZ,INPUT,PRESENCE>
        [15/00] color=unknown device=other conn=none conntype=unknown
        location=n/a chassis=external special=none
azalia0: unknown0d wcap=400181<CONNLIST,UNSOL,STEREO>
        cap=14<OUTPUT,PRESENCE>
        [01/00] color=unknown device=spkr conn=fixed conntype=analog
        location=n/a chassis=internal special=none
        connections=0x10,0x11,0x17; selected=0x10
azalia0: black0e wcap=400081<UNSOL,STEREO>
        cap=1724<VREF80,VREFGND,VREF50,VREFHIZ,INPUT,PRESENCE>
        [02/14] color=black device=mic conn=jack conntype=1/8
        location=left chassis=separate special=none
azalia0: black0f wcap=400181<CONNLIST,UNSOL,STEREO>
        cap=14<OUTPUT,PRESENCE>
        [05/00] color=black device=line conn=jack conntype=1/8
        location=left chassis=separate special=none
        connections=0x10,0x11,0x17; selected=0x10
azalia0: dac10 wcap=d0c05<LRSWAP,POWER,OUTAMP,STEREO>
azalia0: dac11 wcap=d0c05<LRSWAP,POWER,OUTAMP,STEREO>
azalia0: adc12 wcap=1d0541<POWER,CONNLIST,PROC,STEREO>
        connections=0x1c; selected=0x1c
azalia0: adc13 wcap=1d0541<POWER,CONNLIST,PROC,STEREO>
        connections=0x1d; selected=0x1d
azalia0: unknown14 wcap=400100<CONNLIST>
        cap=10<OUTPUT>
        [15/02] color=unknown device=other conn=none conntype=unknown
        location=n/a chassis=external special=none
        connections=0x16; selected=0x16
azalia0: sel15 wcap=300101<CONNLIST,STEREO>
        connections=0x10,0x11,0x17; selected=0x10
azalia0: mix16 wcap=200100<CONNLIST>
        connections=0x15; selected=0x15
azalia0: mix17 wcap=20010b<CONNLIST,AMPOV,INAMP,STEREO>
        inamp: mute=1 size=5 steps=31 offset=23
        connections=0x10,0x11,0x27,0x1a,0x1b; selected=0x10
azalia0: unknown18 wcap=40000d<AMPOV,OUTAMP,STEREO>
        cap=20<INPUT>
        [10/00] color=unknown device=mic conn=fixed conntype=digital
        location=n/a chassis=internal special=none
        outamp: mute=0 size=39 steps=3 offset=0
azalia0: unknown19 wcap=40000d<AMPOV,OUTAMP,STEREO>
        cap=20<INPUT>
        [15/04] color=unknown device=other conn=none conntype=unknown
        location=n/a chassis=external special=none
        outamp: mute=0 size=39 steps=3 offset=0
azalia0: sel1a wcap=30010d<CONNLIST,AMPOV,OUTAMP,STEREO>
        outamp: mute=0 size=39 steps=3 offset=0
        connections=0xb,0xc,0xe; selected=0xb
azalia0: sel1b wcap=30010d<CONNLIST,AMPOV,OUTAMP,STEREO>
        outamp: mute=0 size=39 steps=3 offset=0
        connections=0xb,0xc,0xe; selected=0xb
azalia0: sel1c wcap=30090d<LRSWAP,CONNLIST,AMPOV,OUTAMP,STEREO>
        outamp: mute=1 size=5 steps=15 offset=0
        connections=0x1a,0x17,0x18,0x19; selected=0x1a
azalia0: sel1d wcap=30090d<LRSWAP,CONNLIST,AMPOV,OUTAMP,STEREO>
        outamp: mute=1 size=5 steps=15 offset=0
        connections=0x1b,0x17,0x18,0x19; selected=0x1b
azalia0: unknown1e wcap=400301<DIGITAL,CONNLIST,STEREO>
        cap=10<OUTPUT>
        [15/05] color=unknown device=other conn=none conntype=unknown
        location=n/a chassis=external special=none
        connections=0x24; selected=0x24
azalia0: unknown1f wcap=400701<POWER,DIGITAL,CONNLIST,STEREO>
        cap=10010<EAPD,OUTPUT>
        [15/06] color=unknown device=other conn=none conntype=unknown
        location=n/a chassis=external special=none
        connections=0x24,0x25; selected=0x24
azalia0: unknown20 wcap=400301<DIGITAL,CONNLIST,STEREO>
        cap=10<OUTPUT>
        [15/07] color=unknown device=other conn=none conntype=unknown
        location=n/a chassis=external special=none
        connections=0x25; selected=0x25
azalia0: dac21 wcap=40211<DIGITAL,FORMATOV,STEREO>
        encodings=5<AC3,PCM>
        PCM
formats=e07e0<24bit,20bit,16bit,192kHz,176.4kHz,96kHz,88.2kHz,48kHz,44.1kHz>
azalia0: dac22 wcap=40211<DIGITAL,FORMATOV,STEREO> encodings=5<AC3,PCM>
        PCM
formats=e07e0<24bit,20bit,16bit,192kHz,176.4kHz,96kHz,88.2kHz,48kHz,44.1kHz>
azalia0: vendor23 wcap=f00000 azalia0: sel24
wcap=300101<CONNLIST,STEREO> connections=0x21,0x1c,0x1d; selected=0x21
azalia0: sel25 wcap=300101<CONNLIST,STEREO>
        connections=0x22,0x1c,0x1d; selected=0x22
azalia0: beep26 wcap=70000c<AMPOV,OUTAMP>
        outamp: mute=1 size=23 steps=3 offset=3
azalia0: unknown27 wcap=400000
        cap=20<INPUT>
        [15/00] color=unknown device=other conn=none conntype=unknown
        location=n/a chassis=external special=none
azalia0: volume28 wcap=600000
        delta=1 steps=127
azalia_codec_init: dacgroup[0]: 10 11
azalia_codec_init: adcgroup[0]: 12 13
azalia0: codec[2] vid 0x80862802, subid 0x02331028, rev. 0.0, HDA
version 1.0 azalia_codec_init: nidstart=1 #functions=1
azalia_codec_init: FTYPE result = 0x00000001
azalia_codec_init: There are 2 widgets in the audio function.
        encodings=0
        PCM formats=0
        inamp: mute=0 size=0 steps=0 offset=0
        outamp: mute=0 size=0 steps=0 offset=0
        gpio: wake=0 unsol=0 gpis=0 gpos=0 gpios=0
azalia0: dac02 wcap=6211<DIGITAL,FORMATOV,STEREO>
        encodings=5<AC3,PCM>
        PCM
formats=1e07f0<32bit,24bit,20bit,16bit,192kHz,176.4kHz,96kHz,88.2kHz,48kHz,44.1kHz,32kHz>
azalia0: unknown03
wcap=40739d<DIGITAL,CONNLIST,UNSOL,FORMATOV,AMPOV,OUTAMP,STEREO>
encodings=94<AC3> PCM formats=18560010<32bit,20bit,16bit,32kHz>
cap=94<OUTPUT,PRESENCE> [01/00] color=unknown device=digital-out
conn=jack conntype=digital location=spec1 chassis=internal special=hdmi
        outamp: mute=1 size=0 steps=0 offset=0
        connections=0x2; selected=0x2
azalia_codec_init: dacgroup[0]: 02
azalia0: invalid ADC PCM format: 0x00000000
azalia0: codecs: IDT/0x76b2, Intel/0x2802, using IDT/0x76b2
audio0 at azalia0
azalia_round_blocksize: resultant block size = 9600
azalia_round_blocksize: resultant block size = 9600
ppb0 at pci0 dev 28 function 0 "Intel 82801I PCIE" rev 0x03: apic 2 int
16 (irq 0) pci1 at ppb0 bus 11
ppb1 at pci0 dev 28 function 1 "Intel 82801I PCIE" rev 0x03: apic 2 int
17 (irq 0) pci2 at ppb1 bus 12
iwn0 at pci2 dev 0 function 0 "Intel WiFi Link 5300AGN" rev 0x00: apic
2 int 17 (irq 3), MIMO 3T3R, MoW, address 00:16:ea:5e:dc:32 ppb2 at
pci0 dev 28 function 2 "Intel 82801I PCIE" rev 0x03: apic 2 int 18 (irq
0) pci3 at ppb2 bus 13 ppb3 at pci0 dev 28 function 3 "Intel 82801I
PCIE" rev 0x03: apic 2 int 19 (irq 0) pci4 at ppb3 bus 14
uhci3 at pci0 dev 29 function 0 "Intel 82801I USB" rev 0x03: apic 2 int
20 (irq 7) uhci4 at pci0 dev 29 function 1 "Intel 82801I USB" rev 0x03:
apic 2 int 21 (irq 4) uhci5 at pci0 dev 29 function 2 "Intel 82801I
USB" rev 0x03: apic 2 int 22 (irq 10) ehci1 at pci0 dev 29 function 7
"Intel 82801I USB" rev 0x03: apic 2 int 20 (irq 7) usb1 at ehci1: USB
revision 2.0 uhub1 at usb1 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb4 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0x93
pci5 at ppb4 bus 3
"Ricoh 5C832 Firewire" rev 0x04 at pci5 dev 1 function 0 not configured
sdhc0 at pci5 dev 1 function 1 "Ricoh 5C822 SD/MMC" rev 0x21: apic 2
int 18 (irq 11) sdmmc0 at sdhc0
sdhc1 at pci5 dev 1 function 2 "Ricoh 5C843 MMC" rev 0x11: apic 2 int
18 (irq 11) sdhc1: base clock frequency unknown
sdhc1 at 0x10: can't initialize host
pcib0 at pci0 dev 31 function 0 "Intel 82801IEM LPC" rev 0x03
ahci0 at pci0 dev 31 function 2 "Intel 82801I AHCI" rev 0x03: apic 2
int 19 (irq 10), AHCI 1.2 scsibus0 at ahci0: 32 targets, initiator 32
sd0 at scsibus0 targ 0 lun 0: <ATA, ST980813ASG, 3.AD> SCSI3 0/direct
fixed sd0: 76319MB, 512 bytes/sec, 156301488 sec total
cd0 at scsibus0 targ 1 lun 0: <PLDS, DVD+-RW DU-8A2S, 4D12> ATAPI
5/cdrom removable ichiic0 at pci0 dev 31 function 3 "Intel 82801I
SMBus" rev 0x03: apic 2 int 17 (irq 3) iic0 at ichiic0
spdmem0 at iic0 addr 0x50: 2GB DDR2 SDRAM non-parity PC2-6400CL5 SO-DIMM
spdmem1 at iic0 addr 0x52: 2GB DDR2 SDRAM non-parity PC2-6400CL5 SO-DIMM
usb2 at uhci0: USB revision 1.0
uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb3 at uhci1: USB revision 1.0
uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb4 at uhci2: USB revision 1.0
uhub4 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb5 at uhci3: USB revision 1.0
uhub5 at usb5 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb6 at uhci4: USB revision 1.0
uhub6 at usb6 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb7 at uhci5: USB revision 1.0
uhub7 at usb7 "Intel UHCI root hub" rev 1.00/1.00 addr 1
isa0 at pcib0
isadma0 at isa0
com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: <PC speaker>
spkr0 at pcppi0
mtrr: Pentium Pro MTRR support
umass0 at uhub1 port 3 configuration 1 interface 0 "Kingston
DataTraveler 2.0" rev 2.00/1.00 addr 2 umass0: using SCSI over Bulk-Only
scsibus1 at umass0: 2 targets, initiator 0
sd1 at scsibus1 targ 1 lun 0: <Kingston, DataTraveler 2.0, PMAP> SCSI0
0/direct removable sd1: 1968MB, 512 bytes/sec, 4030464 sec total
uhidev0 at uhub5 port 2 configuration 1 interface 0 "Microsoft Basic
Optical Mouse" rev 1.10/0.00 addr 2 uhidev0: iclass 3/1
ums0 at uhidev0: 3 buttons, Z dir
wsmouse1 at ums0 mux 0
ugen0 at uhub4 port 1 "Broadcom Corp 5880" rev 1.10/1.01 addr 2
softraid0 at root
root on sd0a swap on sd0b dump on sd0b

outputs.hp_source=dac  [ dac dac2 mix2 ]
outputs.hp_boost=off  [ off on ]
outputs.spkr_source=dac  [ dac dac2 mix2 ]
outputs.line_source=dac  [ dac dac2 mix2 ]
inputs.dac_mute=off  [ off on ]
inputs.dac=126,126
inputs.dac2_mute=off  [ off on ]
inputs.dac2=126,126
inputs.sel_source=dac  [ dac dac2 mix2 ]
inputs.mix2_dac_mute=off  [ off on ]
inputs.mix2_dac2_mute=off  [ off on ]
inputs.mix2_sel2_mute=off  [ off on ]
inputs.mix2_sel3_mute=off  [ off on ]
inputs.mix2_dac=120,120
inputs.mix2_dac2=120,120
inputs.mix2_sel2=120,120
inputs.mix2_sel3=120,120
outputs.mic3=85,85
inputs.sel2_source=mic  [ mic mic2 ]
outputs.sel2=85,85
inputs.sel3_source=mic  [ mic mic2 ]
outputs.sel3=85,85
inputs.sel4_source=sel2  [ sel2 mix2 mic3 ]
outputs.sel4_mute=off  [ off on ]
outputs.sel4=119,119
inputs.sel5_source=sel3  [ sel3 mix2 mic3 ]
outputs.sel5_mute=off  [ off on ]
outputs.sel5=119,119
inputs.sel6_source=dac3  [ dac3 sel4 sel5 ]
inputs.sel7_source=dac4  [ dac4 sel4 sel5 ]
inputs.beep_mute=off  [ off on ]
inputs.beep=85
outputs.volume=126
outputs.hp_sense=unplugged  [ unplugged plugged ]
outputs.mic_sense=unplugged  [ unplugged plugged ]
outputs.mic2_sense=unplugged  [ unplugged plugged ]
outputs.line_sense=unplugged  [ unplugged plugged ]
outputs.master=126,126

Thanks.

Reply | Threaded
Open this post in threaded view
|

Re: azalia: better conveter group configuration

j4nKy
On Mon, Nov 24, 2008 at 12:01:49AM -0200, guilherme m. schroeder wrote:
> Jacob,
>
> Here's my dmesg and mixerctl outputs with the patch.
> I still get no sound on speakers/headphone.
>
> Gonna reply the email you sent me some time ago shortly.

> azalia0: codec[0] vid 0x111d76b2, subid 0x02331028, rev. 3.2, HDA
> version 1.0

this is an IDT 92HD71B7.  this codec (and other IDT/Sigmatel) has an
"External Volume Control".  there are also GPIO controls for volume.

argh.  more widgets to manipulate.

> azalia0: volume28 wcap=600000
> delta=1 steps=127

this is the external volume control, it corresponds to this:

> outputs.volume=126

you should set that to max, 255.  this should probably be done with
most (all?) codecs that have an 'outputs.volume'.  these can act
as attenuators.  that is, anything but the max makes sound quieter.

> azalia0: codec[2] vid 0x80862802, subid 0x02331028, rev. 0.0, HDA
> version 1.0 azalia_codec_init: nidstart=1 #functions=1
> azalia_codec_init: FTYPE result = 0x00000001
> azalia_codec_init: There are 2 widgets in the audio function.
> encodings=0
> PCM formats=0
> inamp: mute=0 size=0 steps=0 offset=0
> outamp: mute=0 size=0 steps=0 offset=0
> gpio: wake=0 unsol=0 gpis=0 gpos=0 gpios=0
> azalia0: dac02 wcap=6211<DIGITAL,FORMATOV,STEREO>
> encodings=5<AC3,PCM>
> PCM
> formats=1e07f0<32bit,24bit,20bit,16bit,192kHz,176.4kHz,96kHz,88.2kHz,48kHz,44.1kHz,32kHz>
> azalia0: unknown03
> wcap=40739d<DIGITAL,CONNLIST,UNSOL,FORMATOV,AMPOV,OUTAMP,STEREO>
> encodings=94<AC3> PCM formats=18560010<32bit,20bit,16bit,32kHz>
> cap=94<OUTPUT,PRESENCE> [01/00] color=unknown device=digital-out
> conn=jack conntype=digital location=spec1 chassis=internal special=hdmi
> outamp: mute=1 size=0 steps=0 offset=0
> connections=0x2; selected=0x2
> azalia_codec_init: dacgroup[0]: 02
> azalia0: invalid ADC PCM format: 0x00000000

and this bit is because azalia expects all codecs to have both DACs
and ADCs.  that needs to be fixed too, but we don't yet support
multiple codecs on one controller anyway.

> outputs.master=126,126

and definitely crank that up.

we use low volumes by default to not blow out peoples' speakers.
I bet in a lot of cases that ends up with people saying things
don't work when they really do, because the output is just too
quiet to hear.

--
[hidden email]
SDF Public Access UNIX System - http://sdf.lonestar.org

Reply | Threaded
Open this post in threaded view
|

Re: azalia: better conveter group configuration

guilherme m. schroeder-2
Jacob,

Even increasing all possible values to 255 i still get no sound
(speakers/headphones). I talked some time ago with Alexey and he gives
me a patch that sets GPIO stuff for this card, but i got no sound too.
Looking at the ALSA codec information i saw that it sets GPIO on this
card. He'll send me the diff again (i lost the email with the diff) and
maybe with the latest changes made to azalia it'll work.

On Mon, 24 Nov 2008 02:51:28 +0000
Jacob Meuser <[hidden email]> wrote:

> On Mon, Nov 24, 2008 at 12:01:49AM -0200, guilherme m. schroeder
> wrote:
> > Jacob,
> >
> > Here's my dmesg and mixerctl outputs with the patch.
> > I still get no sound on speakers/headphone.
> >
> > Gonna reply the email you sent me some time ago shortly.
>
> > azalia0: codec[0] vid 0x111d76b2, subid 0x02331028, rev. 3.2, HDA
> > version 1.0
>
> this is an IDT 92HD71B7.  this codec (and other IDT/Sigmatel) has an
> "External Volume Control".  there are also GPIO controls for volume.
>
> argh.  more widgets to manipulate.
>
> > azalia0: volume28 wcap=600000
> > delta=1 steps=127
>
> this is the external volume control, it corresponds to this:
>
> > outputs.volume=126
>
> you should set that to max, 255.  this should probably be done with
> most (all?) codecs that have an 'outputs.volume'.  these can act
> as attenuators.  that is, anything but the max makes sound quieter.
>
> > azalia0: codec[2] vid 0x80862802, subid 0x02331028, rev. 0.0, HDA
> > version 1.0 azalia_codec_init: nidstart=1 #functions=1
> > azalia_codec_init: FTYPE result = 0x00000001
> > azalia_codec_init: There are 2 widgets in the audio function.
> > encodings=0
> > PCM formats=0
> > inamp: mute=0 size=0 steps=0 offset=0
> > outamp: mute=0 size=0 steps=0 offset=0
> > gpio: wake=0 unsol=0 gpis=0 gpos=0 gpios=0
> > azalia0: dac02 wcap=6211<DIGITAL,FORMATOV,STEREO>
> > encodings=5<AC3,PCM>
> > PCM
> > formats=1e07f0<32bit,24bit,20bit,16bit,192kHz,176.4kHz,96kHz,88.2kHz,48kHz,44.1kHz,32kHz>
> > azalia0: unknown03
> > wcap=40739d<DIGITAL,CONNLIST,UNSOL,FORMATOV,AMPOV,OUTAMP,STEREO>
> > encodings=94<AC3> PCM formats=18560010<32bit,20bit,16bit,32kHz>
> > cap=94<OUTPUT,PRESENCE> [01/00] color=unknown device=digital-out
> > conn=jack conntype=digital location=spec1 chassis=internal
> > special=hdmi outamp: mute=1 size=0 steps=0 offset=0
> > connections=0x2; selected=0x2
> > azalia_codec_init: dacgroup[0]: 02
> > azalia0: invalid ADC PCM format: 0x00000000
>
> and this bit is because azalia expects all codecs to have both DACs
> and ADCs.  that needs to be fixed too, but we don't yet support
> multiple codecs on one controller anyway.
>
> > outputs.master=126,126
>
> and definitely crank that up.
>
> we use low volumes by default to not blow out peoples' speakers.
> I bet in a lot of cases that ends up with people saying things
> don't work when they really do, because the output is just too
> quiet to hear.
>
> --
> [hidden email]
> SDF Public Access UNIX System - http://sdf.lonestar.org

Reply | Threaded
Open this post in threaded view
|

Re: azalia: better conveter group configuration

j4nKy
In reply to this post by j4nKy
On Sun, Nov 23, 2008 at 09:32:03PM +0000, Jacob Meuser wrote:

> this is an important patch to test on all azalia.
>
> this sets up converter (DACs and ADCs) groups in a generic way.
> we have to get this right before mixer item naming can be fixed
> in a meaningful way, as the converters are the most important
> part of the device as a whole.
>
> please test that you can still play and record as before.  if you
> have any regressions, please send along a complete dmesg.  if you
> were successfully playing multi-channel, or multi-streaming via
> aucat, test that too.
>
> please remove any azalia related patch(es) before applying this
> and test with only this diff.

here's a new version.  this one takes into account pin association/
sequence pairs.  pins with low association/sequence pairs are to be
considered higher priority for default output.  so, start finding
converters from pins with low association/sequence and work up the
associations, instead of ordering converters by their widget ID.

thanks to Thomas Pfaff for reporting that the previous diff killed
sound on what should be his default outputs.

--
[hidden email]
SDF Public Access UNIX System - http://sdf.lonestar.org

Index: azalia.c
===================================================================
RCS file: /home2/cvs/OpenBSD/src/sys/dev/pci/azalia.c,v
retrieving revision 1.73
diff -u -r1.73 azalia.c
--- azalia.c 19 Nov 2008 03:44:14 -0000 1.73
+++ azalia.c 24 Nov 2008 05:48:12 -0000
@@ -1289,6 +1289,13 @@
  }
  DPRINTF(("\n"));
  }
+ for (i = 0; i < this->adcs.ngroups; i++) {
+ DPRINTF(("%s: adcgroup[%d]:", __func__, i));
+ for (n = 0; n < this->adcs.groups[i].nconv; n++) {
+ DPRINTF((" %2.2x", this->adcs.groups[i].conv[n]));
+ }
+ DPRINTF(("\n"));
+ }
 #endif
 
  /* set invalid values for azalia_codec_construct_format() to work */
Index: azalia.h
===================================================================
RCS file: /home2/cvs/OpenBSD/src/sys/dev/pci/azalia.h,v
retrieving revision 1.21
diff -u -r1.21 azalia.h
--- azalia.h 19 Nov 2008 03:44:14 -0000 1.21
+++ azalia.h 24 Nov 2008 05:48:12 -0000
@@ -501,7 +501,7 @@
 } __packed rirb_entry_t;
 
 
-/* #define AZALIA_DEBUG */
+#define AZALIA_DEBUG 1
 #ifdef AZALIA_DEBUG
 # define DPRINTF(x) do { printf x; } while (0/*CONSTCOND*/)
 #else
Index: azalia_codec.c
===================================================================
RCS file: /home2/cvs/OpenBSD/src/sys/dev/pci/azalia_codec.c,v
retrieving revision 1.67
diff -u -r1.67 azalia_codec.c
--- azalia_codec.c 19 Nov 2008 21:49:44 -0000 1.67
+++ azalia_codec.c 24 Nov 2008 05:48:12 -0000
@@ -71,10 +71,10 @@
 #define STAC9205_DELL_V1500 0x02281028
 
 int azalia_generic_codec_init_dacgroup(codec_t *);
-int azalia_generic_codec_add_dacgroup(codec_t *, int, uint32_t);
-int azalia_generic_codec_find_pin(const codec_t *, int, int, uint32_t);
-int azalia_generic_codec_find_dac(const codec_t *, int, int);
-
+int azalia_generic_codec_is_live_pin(const widget_t *, uint32_t, uint32_t);
+int azalia_generic_codec_fnode(codec_t *, nid_t, int, int);
+int azalia_generic_codec_add_convgroup(codec_t *, convgroupset_t *,
+    uint32_t, uint32_t);
 int azalia_generic_mixer_init(codec_t *);
 int azalia_generic_mixer_autoinit(codec_t *);
 
@@ -94,31 +94,19 @@
 int azalia_generic_get_port(codec_t *, mixer_ctrl_t *);
 int azalia_gpio_unmute(codec_t *, int);
 
-int azalia_alc260_init_dacgroup(codec_t *);
 int azalia_alc260_mixer_init(codec_t *);
-int azalia_alc662_init_dacgroup(codec_t *);
-int azalia_alc861_init_dacgroup(codec_t *);
 int azalia_alc88x_mixer_init(codec_t *);
-int azalia_alc880_init_dacgroup(codec_t *);
-int azalia_alc882_init_dacgroup(codec_t *);
-int azalia_alc883_init_dacgroup(codec_t *);
-int azalia_alc885_init_dacgroup(codec_t *);
-int azalia_alc888_init_dacgroup(codec_t *);
 int azalia_ad1984_init_dacgroup(codec_t *);
 int azalia_ad1984_mixer_init(codec_t *);
 int azalia_ad1984_set_port(codec_t *, mixer_ctrl_t *);
 int azalia_ad1984_get_port(codec_t *, mixer_ctrl_t *);
-int azalia_ad1988_init_dacgroup(codec_t *);
 int azalia_cmi9880_init_dacgroup(codec_t *);
 int azalia_cmi9880_mixer_init(codec_t *);
 int azalia_stac9200_mixer_init(codec_t *);
-int azalia_stac9205_init_dacgroup(codec_t *);
-int azalia_stac9221_mixer_init(codec_t *);
 int azalia_stac9221_init_dacgroup(codec_t *);
+int azalia_stac9221_mixer_init(codec_t *);
 int azalia_stac9221_set_port(codec_t *, mixer_ctrl_t *);
 int azalia_stac9221_get_port(codec_t *, mixer_ctrl_t *);
-int azalia_stac9227_init_dacgroup(codec_t *);
-int azalia_stac9271_init_dacgroup(codec_t *);
 int azalia_stac7661_init_dacgroup(codec_t *);
 int azalia_stac7661_mixer_init(codec_t *);
 int azalia_stac7661_set_port(codec_t *, mixer_ctrl_t *);
@@ -141,7 +129,6 @@
  case 0x10ec0260:
  this->name = "Realtek ALC260";
  this->mixer_init = azalia_alc260_mixer_init;
- this->init_dacgroup = azalia_alc260_init_dacgroup;
  break;
  case 0x10ec0268:
  this->name = "Realtek ALC268";
@@ -151,36 +138,29 @@
  break;
  case 0x10ec0662:
  this->name = "Realtek ALC662-GR";
- this->init_dacgroup = azalia_alc662_init_dacgroup;
  break;
  case 0x10ec0861:
  this->name = "Realtek ALC861";
- this->init_dacgroup = azalia_alc861_init_dacgroup;
  break;
  case 0x10ec0880:
  this->name = "Realtek ALC880";
- this->init_dacgroup = azalia_alc880_init_dacgroup;
  this->mixer_init = azalia_alc88x_mixer_init;
  break;
  case 0x10ec0882:
  this->name = "Realtek ALC882";
- this->init_dacgroup = azalia_alc882_init_dacgroup;
  this->mixer_init = azalia_alc88x_mixer_init;
  break;
  case 0x10ec0883:
  /* ftp://209.216.61.149/pc/audio/ALC883_DataSheet_1.3.pdf */
  this->name = "Realtek ALC883";
- this->init_dacgroup = azalia_alc883_init_dacgroup;
  this->mixer_init = azalia_alc88x_mixer_init;
  break;
  case 0x10ec0885:
  this->name = "Realtek ALC885";
- this->init_dacgroup = azalia_alc885_init_dacgroup;
  this->mixer_init = azalia_alc88x_mixer_init;
  break;
  case 0x10ec0888:
  this->name = "Realtek ALC888";
- this->init_dacgroup = azalia_alc888_init_dacgroup;
  this->mixer_init = azalia_alc88x_mixer_init;
  break;
  case 0x11d41983:
@@ -198,12 +178,10 @@
  case 0x11d41988:
  /* http://www.analog.com/en/prod/0,2877,AD1988A,00.html */
  this->name = "Analog Devices AD1988A";
- this->init_dacgroup = azalia_ad1988_init_dacgroup;
  break;
  case 0x11d4198b:
  /* http://www.analog.com/en/prod/0,2877,AD1988B,00.html */
  this->name = "Analog Devices AD1988B";
- this->init_dacgroup = azalia_ad1988_init_dacgroup;
  break;
  case 0x14f15045:
  this->name = "Conexant CX20549";  /* Venice */
@@ -221,31 +199,24 @@
  break;
  case 0x83847616:
  this->name = "Sigmatel STAC9228X";
- this->init_dacgroup = azalia_stac9227_init_dacgroup;
  break;
  case 0x83847617:
  this->name = "Sigmatel STAC9228D";
- this->init_dacgroup = azalia_stac9227_init_dacgroup;
  break;
  case 0x83847618:
  this->name = "Sigmatel STAC9227X";
- this->init_dacgroup = azalia_stac9227_init_dacgroup;
  break;
  case 0x83847620:
  this->name = "Sigmatel STAC9274";
- this->init_dacgroup = azalia_stac9271_init_dacgroup;
  break;
  case 0x83847621:
  this->name = "Sigmatel STAC9274D";
- this->init_dacgroup = azalia_stac9271_init_dacgroup;
  break;
  case 0x83847626:
  this->name = "Sigmatel STAC9271X";
- this->init_dacgroup = azalia_stac9271_init_dacgroup;
  break;
  case 0x83847627:
  this->name = "Sigmatel STAC9271D";
- this->init_dacgroup = azalia_stac9271_init_dacgroup;
  break;
  case 0x83847632:
  this->name = "Sigmatel STAC9202";
@@ -280,7 +251,6 @@
  break;
  case 0x83847683:
  this->name = "Sigmatel STAC9221D";
- this->init_dacgroup = azalia_stac9221_init_dacgroup;
  break;
  case 0x83847690:
  /* http://www.idt.com/products/getDoc.cfm?docID=17812077 */
@@ -292,19 +262,15 @@
  break;
  case 0x838476a0:
  this->name = "Sigmatel STAC9205X";
- this->init_dacgroup = azalia_stac9205_init_dacgroup;
  break;
  case 0x838476a1:
  this->name = "Sigmatel STAC9205D";
- this->init_dacgroup = azalia_stac9205_init_dacgroup;
  break;
  case 0x838476a2:
  this->name = "Sigmatel STAC9204X";
- this->init_dacgroup = azalia_stac9205_init_dacgroup;
  break;
  case 0x838476a3:
  this->name = "Sigmatel STAC9204D";
- this->init_dacgroup = azalia_stac9205_init_dacgroup;
  break;
  }
  return 0;
@@ -317,153 +283,158 @@
 int
 azalia_generic_codec_init_dacgroup(codec_t *this)
 {
- int i, j, assoc, group;
-
- /*
- * grouping DACs
- *   [0] the lowest assoc DACs
- *   [1] the lowest assoc digital outputs
- *   [2] the 2nd assoc DACs
- *      :
- */
  this->dacs.ngroups = 0;
- for (assoc = 0; assoc < CORB_CD_ASSOCIATION_MAX; assoc++) {
- azalia_generic_codec_add_dacgroup(this, assoc, 0);
- azalia_generic_codec_add_dacgroup(this, assoc, COP_AWCAP_DIGITAL);
- }
-
- /* find DACs which do not connect with any pins by default */
- FOR_EACH_WIDGET(this, i) {
- boolean_t found;
-
- if (this->w[i].type != COP_AWTYPE_AUDIO_OUTPUT)
- continue;
- found = FALSE;
- for (group = 0; group < this->dacs.ngroups; group++) {
- for (j = 0; j < this->dacs.groups[group].nconv; j++) {
- if (i == this->dacs.groups[group].conv[j]) {
- found = TRUE;
- group = this->dacs.ngroups;
- break;
- }
- }
- }
- if (found)
- continue;
- if (this->dacs.ngroups >= 32)
- break;
- this->dacs.groups[this->dacs.ngroups].nconv = 1;
- this->dacs.groups[this->dacs.ngroups].conv[0] = i;
- this->dacs.ngroups++;
- }
+ azalia_generic_codec_add_convgroup(this, &this->dacs,
+    COP_AWTYPE_AUDIO_OUTPUT, 0);
+ azalia_generic_codec_add_convgroup(this, &this->dacs,
+    COP_AWTYPE_AUDIO_OUTPUT, COP_AWCAP_DIGITAL);
  this->dacs.cur = 0;
 
- /* enumerate ADCs */
  this->adcs.ngroups = 0;
- FOR_EACH_WIDGET(this, i) {
- if (this->w[i].type != COP_AWTYPE_AUDIO_INPUT)
- continue;
- this->adcs.groups[this->adcs.ngroups].nconv = 1;
- this->adcs.groups[this->adcs.ngroups].conv[0] = i;
- this->adcs.ngroups++;
- if (this->adcs.ngroups >= 32)
- break;
- }
+ azalia_generic_codec_add_convgroup(this, &this->adcs,
+    COP_AWTYPE_AUDIO_INPUT, 0);
+ azalia_generic_codec_add_convgroup(this, &this->adcs,
+    COP_AWTYPE_AUDIO_INPUT, COP_AWCAP_DIGITAL);
  this->adcs.cur = 0;
+
  return 0;
 }
 
 int
-azalia_generic_codec_add_dacgroup(codec_t *this, int assoc, uint32_t digital)
+azalia_generic_codec_add_convgroup(codec_t *this, convgroupset_t *group,
+    uint32_t type, uint32_t digital)
 {
- int i, j, n, dac, seq;
+ nid_t all_convs[HDA_MAX_CHANNELS];
+ int nall_convs;
+ nid_t convs[HDA_MAX_CHANNELS];
+ int nconvs;
+ int assoc, seq;
+ nid_t conv;
+ int i, j, k, l;
 
- n = 0;
- for (seq = 0 ; seq < CORB_CD_SEQUENCE_MAX; seq++) {
- i = azalia_generic_codec_find_pin(this, assoc, seq, digital);
- if (i < 0)
- continue;
- dac = azalia_generic_codec_find_dac(this, i, 0);
- if (dac < 0)
- continue;
- /* duplication check */
- for (j = 0; j < n; j++) {
- if (this->dacs.groups[this->dacs.ngroups].conv[j] == dac)
- break;
- }
- if (j < n) /* this group already has <dac> */
- continue;
- this->dacs.groups[this->dacs.ngroups].conv[n++] = dac;
+ nall_convs = 0;
+ FOR_EACH_WIDGET(this, i) {
+ if (this->w[i].type == type &&
+    (this->w[i].widgetcap & COP_AWCAP_DIGITAL) == digital &&
+    nall_convs < HDA_MAX_CHANNELS)
+ all_convs[nall_convs++] = this->w[i].nid;
  }
- if (n <= 0) /* no such DACs */
- return 0;
- this->dacs.groups[this->dacs.ngroups].nconv = n;
 
- /* check if the same combination is already registered */
- for (i = 0; i < this->dacs.ngroups; i++) {
- if (n != this->dacs.groups[i].nconv)
- continue;
- for (j = 0; j < n; j++) {
- if (this->dacs.groups[this->dacs.ngroups].conv[j] !=
-    this->dacs.groups[i].conv[j])
- break;
+ nconvs = 0;
+ for (assoc = 0; assoc < CORB_CD_ASSOCIATION_MAX; assoc++) {
+ for (seq = 0; seq < CORB_CD_SEQUENCE_MAX; seq++) {
+ FOR_EACH_WIDGET(this, i) {
+ const widget_t *w = &this->w[i];
+ if (w->d.pin.sequence != seq ||
+    w->d.pin.association != assoc)
+ continue;
+ if (type == COP_AWTYPE_AUDIO_OUTPUT) {
+ if (azalia_generic_codec_is_live_pin(w,
+    COP_PINCAP_OUTPUT, digital) == 0)
+ continue;
+ } else {
+ if (azalia_generic_codec_is_live_pin(w,
+    COP_PINCAP_INPUT, digital) == 0)
+ continue;
+ }
+ for (j = 0; j < nall_convs; j++) {
+ conv = all_convs[j];
+ for (k = 0; k < nconvs; k++) {
+ if (convs[k] == conv)
+ break;
+ }
+ if (k < nconvs)
+ continue;
+ if (type == COP_AWTYPE_AUDIO_OUTPUT) {
+ k = azalia_generic_codec_fnode
+    (this, conv, i, 0);
+ if (k < 0 ||
+    this->w[k].nid != conv)
+ continue;
+ } else {
+ for (l = 0; l < this->wend; l++)
+ if (this->w[l].nid ==
+    conv)
+ break;
+ k = azalia_generic_codec_fnode
+    (this, w->nid, l, 0);
+ if (k < 0 || this->w[k].nid !=
+    w->nid)
+ continue;
+ }
+ convs[nconvs++] = conv;
+ if (nconvs >= nall_convs ||
+    nconvs >= HDA_MAX_CHANNELS)
+ goto done;
+ }
+ }
  }
- if (j >= n) /* matched */
- return 0;
  }
- /* found no equivalent group */
- this->dacs.ngroups++;
+done:
+ for (i = 0; i < nconvs; i++)
+ group->groups[group->ngroups].conv[i] = convs[i];
+ if (nconvs > 0) {
+ group->groups[group->ngroups].nconv = i;
+ group->ngroups++;
+ }
+
  return 0;
 }
 
 int
-azalia_generic_codec_find_pin(const codec_t *this, int assoc, int seq, uint32_t digital)
+azalia_generic_codec_is_live_pin(const widget_t *w, uint32_t iocap, uint32_t digital)
 {
- int i;
+ uint8_t conn, dev;
 
- FOR_EACH_WIDGET(this, i) {
- if (this->w[i].type != COP_AWTYPE_PIN_COMPLEX)
- continue;
- if ((this->w[i].d.pin.cap & COP_PINCAP_OUTPUT) == 0)
- continue;
- if ((this->w[i].widgetcap & COP_AWCAP_DIGITAL) != digital)
- continue;
- if (this->w[i].d.pin.association != assoc)
- continue;
- if (this->w[i].d.pin.sequence == seq) {
- return i;
- }
+ if (w->type != COP_AWTYPE_PIN_COMPLEX)
+ return 0;
+ if ((w->d.pin.cap & iocap) == 0)
+ return 0;
+ if ((w->widgetcap & COP_AWCAP_DIGITAL) != digital)
+ return 0;
+ PIN_STATUS(w, conn);
+ if (conn == CORB_CD_NONE)
+ return 0;
+ dev = CORB_CD_DEVICE(w->d.pin.config);
+ if (iocap == COP_PINCAP_OUTPUT) {
+ if (dev == CORB_CD_LINEOUT || dev == CORB_CD_SPEAKER ||
+    dev == CORB_CD_HEADPHONE ||
+    (digital == COP_AWCAP_DIGITAL &&
+    (dev == CORB_CD_SPDIFOUT || dev == CORB_CD_DIGITALOUT)))
+ return 1;
+ } else {
+ if (dev == CORB_CD_MICIN || dev == CORB_CD_LINEIN ||
+    (digital == COP_AWCAP_DIGITAL &&
+    (dev == CORB_CD_SPDIFIN || dev == CORB_CD_DIGITALIN)))
+ return 1;
  }
- return -1;
+
+ return 0;
 }
 
 int
-azalia_generic_codec_find_dac(const codec_t *this, int index, int depth)
+azalia_generic_codec_fnode(codec_t *this, nid_t node, int index, int depth)
 {
  const widget_t *w;
- int i, j, ret;
+ int i, j, k, ret;
 
  w = &this->w[index];
- if (w->type == COP_AWTYPE_AUDIO_OUTPUT)
+ if (w->nid == node)
  return index;
- if (++depth > 50) {
+ if (++depth > 50)
  return -1;
- }
- if (w->selected >= 0) {
- j = w->connections[w->selected];
- if (VALID_WIDGET_NID(j, this)) {
- ret = azalia_generic_codec_find_dac(this, j, depth);
- if (ret >= 0)
- return ret;
- }
- }
  for (i = 0; i < w->nconnections; i++) {
  j = w->connections[i];
  if (!VALID_WIDGET_NID(j, this))
  continue;
- ret = azalia_generic_codec_find_dac(this, j, depth);
- if (ret >= 0)
- return ret;
+ FOR_EACH_WIDGET(this, k)
+ if (this->w[k].nid == j)
+ break;
+ if (k < this->wend) {
+ ret = azalia_generic_codec_fnode(this, node, k, depth);
+ if (ret >= 0)
+ return ret;
+ }
  }
  return -1;
 }
@@ -1813,63 +1784,6 @@
  return 0;
 }
 
-int
-azalia_alc260_init_dacgroup(codec_t *this)
-{
- static const convgroupset_t dacs = {
- -1, 2,
- {{1, {0x02}}, /* analog 2ch */
- {1, {0x03}}}}; /* digital */
- static const convgroupset_t adcs = {
- -1, 3,
- {{1, {0x04}}, /* analog 2ch */
- {1, {0x05}}, /* analog 2ch */
- {1, {0x06}}}}; /* digital */
-
- this->dacs = dacs;
- this->adcs = adcs;
- return 0;
-}
-
-/* ----------------------------------------------------------------
- * Realtek ALC662-GR
- * ---------------------------------------------------------------- */
-
-int
-azalia_alc662_init_dacgroup(codec_t *this)
-{
- static const convgroupset_t dacs = {
- -1, 1,
- {{3, {0x02, 0x03, 0x04}}}}; /* analog 6ch */
- static const convgroupset_t adcs = {
- -1, 1,
- {{2, {0x09, 0x08}}}}; /* analog 4ch */
-
- this->dacs = dacs;
- this->adcs = adcs;
- return 0;
-}
-
-/* ----------------------------------------------------------------
- * Realtek ALC861
- * ---------------------------------------------------------------- */
-
-int
-azalia_alc861_init_dacgroup(codec_t *this)
-{
- static const convgroupset_t dacs = {
- -1, 2,
- {{4, {0x03, 0x04, 0x05, 0x06}}, /* analog 8ch */
- {1, {0x07}}}}; /* digital */
- static const convgroupset_t adcs = {
- -1, 1,
- {{1, {0x08}}}}; /* analog 2ch */
-
- this->dacs = dacs;
- this->adcs = adcs;
- return 0;
-}
-
 /* ----------------------------------------------------------------
  * Realtek ALC88x mixer init - volume control is on the mixer
  * instead of the DAC.
@@ -1886,113 +1800,6 @@
 }
 
 /* ----------------------------------------------------------------
- * Realtek ALC880
- * ---------------------------------------------------------------- */
-
-int
-azalia_alc880_init_dacgroup(codec_t *this)
-{
- static const convgroupset_t dacs = {
- -1, 2,
- {{4, {0x02, 0x03, 0x04, 0x05}}, /* analog 8ch */
- {1, {0x06}}}}; /* digital */
- static const convgroupset_t adcs = {
- -1, 2,
- {{3, {0x07, 0x08, 0x09}}, /* analog 6ch */
- {1, {0x0a}}}}; /* digital */
-
- this->dacs = dacs;
- this->adcs = adcs;
- return 0;
-}
-
-/* ----------------------------------------------------------------
- * Realtek ALC882
- * ---------------------------------------------------------------- */
-
-int
-azalia_alc882_init_dacgroup(codec_t *this)
-{
- static const convgroupset_t dacs = {
- -1, 2,
- {{5, {0x02, 0x03, 0x04, 0x05, 0x25}}, /* analog 10ch */
- {1, {0x06}}}}; /* digital */
- static const convgroupset_t adcs = {
- -1, 2,
- {{3, {0x07, 0x08, 0x09}}, /* analog 6ch */
- {1, {0x0a}}}}; /* digital */
-
- this->dacs = dacs;
- this->adcs = adcs;
- return 0;
-}
-
-/* ----------------------------------------------------------------
- * Realtek ALC883
- * ALC882 without adc07 and mix24.
- * ---------------------------------------------------------------- */
-
-int
-azalia_alc883_init_dacgroup(codec_t *this)
-{
- static const convgroupset_t dacs = {
- -1, 2,
- {{5, {0x02, 0x03, 0x04, 0x05, 0x25}}, /* analog 10ch */
- {1, {0x06}}}}; /* digital */
- static const convgroupset_t adcs = {
- -1, 2,
- {{2, {0x08, 0x09}}, /* analog 4ch */
- {1, {0x0a}}}}; /* digital */
-
- this->dacs = dacs;
- this->adcs = adcs;
- return 0;
-}
-
-/* ----------------------------------------------------------------
- * Realtek ALC885
- * ---------------------------------------------------------------- */
-
-int
-azalia_alc885_init_dacgroup(codec_t *this)
-{
- static const convgroupset_t dacs = {
- -1, 2,
- {{5, {0x02, 0x03, 0x04, 0x05, 0x25}}, /* analog 10ch */
- {1, {0x06}}}}; /* digital */
- static const convgroupset_t adcs = {
- -1, 2,
- {{3, {0x07, 0x08, 0x09}}, /* analog 6ch */
- {1, {0x0a}}}}; /* digital */
-
- this->dacs = dacs;
- this->adcs = adcs;
- return 0;
-}
-
-/* ----------------------------------------------------------------
- * Realtek ALC888
- * ---------------------------------------------------------------- */
-
-int
-azalia_alc888_init_dacgroup(codec_t *this)
-{
- static const convgroupset_t dacs = {
- -1, 2,
- {{5, {0x02, 0x03, 0x04, 0x05, 0x25}}, /* analog 10ch */
- {1, {0x06}}}}; /* digital */
- /* ALC888S has another SPDIF-out 0x10 */
- static const convgroupset_t adcs = {
- -1, 2,
- {{2, {0x08, 0x09}}, /* analog 4ch */
- {1, {0x0a}}}}; /* digital */
-
- this->dacs = dacs;
- this->adcs = adcs;
- return 0;
-}
-
-/* ----------------------------------------------------------------
  * Analog Devices AD1984
  * ---------------------------------------------------------------- */
 
@@ -2141,28 +1948,6 @@
 }
 
 /* ----------------------------------------------------------------
- * Analog Devices AD1988A/AD1988B
- * ---------------------------------------------------------------- */
-
-int
-azalia_ad1988_init_dacgroup(codec_t *this)
-{
- static const convgroupset_t dacs = {
- -1, 3,
- {{4, {0x04, 0x05, 0x06, 0x0a}}, /* analog 8ch */
- {1, {0x02}}, /* digital */
- {1, {0x03}}}}; /* another analog */
- static const convgroupset_t adcs = {
- -1, 2,
- {{2, {0x08, 0x09, 0x0f}}, /* analog 6ch */
- {1, {0x07}}}}; /* digital */
-
- this->dacs = dacs;
- this->adcs = adcs;
- return 0;
-}
-
-/* ----------------------------------------------------------------
  * CMedia CMI9880
  * ---------------------------------------------------------------- */
 
@@ -2445,62 +2230,6 @@
     MI_TARGET_OUTAMP, mc);
  return azalia_generic_mixer_get(this, m->nid, m->target, mc);
 }
-
-
-int
-azalia_stac9205_init_dacgroup(codec_t *this)
-{
- /* volume knob at nid 24 */
- static const convgroupset_t dacs = {
- -1, 1,
- {{2, {0x10, 0x11}}}};
-
- /* vols: 1d:1b, 1e:1a */
- static const convgroupset_t adcs = {
- -1, 1,
- {{2, {0x1d, 0x1e}}}};
-
- this->dacs = dacs;
- this->adcs = adcs;
- return 0;
-}
-
-int
-azalia_stac9227_init_dacgroup(codec_t *this)
-{
- /* volume knob at nid 24 */
- static const convgroupset_t dacs = {
- -1, 1,
- {{4, {0x02, 0x03, 0x04, 0x05}}}};
-
- /* vols: 07:18, 08:19, 09:1a */
- static const convgroupset_t adcs = {
- -1, 1,
- {{3, {0x07, 0x08, 0x09}}}};
-
- this->dacs = dacs;
- this->adcs = adcs;
- return 0;
-}
-
-int
-azalia_stac9271_init_dacgroup(codec_t *this)
-{
- /* volume knob at nid 24 */
- static const convgroupset_t dacs = {
- -1, 1,
- {{5, {0x02, 0x03, 0x04, 0x05, 0x06}}}};
-
- /* vols: 07:18, 08:19, 09:1a */
- static const convgroupset_t adcs = {
- -1, 1,
- {{3, {0x07, 0x08, 0x09}}}};
-
- this->dacs = dacs;
- this->adcs = adcs;
- return 0;
-}
-
 
 /* ----------------------------------------------------------------
  * Sony VAIO FE and SZ

Reply | Threaded
Open this post in threaded view
|

Re: azalia: better conveter group configuration

guilherme m. schroeder-2
Jacob,

My notebook have the external volume control button you said and they are working.
If i hit the volume button (+/-) i see that outputs.master and inputs.dac changes, nice =].

Other things i noticed:
- putting the headphone on headphone input, outputs.hp_sense changes to plugged.
- putting the headphone on mic input, outputs.mic_sense changes to plugged.
- i don't have another mic input neither line.

Here is dmesg, some output with AZALIA_DEBUG when i play and mixerctl with
your new patch:

OpenBSD 4.4-current (GENERIC.MP) #0: Mon Nov 24 23:16:37 BRST 2008
    root@dub:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 3694907392 (3523MB)
avail mem = 3585912832 (3419MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xf6590 (57 entries)
bios0: vendor Dell Inc. version "A06" date 10/10/2008
bios0: Dell Inc. Latitude E6400
acpi0 at bios0: rev 2
acpi0: tables DSDT FACP HPET DMAR APIC ASF! MCFG SLIC TCPA SSDT
acpi0: wakeup devices PCI0(S4) PCIE(S4) USB1(S0) USB2(S0) USB3(S0) USB4(S0) USB5(S0) USB6(S0) EHC2(S0) EHCI(S0) AZAL(S3) RP01(S4) RP02(S4) RP03(S4) RP04(S3) RP05(S3) RP06(S5) LID_(S3) PBTN(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM)2 Duo CPU P8400 @ 2.26GHz, 2261.38 MHz
cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,SMX,EST,TM2,CX16,xTPR,NXE,LONG
cpu0: 3MB 64b/line 8-way L2 cache
cpu0: apic clock running at 265MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM)2 Duo CPU P8400 @ 2.26GHz, 2261.00 MHz
cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,SMX,EST,TM2,CX16,xTPR,NXE,LONG
cpu1: 3MB 64b/line 8-way L2 cache
ioapic0 at mainbus0 apid 2 pa 0xfec00000, version 20, 24 pins
ioapic0: misconfigured as apic 0, remapped to apid 2
acpiprt0 at acpi0: bus 3 (PCIE)
acpiprt1 at acpi0: bus -1 (AGP_)
acpiprt2 at acpi0: bus 11 (RP01)
acpiprt3 at acpi0: bus 12 (RP02)
acpiprt4 at acpi0: bus 13 (RP03)
acpiprt5 at acpi0: bus 14 (RP04)
acpiprt6 at acpi0: bus -1 (RP05)
acpiprt7 at acpi0: bus -1 (RP06)
acpiprt8 at acpi0: bus 0 (PCI0)
acpiec0 at acpi0
acpicpu0 at acpi0: C3, C2, C1, PSS
acpicpu1 at acpi0: C3, C2, C1, PSS
acpitz0 at acpi0: critical temperature 107 degC
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: PBTN
acpibtn2 at acpi0: SBTN
acpiac0 at acpi0: AC unit online
acpibat0 at acpi0: BAT0 model "DELL FU27488" serial 30161 type LION oem "Sony"
acpibat1 at acpi0: BAT1 not present
acpivideo at acpi0 not configured
acpivideo at acpi0 not configured
acpivideo at acpi0 not configured
cpu0: Enhanced SpeedStep 2261 MHz: speeds: 2268, 2267, 1600, 800 MHz
pci0 at mainbus0 bus 0: configuration mode 1
pchb0 at pci0 dev 0 function 0 "Intel GM45 Host" rev 0x07
vga1 at pci0 dev 2 function 0 "Intel GM45 Video" rev 0x07
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
intagp at vga1 not configured
inteldrm0 at vga1
drm0 at inteldrm0: couldn't find agp
"Intel GM45 Video" rev 0x07 at pci0 dev 2 function 1 not configured
em0 at pci0 dev 25 function 0 "Intel ICH9 IGP M AMT" rev 0x03: apic 2 int 22 (irq 10), address 00:21:70:a5:77:b8
uhci0 at pci0 dev 26 function 0 "Intel 82801I USB" rev 0x03: apic 2 int 20 (irq 7)
uhci1 at pci0 dev 26 function 1 "Intel 82801I USB" rev 0x03: apic 2 int 21 (irq 4)
uhci2 at pci0 dev 26 function 2 "Intel 82801I USB" rev 0x03: apic 2 int 22 (irq 10)
ehci0 at pci0 dev 26 function 7 "Intel 82801I USB" rev 0x03: apic 2 int 22 (irq 10)
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
azalia0 at pci0 dev 27 function 0 "Intel 82801I HD Audio" rev 0x03: apic 2 int 21 (irq 4)
azalia0: host: High Definition Audio rev. 1.0
azalia0: host: 4 output, 4 input, and 0 bidi streams
azalia_attach: resetting
azalia_attach: reset counter = 4999
azalia_attach: reset counter = 4985
azalia0: found a codec at #0
azalia0: found a codec at #2
azalia_init_corb: CORB allocation succeeded.
azalia_init_corb: CORBWP=0; size=256
azalia_init_rirb: RIRB allocation succeeded.
azalia_init_rirb: RIRBRP=0, size=256
azalia0: codec[0] vid 0x111d76b2, subid 0x02331028, rev. 3.2, HDA version 1.0
azalia_codec_init: nidstart=1 #functions=1
azalia_codec_init: FTYPE result = 0x00000101
azalia_codec_init: There are 31 widgets in the audio function.
        encodings=1<PCM>
        PCM formats=e07e0<24bit,20bit,16bit,192kHz,176.4kHz,96kHz,88.2kHz,48kHz,44.1kHz>
        inamp: mute=1 size=0 steps=0 offset=0
        outamp: mute=1 size=2 steps=127 offset=127
        gpio: wake=1 unsol=1 gpis=0 gpos=0 gpios=8
azalia0: black0a wcap=400181<CONNLIST,UNSOL,STEREO>
        cap=1c<OUTPUT,HEADPHONE,PRESENCE>
        [01/15] color=black device=hp conn=jack conntype=1/8
        location=right chassis=external special=none
        connections=0x10,0x11,0x17; selected=0x10
azalia0: black0b wcap=400081<UNSOL,STEREO>
        cap=1724<VREF80,VREFGND,VREF50,VREFHIZ,INPUT,PRESENCE>
        [02/01] color=black device=mic conn=jack conntype=1/8
        location=right chassis=external special=none
azalia0: unknown0c wcap=400081<UNSOL,STEREO>
        cap=1724<VREF80,VREFGND,VREF50,VREFHIZ,INPUT,PRESENCE>
        [15/00] color=unknown device=other conn=none conntype=unknown
        location=n/a chassis=external special=none
azalia0: unknown0d wcap=400181<CONNLIST,UNSOL,STEREO>
        cap=14<OUTPUT,PRESENCE>
        [01/00] color=unknown device=spkr conn=fixed conntype=analog
        location=n/a chassis=internal special=none
        connections=0x10,0x11,0x17; selected=0x10
azalia0: black0e wcap=400081<UNSOL,STEREO>
        cap=1724<VREF80,VREFGND,VREF50,VREFHIZ,INPUT,PRESENCE>
        [02/14] color=black device=mic conn=jack conntype=1/8
        location=left chassis=separate special=none
azalia0: black0f wcap=400181<CONNLIST,UNSOL,STEREO>
        cap=14<OUTPUT,PRESENCE>
        [05/00] color=black device=line conn=jack conntype=1/8
        location=left chassis=separate special=none
        connections=0x10,0x11,0x17; selected=0x10
azalia0: dac10 wcap=d0c05<LRSWAP,POWER,OUTAMP,STEREO>
azalia0: dac11 wcap=d0c05<LRSWAP,POWER,OUTAMP,STEREO>
azalia0: adc12 wcap=1d0541<POWER,CONNLIST,PROC,STEREO>
        connections=0x1c; selected=0x1c
azalia0: adc13 wcap=1d0541<POWER,CONNLIST,PROC,STEREO>
        connections=0x1d; selected=0x1d
azalia0: unknown14 wcap=400100<CONNLIST>
        cap=10<OUTPUT>
        [15/02] color=unknown device=other conn=none conntype=unknown
        location=n/a chassis=external special=none
        connections=0x16; selected=0x16
azalia0: sel15 wcap=300101<CONNLIST,STEREO>
        connections=0x10,0x11,0x17; selected=0x10
azalia0: mix16 wcap=200100<CONNLIST>
        connections=0x15; selected=0x15
azalia0: mix17 wcap=20010b<CONNLIST,AMPOV,INAMP,STEREO>
        inamp: mute=1 size=5 steps=31 offset=23
        connections=0x10,0x11,0x27,0x1a,0x1b; selected=0x10
azalia0: unknown18 wcap=40000d<AMPOV,OUTAMP,STEREO>
        cap=20<INPUT>
        [10/00] color=unknown device=mic conn=fixed conntype=digital
        location=n/a chassis=internal special=none
        outamp: mute=0 size=39 steps=3 offset=0
azalia0: unknown19 wcap=40000d<AMPOV,OUTAMP,STEREO>
        cap=20<INPUT>
        [15/04] color=unknown device=other conn=none conntype=unknown
        location=n/a chassis=external special=none
        outamp: mute=0 size=39 steps=3 offset=0
azalia0: sel1a wcap=30010d<CONNLIST,AMPOV,OUTAMP,STEREO>
        outamp: mute=0 size=39 steps=3 offset=0
        connections=0xb,0xc,0xe; selected=0xb
azalia0: sel1b wcap=30010d<CONNLIST,AMPOV,OUTAMP,STEREO>
        outamp: mute=0 size=39 steps=3 offset=0
        connections=0xb,0xc,0xe; selected=0xb
azalia0: sel1c wcap=30090d<LRSWAP,CONNLIST,AMPOV,OUTAMP,STEREO>
        outamp: mute=1 size=5 steps=15 offset=0
        connections=0x1a,0x17,0x18,0x19; selected=0x1a
azalia0: sel1d wcap=30090d<LRSWAP,CONNLIST,AMPOV,OUTAMP,STEREO>
        outamp: mute=1 size=5 steps=15 offset=0
        connections=0x1b,0x17,0x18,0x19; selected=0x1b
azalia0: unknown1e wcap=400301<DIGITAL,CONNLIST,STEREO>
        cap=10<OUTPUT>
        [15/05] color=unknown device=other conn=none conntype=unknown
        location=n/a chassis=external special=none
        connections=0x24; selected=0x24
azalia0: unknown1f wcap=400701<POWER,DIGITAL,CONNLIST,STEREO>
        cap=10010<EAPD,OUTPUT>
        [15/06] color=unknown device=other conn=none conntype=unknown
        location=n/a chassis=external special=none
        connections=0x24,0x25; selected=0x24
azalia0: unknown20 wcap=400301<DIGITAL,CONNLIST,STEREO>
        cap=10<OUTPUT>
        [15/07] color=unknown device=other conn=none conntype=unknown
        location=n/a chassis=external special=none
        connections=0x25; selected=0x25
azalia0: dac21 wcap=40211<DIGITAL,FORMATOV,STEREO>
        encodings=5<AC3,PCM>
        PCM formats=e07e0<24bit,20bit,16bit,192kHz,176.4kHz,96kHz,88.2kHz,48kHz,44.1kHz>
azalia0: dac22 wcap=40211<DIGITAL,FORMATOV,STEREO>
        encodings=5<AC3,PCM>
        PCM formats=e07e0<24bit,20bit,16bit,192kHz,176.4kHz,96kHz,88.2kHz,48kHz,44.1kHz>
azalia0: vendor23 wcap=f00000
azalia0: sel24 wcap=300101<CONNLIST,STEREO>
        connections=0x21,0x1c,0x1d; selected=0x21
azalia0: sel25 wcap=300101<CONNLIST,STEREO>
        connections=0x22,0x1c,0x1d; selected=0x22
azalia0: beep26 wcap=70000c<AMPOV,OUTAMP>
        outamp: mute=1 size=23 steps=3 offset=3
azalia0: unknown27 wcap=400000
        cap=20<INPUT>
        [15/00] color=unknown device=other conn=none conntype=unknown
        location=n/a chassis=external special=none
azalia0: volume28 wcap=600000
        delta=1 steps=127
azalia_codec_init: dacgroup[0]: 10 11
azalia_codec_init: adcgroup[0]: 12 13
azalia0: codec[2] vid 0x80862802, subid 0x02331028, rev. 0.0, HDA version 1.0
azalia_codec_init: nidstart=1 #functions=1
azalia_codec_init: FTYPE result = 0x00000001
azalia_codec_init: There are 2 widgets in the audio function.
        encodings=0
        PCM formats=0
        inamp: mute=0 size=0 steps=0 offset=0
        outamp: mute=0 size=0 steps=0 offset=0
        gpio: wake=0 unsol=0 gpis=0 gpos=0 gpios=0
azalia0: dac02 wcap=6211<DIGITAL,FORMATOV,STEREO>
        encodings=5<AC3,PCM>
        PCM formats=1e07f0<32bit,24bit,20bit,16bit,192kHz,176.4kHz,96kHz,88.2kHz,48kHz,44.1kHz,32kHz>
azalia0: unknown03 wcap=40739d<DIGITAL,CONNLIST,UNSOL,FORMATOV,AMPOV,OUTAMP,STEREO>
        encodings=94<AC3>
        PCM formats=18560010<32bit,20bit,16bit,32kHz>
        cap=94<OUTPUT,PRESENCE>
        [01/00] color=unknown device=digital-out conn=jack conntype=digital
        location=spec1 chassis=internal special=hdmi
        outamp: mute=1 size=0 steps=0 offset=0
        connections=0x2; selected=0x2
azalia_codec_init: dacgroup[0]: 02
azalia0: invalid ADC PCM format: 0x00000000
azalia0: codecs: IDT/0x76b2, Intel/0x2802, using IDT/0x76b2
audio0 at azalia0
azalia_round_blocksize: resultant block size = 9600
azalia_round_blocksize: resultant block size = 9600
ppb0 at pci0 dev 28 function 0 "Intel 82801I PCIE" rev 0x03: apic 2 int 16 (irq 0)
pci1 at ppb0 bus 11
ppb1 at pci0 dev 28 function 1 "Intel 82801I PCIE" rev 0x03: apic 2 int 17 (irq 0)
pci2 at ppb1 bus 12
iwn0 at pci2 dev 0 function 0 "Intel WiFi Link 5300AGN" rev 0x00: apic 2 int 17 (irq 3), MIMO 3T3R, MoW, address 00:16:ea:5e:dc:32
ppb2 at pci0 dev 28 function 2 "Intel 82801I PCIE" rev 0x03: apic 2 int 18 (irq 0)
pci3 at ppb2 bus 13
ppb3 at pci0 dev 28 function 3 "Intel 82801I PCIE" rev 0x03: apic 2 int 19 (irq 0)
pci4 at ppb3 bus 14
uhci3 at pci0 dev 29 function 0 "Intel 82801I USB" rev 0x03: apic 2 int 20 (irq 7)
uhci4 at pci0 dev 29 function 1 "Intel 82801I USB" rev 0x03: apic 2 int 21 (irq 4)
uhci5 at pci0 dev 29 function 2 "Intel 82801I USB" rev 0x03: apic 2 int 22 (irq 10)
ehci1 at pci0 dev 29 function 7 "Intel 82801I USB" rev 0x03: apic 2 int 20 (irq 7)
usb1 at ehci1: USB revision 2.0
uhub1 at usb1 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb4 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0x93
pci5 at ppb4 bus 3
"Ricoh 5C832 Firewire" rev 0x04 at pci5 dev 1 function 0 not configured
sdhc0 at pci5 dev 1 function 1 "Ricoh 5C822 SD/MMC" rev 0x21: apic 2 int 18 (irq 11)
sdmmc0 at sdhc0
sdhc1 at pci5 dev 1 function 2 "Ricoh 5C843 MMC" rev 0x11: apic 2 int 18 (irq 11)
sdhc1: base clock frequency unknown
sdhc1 at 0x10: can't initialize host
pcib0 at pci0 dev 31 function 0 "Intel 82801IEM LPC" rev 0x03
ahci0 at pci0 dev 31 function 2 "Intel 82801I AHCI" rev 0x03: apic 2 int 19 (irq 10), AHCI 1.2
scsibus0 at ahci0: 32 targets, initiator 32
sd0 at scsibus0 targ 0 lun 0: <ATA, ST980813ASG, 3.AD> SCSI3 0/direct fixed
sd0: 76319MB, 512 bytes/sec, 156301488 sec total
cd0 at scsibus0 targ 1 lun 0: <PLDS, DVD+-RW DU-8A2S, 4D12> ATAPI 5/cdrom removable
ichiic0 at pci0 dev 31 function 3 "Intel 82801I SMBus" rev 0x03: apic 2 int 17 (irq 3)
iic0 at ichiic0
spdmem0 at iic0 addr 0x50: 2GB DDR2 SDRAM non-parity PC2-6400CL5 SO-DIMM
spdmem1 at iic0 addr 0x52: 2GB DDR2 SDRAM non-parity PC2-6400CL5 SO-DIMM
usb2 at uhci0: USB revision 1.0
uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb3 at uhci1: USB revision 1.0
uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb4 at uhci2: USB revision 1.0
uhub4 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb5 at uhci3: USB revision 1.0
uhub5 at usb5 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb6 at uhci4: USB revision 1.0
uhub6 at usb6 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb7 at uhci5: USB revision 1.0
uhub7 at usb7 "Intel UHCI root hub" rev 1.00/1.00 addr 1
isa0 at pcib0
isadma0 at isa0
com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: <PC speaker>
spkr0 at pcppi0
mtrr: Pentium Pro MTRR support
ugen0 at uhub4 port 1 "Broadcom Corp 5880" rev 1.10/1.01 addr 2
uhidev0 at uhub5 port 2 configuration 1 interface 0 "Microsoft Basic Optical Mouse" rev 1.10/0.00 addr 2
uhidev0: iclass 3/1
ums0 at uhidev0: 3 buttons, Z dir
wsmouse1 at ums0 mux 0
softraid0 at root
root on sd0a swap on sd0b dump on sd0b

outputs.hp_source=dac  [ dac dac2 mix2 ]
outputs.hp_boost=off  [ off on ]
outputs.spkr_source=dac  [ dac dac2 mix2 ]
outputs.line_source=dac  [ dac dac2 mix2 ]
inputs.dac_mute=off  [ off on ]
inputs.dac=254,254
inputs.dac2_mute=off  [ off on ]
inputs.dac2=254,254
inputs.sel_source=dac  [ dac dac2 mix2 ]
inputs.mix2_dac_mute=off  [ off on ]
inputs.mix2_dac2_mute=off  [ off on ]
inputs.mix2_sel2_mute=off  [ off on ]
inputs.mix2_sel3_mute=off  [ off on ]
inputs.mix2_dac=248,248
inputs.mix2_dac2=248,248
inputs.mix2_sel2=248,248
inputs.mix2_sel3=248,248
outputs.mic3=255,255
inputs.sel2_source=mic  [ mic mic2 ]
outputs.sel2=255,255
inputs.sel3_source=mic  [ mic mic2 ]
outputs.sel3=255,255
inputs.sel4_source=sel2  [ sel2 mix2 mic3 ]
outputs.sel4_mute=off  [ off on ]
outputs.sel4=255,255
inputs.sel5_source=sel3  [ sel3 mix2 mic3 ]
outputs.sel5_mute=off  [ off on ]
outputs.sel5=255,255
inputs.sel6_source=dac3  [ dac3 sel4 sel5 ]
inputs.sel7_source=dac4  [ dac4 sel4 sel5 ]
inputs.beep_mute=off  [ off on ]
inputs.beep=255
outputs.volume=254
outputs.hp_sense=unplugged  [ unplugged plugged ]
outputs.mic_sense=unplugged  [ unplugged plugged ]
outputs.mic2_sense=unplugged  [ unplugged plugged ]
outputs.line_sense=unplugged  [ unplugged plugged ]
outputs.master=254,254

When i play something with aucat:

azalia_open: flags=0x2
azalia_round_blocksize: resultant block size = 9600
azalia_round_blocksize: resultant block size = 9600
azalia_round_blocksize: resultant block size = 4736
azalia_codec_connect_stream: fmt=0x0011 number=1
azalia_codec_connect_stream: leave with 0
azalia_halt_output
azalia_close

I still can't listen anything on speakers/headphone, even increasing the values in mixerctl,
but i think it's closer to happen =].

Do you have any idea/diff that i can try?
I have some ALSA codec information and it says some things about GPIO and pin stuff.
If it can help: http://openbsd-sp.org/codecs.txt

Keep up the good work!

Thanks.

Reply | Threaded
Open this post in threaded view
|

Re: azalia: better conveter group configuration

Zak B. Elep-6
In reply to this post by j4nKy
Jacob Meuser writes:
> here's a new version.  this one takes into account pin association/
> sequence pairs.  pins with low association/sequence pairs are to be
> considered higher priority for default output.  so, start finding
> converters from pins with low association/sequence and work up the
> associations, instead of ordering converters by their widget ID.

I've tested on my MSI MegaBook S262, playback works (both with and
without aucat multi-streaming.)  The laptop also has external volume
controls (Fn-modified F7 (increase), F8 (decrease), and F9 (mute)) and
they work except for muting.

Here's the dmesg:

OpenBSD 4.4-current (GENERIC.MP) #14: Tue Nov 25 11:59:21 PHT 2008
    [hidden email]:/usr/src/sys/arch/i386/compile/GENERIC.MP
cpu0: Genuine Intel(R) CPU T2300 @ 1.66GHz ("GenuineIntel" 686-class) 1.67 GHz
cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,EST,TM2,xTPR
real mem  = 1064726528 (1015MB)
avail mem = 1021300736 (973MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 06/21/06, BIOS32 rev. 0 @ 0xf0010, SMBIOS rev. 2.3 @ 0xfb340 (21 entries)
bios0: vendor American Megatrends Inc. version "A1057IMS V2.10" date 06/21/2006
bios0: MICRO-STAR INT'L CO.,LTD. MS-1057
acpi0 at bios0: rev 0
acpi0: tables DSDT FACP APIC MCFG OEMB ASF!
acpi0: wakeup devices P0PC(S4) USB0(S3) USB1(S3) USB2(S3) USB3(S3) EUSB(S3) MC97(S4) P0P7(S4) P0P8(S4) P0P9(S4) P0P1(S4) OZF1(S3) OZF2(S3) OZF3(S3) P0P5(S4) P0P4(S4) P0P3(S4) AZAL(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: apic clock running at 166MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Genuine Intel(R) CPU T2300 @ 1.66GHz ("GenuineIntel" 686-class) 1.67 GHz
cpu1: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,EST,TM2,xTPR
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 24 pins
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (P0P7)
acpiprt2 at acpi0: bus -1 (P0P8)
acpiprt3 at acpi0: bus -1 (P0P9)
acpiprt4 at acpi0: bus 1 (P0P1)
acpiprt5 at acpi0: bus 5 (P0P5)
acpiprt6 at acpi0: bus 4 (P0P4)
acpiprt7 at acpi0: bus 3 (P0P3)
acpiec0 at acpi0
acpicpu0 at acpi0: C3, C2
acpicpu1 at acpi0
acpitz0 at acpi0: critical temperature 99 degC
acpiac0 at acpi0: AC unit online
acpibat0 at acpi0: BAT1 model "MS-1057
" serial
 type LION
 oem "MSI Corp.
"
acpibtn0 at acpi0: PWRB
acpibtn1 at acpi0: LID0
acpibtn2 at acpi0: SLPB
acpivideo at acpi0 not configured
bios0: ROM list: 0xc0000/0xe600! 0xce800/0x1000
cpu0: unknown Enhanced SpeedStep CPU, msr 0x06130a2c06000a2c
cpu0: using only highest and lowest power states
cpu0: Enhanced SpeedStep 1667 MHz (1404 mV): speeds: 1667, 1000 MHz
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 "Intel 82945GM Host" rev 0x03
vga1 at pci0 dev 2 function 0 "Intel 82945GM Video" rev 0x03
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
intagp0 at vga1
agp0 at intagp0: aperture at 0xd0000000, size 0x10000000
inteldrm0 at vga1
drm0 at inteldrm0
"Intel 82945GM Video" rev 0x03 at pci0 dev 2 function 1 not configured
azalia0 at pci0 dev 27 function 0 "Intel 82801GB HD Audio" rev 0x02: apic 2 int 17 (irq 11)
azalia0: host: High Definition Audio rev. 1.0
azalia0: host: 4 output, 4 input, and 0 bidi streams
azalia_attach: resetting
azalia_attach: reset counter = 4999
azalia_attach: reset counter = 4984
azalia0: found a codec at #0
azalia0: found a codec at #1
azalia_init_corb: CORB allocation succeeded.
azalia_init_corb: CORBWP=0; size=256
azalia_init_rirb: RIRB allocation succeeded.
azalia_init_rirb: RIRBRP=0, size=256
azalia0: codec[0] vid 0x10ec0882, subid 0x05711462, rev. 1.1, HDA version 1.0
azalia_codec_init: nidstart=1 #functions=1
azalia_codec_init: FTYPE result = 0x00000001
azalia_codec_init: There are 37 widgets in the audio function.
        encodings=1<PCM>
        PCM formats=e0560<24bit,20bit,16bit,192kHz,96kHz,48kHz,44.1kHz>
        inamp: mute=0 size=0 steps=0 offset=0
        outamp: mute=0 size=0 steps=0 offset=0
        gpio: wake=0 unsol=1 gpis=0 gpos=0 gpios=2
azalia0: dac02 wcap=11<FORMATOV,STEREO>
        encodings=1<PCM>
        PCM formats=e0560<24bit,20bit,16bit,192kHz,96kHz,48kHz,44.1kHz>
azalia0: dac03 wcap=11<FORMATOV,STEREO>
        encodings=1<PCM>
        PCM formats=e0560<24bit,20bit,16bit,192kHz,96kHz,48kHz,44.1kHz>
azalia0: dac04 wcap=11<FORMATOV,STEREO>
        encodings=1<PCM>
        PCM formats=e0560<24bit,20bit,16bit,192kHz,96kHz,48kHz,44.1kHz>
azalia0: dac05 wcap=11<FORMATOV,STEREO>
        encodings=1<PCM>
        PCM formats=e0560<24bit,20bit,16bit,192kHz,96kHz,48kHz,44.1kHz>
azalia0: dac06 wcap=211<DIGITAL,FORMATOV,STEREO>
        encodings=1<PCM>
        PCM formats=1e0560<32bit,24bit,20bit,16bit,192kHz,96kHz,48kHz,44.1kHz>
azalia0: adc07 wcap=10011b<CONNLIST,FORMATOV,AMPOV,INAMP,STEREO>
        encodings=1<PCM>
        PCM formats=60160<20bit,16bit,96kHz,48kHz,44.1kHz>
        inamp: mute=1 size=5 steps=31 offset=8
        connections=0x24; selected=0x24
azalia0: adc08 wcap=10011b<CONNLIST,FORMATOV,AMPOV,INAMP,STEREO>
        encodings=1<PCM>
        PCM formats=60160<20bit,16bit,96kHz,48kHz,44.1kHz>
        inamp: mute=1 size=5 steps=31 offset=8
        connections=0x23; selected=0x23
azalia0: adc09 wcap=10011b<CONNLIST,FORMATOV,AMPOV,INAMP,STEREO>
        encodings=1<PCM>
        PCM formats=60160<20bit,16bit,96kHz,48kHz,44.1kHz>
        inamp: mute=1 size=5 steps=31 offset=8
        connections=0x22; selected=0x22
azalia0: adc0a wcap=100391<DIGITAL,CONNLIST,UNSOL,FORMATOV,STEREO>
        encodings=1<PCM>
        PCM formats=1e0560<32bit,24bit,20bit,16bit,192kHz,96kHz,48kHz,44.1kHz>
        connections=0x1f; selected=0x1f
azalia0: mix0b wcap=20010b<CONNLIST,AMPOV,INAMP,STEREO>
        inamp: mute=1 size=5 steps=31 offset=23
        connections=0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x14,0x15,0x16,0x17; selected=0x18
azalia0: mix0c wcap=20010f<CONNLIST,AMPOV,OUTAMP,INAMP,STEREO>
        inamp: mute=1 size=0 steps=0 offset=0
        outamp: mute=0 size=5 steps=31 offset=31
        connections=0x2,0xb; selected=0x2
azalia0: mix0d wcap=20010f<CONNLIST,AMPOV,OUTAMP,INAMP,STEREO>
        inamp: mute=1 size=0 steps=0 offset=0
        outamp: mute=0 size=5 steps=31 offset=31
        connections=0x3,0xb; selected=0x3
azalia0: mix0e wcap=20010f<CONNLIST,AMPOV,OUTAMP,INAMP,STEREO>
        inamp: mute=1 size=0 steps=0 offset=0
        outamp: mute=0 size=5 steps=31 offset=31
        connections=0x4,0xb; selected=0x4
azalia0: mix0f wcap=20010f<CONNLIST,AMPOV,OUTAMP,INAMP,STEREO>
        inamp: mute=1 size=0 steps=0 offset=0
        outamp: mute=0 size=5 steps=31 offset=31
        connections=0x5,0xb; selected=0x5
azalia0: vendor10 wcap=f00000
azalia0: vendor11 wcap=f00000
azalia0: vendor12 wcap=f00000
azalia0: vendor13 wcap=f00000
azalia0: green14 wcap=40018f<CONNLIST,UNSOL,AMPOV,OUTAMP,INAMP,STEREO>
        cap=3f<INPUT,OUTPUT,HEADPHONE,PRESENCE,TRIGGER,IMPEDANCE>
        [01/00] color=green device=hp conn=jack conntype=1/8
        location=rear chassis=external special=none
        inamp: mute=0 size=39 steps=3 offset=0
        outamp: mute=1 size=0 steps=0 offset=0
        connections=0xc,0xd,0xe,0xf,0x26; selected=0xc
azalia0: black15 wcap=40018f<CONNLIST,UNSOL,AMPOV,OUTAMP,INAMP,STEREO>
        cap=3f<INPUT,OUTPUT,HEADPHONE,PRESENCE,TRIGGER,IMPEDANCE>
        [15/00] color=black device=spkr conn=none conntype=1/8
        location=rear chassis=external special=none
        inamp: mute=0 size=39 steps=3 offset=0
        outamp: mute=1 size=0 steps=0 offset=0
        connections=0xc,0xd,0xe,0xf,0x26; selected=0xd
azalia0: black16 wcap=40018f<CONNLIST,UNSOL,AMPOV,OUTAMP,INAMP,STEREO>
        cap=3f<INPUT,OUTPUT,HEADPHONE,PRESENCE,TRIGGER,IMPEDANCE>
        [15/00] color=black device=spkr conn=none conntype=1/8
        location=rear chassis=external special=none
        inamp: mute=0 size=39 steps=3 offset=0
        outamp: mute=1 size=0 steps=0 offset=0
        connections=0xc,0xd,0xe,0xf,0x26; selected=0xe
azalia0: black17 wcap=40018f<CONNLIST,UNSOL,AMPOV,OUTAMP,INAMP,STEREO>
        cap=3f<INPUT,OUTPUT,HEADPHONE,PRESENCE,TRIGGER,IMPEDANCE>
        [15/00] color=black device=spkr conn=none conntype=1/8
        location=rear chassis=external special=none
        inamp: mute=0 size=39 steps=3 offset=0
        outamp: mute=1 size=0 steps=0 offset=0
        connections=0xc,0xd,0xe,0xf,0x26; selected=0xf
azalia0: pink18 wcap=40018f<CONNLIST,UNSOL,AMPOV,OUTAMP,INAMP,STEREO>
        cap=173f<VREF80,VREFGND,VREF50,VREFHIZ,INPUT,OUTPUT,HEADPHONE,PRESENCE,TRIGGER,IMPEDANCE>
        [03/00] color=pink device=mic conn=jack conntype=1/8
        location=rear chassis=external special=none
        inamp: mute=0 size=39 steps=3 offset=0
        outamp: mute=1 size=0 steps=0 offset=0
        connections=0xc,0xd,0xe,0xf,0x26; selected=0xc
azalia0: black19 wcap=40018f<CONNLIST,UNSOL,AMPOV,OUTAMP,INAMP,STEREO>
        cap=173f<VREF80,VREFGND,VREF50,VREFHIZ,INPUT,OUTPUT,HEADPHONE,PRESENCE,TRIGGER,IMPEDANCE>
        [15/00] color=black device=spkr conn=none conntype=1/8
        location=rear chassis=external special=none
        inamp: mute=0 size=39 steps=3 offset=0
        outamp: mute=1 size=0 steps=0 offset=0
        connections=0xc,0xd,0xe,0xf,0x26; selected=0xc
azalia0: black1a wcap=40018f<CONNLIST,UNSOL,AMPOV,OUTAMP,INAMP,STEREO>
        cap=173f<VREF80,VREFGND,VREF50,VREFHIZ,INPUT,OUTPUT,HEADPHONE,PRESENCE,TRIGGER,IMPEDANCE>
        [15/00] color=black device=spkr conn=none conntype=1/8
        location=rear chassis=external special=none
        inamp: mute=0 size=39 steps=3 offset=0
        outamp: mute=1 size=0 steps=0 offset=0
        connections=0xc,0xd,0xe,0xf,0x26; selected=0xc
azalia0: black1b wcap=40018f<CONNLIST,UNSOL,AMPOV,OUTAMP,INAMP,STEREO>
        cap=173f<VREF80,VREFGND,VREF50,VREFHIZ,INPUT,OUTPUT,HEADPHONE,PRESENCE,TRIGGER,IMPEDANCE>
        [15/00] color=black device=spkr conn=none conntype=1/8
        location=rear chassis=external special=none
        inamp: mute=0 size=39 steps=3 offset=0
        outamp: mute=1 size=0 steps=0 offset=0
        connections=0xc,0xd,0xe,0xf,0x26; selected=0xc
azalia0: unknown1c wcap=400001<STEREO>
        cap=20<INPUT>
        [03/01] color=unknown device=cd conn=fixed conntype=atapi
        location=spec2 chassis=internal special=atapi
azalia0: unknown1d wcap=400000
        cap=20<INPUT>
        [03/15] color=unknown device=line conn=fixed conntype=atapi
        location=spec2 chassis=internal special=atapi
azalia0: unknown1e wcap=400300<DIGITAL,CONNLIST>
        cap=10<OUTPUT>
        [02/00] color=unknown device=SPDIF-out conn=fixed conntype=atapi
        location=spec2 chassis=internal special=atapi
        connections=0x6; selected=0x6
azalia0: black1f wcap=400200<DIGITAL>
        cap=20<INPUT>
        [15/00] color=black device=spkr conn=none conntype=1/8
        location=rear chassis=external special=none
azalia0: vendor20 wcap=f00040<PROC>
azalia0: volume21 wcap=600080<UNSOL>
        delta=0 steps=32
azalia0: mix22 wcap=20010f<CONNLIST,AMPOV,OUTAMP,INAMP,STEREO>
        inamp: mute=1 size=0 steps=0 offset=0
        outamp: mute=0 size=0 steps=0 offset=0
        connections=0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x14,0x15,0x16,0x17,0xb; selected=0x18
azalia0: mix23 wcap=20010f<CONNLIST,AMPOV,OUTAMP,INAMP,STEREO>
        inamp: mute=1 size=0 steps=0 offset=0
        outamp: mute=0 size=0 steps=0 offset=0
        connections=0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x14,0x15,0x16,0x17,0xb; selected=0x18
azalia0: mix24 wcap=20010f<CONNLIST,AMPOV,OUTAMP,INAMP,STEREO>
        inamp: mute=1 size=0 steps=0 offset=0
        outamp: mute=0 size=0 steps=0 offset=0
        connections=0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x14,0x15,0x16,0x17,0xb; selected=0x18
azalia0: dac25 wcap=11<FORMATOV,STEREO>
        encodings=1<PCM>
        PCM formats=e0560<24bit,20bit,16bit,192kHz,96kHz,48kHz,44.1kHz>
azalia0: mix26 wcap=20010f<CONNLIST,AMPOV,OUTAMP,INAMP,STEREO>
        inamp: mute=1 size=0 steps=0 offset=0
        outamp: mute=0 size=5 steps=31 offset=31
        connections=0x25,0xb; selected=0x25
azalia_codec_init: dacgroup[0]: 02 03 04 05 25
azalia_codec_init: dacgroup[1]: 06
azalia_codec_init: adcgroup[0]: 07 08 09
azalia0: codec[1] vid 0x11c13055, subid 0x05711462, rev. 7.0, HDA version 1.0
azalia_codec_init: nidstart=1 #functions=1
azalia_codec_init: FTYPE result = 0x00000102
azalia0: codec[1]: No audio function groups
azalia0: codecs: Realtek ALC882, AT&T/Lucent/0x3055, using Realtek ALC882
audio0 at azalia0
azalia_round_blocksize: resultant block size = 9600
azalia_round_blocksize: resultant block size = 9600
ppb0 at pci0 dev 28 function 0 "Intel 82801GB PCIE" rev 0x02: apic 2 int 16 (irq 5)
pci1 at ppb0 bus 5
ppb1 at pci0 dev 28 function 1 "Intel 82801GB PCIE" rev 0x02: apic 2 int 17 (irq 11)
pci2 at ppb1 bus 4
re0 at pci2 dev 0 function 0 "Realtek 8168" rev 0x01: RTL8168 1 (0x3000), apic 2 int 17 (irq 11), address 00:16:17:4d:b7:f8
rgephy0 at re0 phy 7: RTL8169S/8110S PHY, rev. 2
ppb2 at pci0 dev 28 function 2 "Intel 82801GB PCIE" rev 0x02: apic 2 int 18 (irq 10)
pci3 at ppb2 bus 3
wpi0 at pci3 dev 0 function 0 "Intel PRO/Wireless 3945ABG" rev 0x02: apic 2 int 18 (irq 10), MoW2, address 00:13:02:02:14:45
uhci0 at pci0 dev 29 function 0 "Intel 82801GB USB" rev 0x02: apic 2 int 23 (irq 15)
uhci1 at pci0 dev 29 function 1 "Intel 82801GB USB" rev 0x02: apic 2 int 19 (irq 3)
uhci2 at pci0 dev 29 function 2 "Intel 82801GB USB" rev 0x02: apic 2 int 18 (irq 10)
uhci3 at pci0 dev 29 function 3 "Intel 82801GB USB" rev 0x02: apic 2 int 16 (irq 5)
ehci0 at pci0 dev 29 function 7 "Intel 82801GB USB" rev 0x02: apic 2 int 23 (irq 15)
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb3 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0xe2
pci4 at ppb3 bus 1
"O2 Micro Firewire" rev 0x02 at pci4 dev 4 function 0 not configured
sdhc0 at pci4 dev 4 function 2 "O2 Micro OZ711MP1 SDHC" rev 0x01: apic 2 int 16 (irq 5)
sdmmc0 at sdhc0
"O2 Micro OZ711MP1 XDHC" rev 0x01 at pci4 dev 4 function 3 not configured
ichpcib0 at pci0 dev 31 function 0 "Intel 82801GBM LPC" rev 0x02: PM disabled
pciide0 at pci0 dev 31 function 1 "Intel 82801GB IDE" rev 0x02: DMA, channel 0 configured to compatibility, channel 1 configured to compatibility
wd0 at pciide0 channel 0 drive 0: <WDC WD800VE-00HDT0>
wd0: 16-sector PIO, LBA, 76319MB, 156301488 sectors
atapiscsi0 at pciide0 channel 0 drive 1
scsibus0 at atapiscsi0: 2 targets, initiator 7
cd0 at scsibus0 targ 0 lun 0: <HL-DT-ST, DVD-RW GWA-4082N, CB03> ATAPI 5/cdrom removable
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5
cd0(pciide0:0:1): using PIO mode 4, Ultra-DMA mode 2
pciide0: channel 1 ignored (disabled)
ichiic0 at pci0 dev 31 function 3 "Intel 82801GB SMBus" rev 0x02: apic 2 int 19 (irq 3)
iic0 at ichiic0
spdmem0 at iic0 addr 0x52: 1GB DDR2 SDRAM non-parity PC2-5300CL5 SO-DIMM
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb2 at uhci1: USB revision 1.0
uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb3 at uhci2: USB revision 1.0
uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb4 at uhci3: USB revision 1.0
uhub4 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1
isa0 at ichpcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pmsi0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pmsi0 mux 0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: <PC speaker>
spkr0 at pcppi0
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
mtrr: Pentium Pro MTRR support
ugen0 at uhub4 port 2 "Cambridge Silicon Radio Bluetooth" rev 2.00/15.93 addr 2
uhidev0 at uhub1 port 2 configuration 1 interface 0 "Logitech USB Receiver" rev 2.00/57.01 addr 2
uhidev0: iclass 3/1
ums0 at uhidev0: 16 buttons, Z dir
wsmouse1 at ums0 mux 0
uhidev1 at uhub1 port 2 configuration 1 interface 1 "Logitech USB Receiver" rev 2.00/57.01 addr 2
uhidev1: iclass 3/0, 17 report ids
uhid0 at uhidev1 reportid 3: input=4, output=0, feature=0
uhid1 at uhidev1 reportid 16: input=6, output=6, feature=0
uhid2 at uhidev1 reportid 17: input=19, output=19, feature=0
softraid0 at root
root on wd0a swap on wd0b dump on wd0b


Cheers,

Zak


--
  I like the idea of 256 bits, though: 32 for the (Unicode) character leaves
  room for 224 Bucky bits, which ought to be enough for anyone.
                                -- Roland Hutchinson, in alt.folklore.computers

Reply | Threaded
Open this post in threaded view
|

Re: azalia: better conveter group configuration

Alexey Suslikov
In reply to this post by j4nKy
guilherme m. schroeder wrote:

> My notebook have the external volume control button you said and they are working.
> If i hit the volume button (+/-) i see that outputs.master and inputs.dac changes, \
> nice =].
>
> Other things i noticed:
> - putting the headphone on headphone input, outputs.hp_sense changes to plugged.
> - putting the headphone on mic input, outputs.mic_sense changes to plugged.
> - i don't have another mic input neither line.

It is normal. Currently driver lists all ports with

CORB_CD_PORT(this->d.pin.config) == CORB_CD_JACK

and presence capability under *_sense. Some of these ports
are real mic/hp jacks, some are not (they should be marked
as CORB_CD_NONE, but vendors haven't configured them
properly).

On my laptop

- I see hp sense as "line_sense" and it is not changing at all
(however audio switching occurs properly, I suspect due to
old-school mechanical switching);
- mic correctly advertises its presence via "mic_sense".

Alexey

Reply | Threaded
Open this post in threaded view
|

Re: azalia: better conveter group configuration

j4nKy
In reply to this post by j4nKy
On Mon, Nov 24, 2008 at 05:58:23AM +0000, Jacob Meuser wrote:
> On Sun, Nov 23, 2008 at 09:32:03PM +0000, Jacob Meuser wrote:
> > this is an important patch to test on all azalia.

really, it is.  if we don't get this right, we will never be able
to get meaningful names in azalia's mixer.

it's working correctly in most cases, but the hard ones are really
hard.  here's a new version which adds just a bit more useful
debug output and silences some we don't need right now.

please also see http://jakemsr.trancell.org/

--
[hidden email]
SDF Public Access UNIX System - http://sdf.lonestar.org

Index: azalia.c
===================================================================
RCS file: /home2/cvs/OpenBSD/src/sys/dev/pci/azalia.c,v
retrieving revision 1.73
diff -u -r1.73 azalia.c
--- azalia.c 19 Nov 2008 03:44:14 -0000 1.73
+++ azalia.c 25 Nov 2008 21:27:49 -0000
@@ -107,6 +107,14 @@
 };
 
 
+#ifdef AZALIA_DEBUG
+# define DPRINTFN(n,x) do { if (az_debug > (n)) printf x; } while (0/*CONSTCOND*/)
+int az_debug = 0;
+#else
+# define DPRINTFN(n,x) do {} while (0/*CONSTCOND*/)
+#endif
+
+
 /* ----------------------------------------------------------------
  * ICH6/ICH7 constant values
  * ---------------------------------------------------------------- */
@@ -1289,6 +1297,13 @@
  }
  DPRINTF(("\n"));
  }
+ for (i = 0; i < this->adcs.ngroups; i++) {
+ DPRINTF(("%s: adcgroup[%d]:", __func__, i));
+ for (n = 0; n < this->adcs.groups[i].nconv; n++) {
+ DPRINTF((" %2.2x", this->adcs.groups[i].conv[n]));
+ }
+ DPRINTF(("\n"));
+ }
 #endif
 
  /* set invalid values for azalia_codec_construct_format() to work */
@@ -2151,7 +2166,7 @@
  azalia_t *az;
  codec_t *codec;
 
- DPRINTF(("%s: flags=0x%x\n", __func__, flags));
+ DPRINTFN(1, ("%s: flags=0x%x\n", __func__, flags));
  az = v;
  codec = &az->codecs[az->codecno];
  codec->running++;
@@ -2164,7 +2179,7 @@
  azalia_t *az;
  codec_t *codec;
 
- DPRINTF(("%s\n", __func__));
+ DPRINTFN(1, ("%s\n", __func__));
  az = v;
  codec = &az->codecs[az->codecno];
  codec->running--;
@@ -2374,7 +2389,7 @@
  if (blk & 0x7f)
  blk = (blk + 0x7f) & ~0x7f;
  }
- DPRINTF(("%s: resultant block size = %d\n", __func__, blk));
+ DPRINTFN(1,("%s: resultant block size = %d\n", __func__, blk));
  return blk;
 }
 
Index: azalia.h
===================================================================
RCS file: /home2/cvs/OpenBSD/src/sys/dev/pci/azalia.h,v
retrieving revision 1.21
diff -u -r1.21 azalia.h
--- azalia.h 19 Nov 2008 03:44:14 -0000 1.21
+++ azalia.h 25 Nov 2008 21:27:49 -0000
@@ -501,7 +501,7 @@
 } __packed rirb_entry_t;
 
 
-/* #define AZALIA_DEBUG */
+#define AZALIA_DEBUG
 #ifdef AZALIA_DEBUG
 # define DPRINTF(x) do { printf x; } while (0/*CONSTCOND*/)
 #else
Index: azalia_codec.c
===================================================================
RCS file: /home2/cvs/OpenBSD/src/sys/dev/pci/azalia_codec.c,v
retrieving revision 1.67
diff -u -r1.67 azalia_codec.c
--- azalia_codec.c 19 Nov 2008 21:49:44 -0000 1.67
+++ azalia_codec.c 25 Nov 2008 21:27:49 -0000
@@ -71,10 +71,10 @@
 #define STAC9205_DELL_V1500 0x02281028
 
 int azalia_generic_codec_init_dacgroup(codec_t *);
-int azalia_generic_codec_add_dacgroup(codec_t *, int, uint32_t);
-int azalia_generic_codec_find_pin(const codec_t *, int, int, uint32_t);
-int azalia_generic_codec_find_dac(const codec_t *, int, int);
-
+int azalia_generic_codec_is_live_pin(const widget_t *, uint32_t, uint32_t);
+int azalia_generic_codec_fnode(codec_t *, nid_t, int, int);
+int azalia_generic_codec_add_convgroup(codec_t *, convgroupset_t *,
+    uint32_t, uint32_t);
 int azalia_generic_mixer_init(codec_t *);
 int azalia_generic_mixer_autoinit(codec_t *);
 
@@ -94,31 +94,19 @@
 int azalia_generic_get_port(codec_t *, mixer_ctrl_t *);
 int azalia_gpio_unmute(codec_t *, int);
 
-int azalia_alc260_init_dacgroup(codec_t *);
 int azalia_alc260_mixer_init(codec_t *);
-int azalia_alc662_init_dacgroup(codec_t *);
-int azalia_alc861_init_dacgroup(codec_t *);
 int azalia_alc88x_mixer_init(codec_t *);
-int azalia_alc880_init_dacgroup(codec_t *);
-int azalia_alc882_init_dacgroup(codec_t *);
-int azalia_alc883_init_dacgroup(codec_t *);
-int azalia_alc885_init_dacgroup(codec_t *);
-int azalia_alc888_init_dacgroup(codec_t *);
 int azalia_ad1984_init_dacgroup(codec_t *);
 int azalia_ad1984_mixer_init(codec_t *);
 int azalia_ad1984_set_port(codec_t *, mixer_ctrl_t *);
 int azalia_ad1984_get_port(codec_t *, mixer_ctrl_t *);
-int azalia_ad1988_init_dacgroup(codec_t *);
 int azalia_cmi9880_init_dacgroup(codec_t *);
 int azalia_cmi9880_mixer_init(codec_t *);
 int azalia_stac9200_mixer_init(codec_t *);
-int azalia_stac9205_init_dacgroup(codec_t *);
-int azalia_stac9221_mixer_init(codec_t *);
 int azalia_stac9221_init_dacgroup(codec_t *);
+int azalia_stac9221_mixer_init(codec_t *);
 int azalia_stac9221_set_port(codec_t *, mixer_ctrl_t *);
 int azalia_stac9221_get_port(codec_t *, mixer_ctrl_t *);
-int azalia_stac9227_init_dacgroup(codec_t *);
-int azalia_stac9271_init_dacgroup(codec_t *);
 int azalia_stac7661_init_dacgroup(codec_t *);
 int azalia_stac7661_mixer_init(codec_t *);
 int azalia_stac7661_set_port(codec_t *, mixer_ctrl_t *);
@@ -141,7 +129,6 @@
  case 0x10ec0260:
  this->name = "Realtek ALC260";
  this->mixer_init = azalia_alc260_mixer_init;
- this->init_dacgroup = azalia_alc260_init_dacgroup;
  break;
  case 0x10ec0268:
  this->name = "Realtek ALC268";
@@ -151,36 +138,29 @@
  break;
  case 0x10ec0662:
  this->name = "Realtek ALC662-GR";
- this->init_dacgroup = azalia_alc662_init_dacgroup;
  break;
  case 0x10ec0861:
  this->name = "Realtek ALC861";
- this->init_dacgroup = azalia_alc861_init_dacgroup;
  break;
  case 0x10ec0880:
  this->name = "Realtek ALC880";
- this->init_dacgroup = azalia_alc880_init_dacgroup;
  this->mixer_init = azalia_alc88x_mixer_init;
  break;
  case 0x10ec0882:
  this->name = "Realtek ALC882";
- this->init_dacgroup = azalia_alc882_init_dacgroup;
  this->mixer_init = azalia_alc88x_mixer_init;
  break;
  case 0x10ec0883:
  /* ftp://209.216.61.149/pc/audio/ALC883_DataSheet_1.3.pdf */
  this->name = "Realtek ALC883";
- this->init_dacgroup = azalia_alc883_init_dacgroup;
  this->mixer_init = azalia_alc88x_mixer_init;
  break;
  case 0x10ec0885:
  this->name = "Realtek ALC885";
- this->init_dacgroup = azalia_alc885_init_dacgroup;
  this->mixer_init = azalia_alc88x_mixer_init;
  break;
  case 0x10ec0888:
  this->name = "Realtek ALC888";
- this->init_dacgroup = azalia_alc888_init_dacgroup;
  this->mixer_init = azalia_alc88x_mixer_init;
  break;
  case 0x11d41983:
@@ -198,12 +178,10 @@
  case 0x11d41988:
  /* http://www.analog.com/en/prod/0,2877,AD1988A,00.html */
  this->name = "Analog Devices AD1988A";
- this->init_dacgroup = azalia_ad1988_init_dacgroup;
  break;
  case 0x11d4198b:
  /* http://www.analog.com/en/prod/0,2877,AD1988B,00.html */
  this->name = "Analog Devices AD1988B";
- this->init_dacgroup = azalia_ad1988_init_dacgroup;
  break;
  case 0x14f15045:
  this->name = "Conexant CX20549";  /* Venice */
@@ -221,31 +199,24 @@
  break;
  case 0x83847616:
  this->name = "Sigmatel STAC9228X";
- this->init_dacgroup = azalia_stac9227_init_dacgroup;
  break;
  case 0x83847617:
  this->name = "Sigmatel STAC9228D";
- this->init_dacgroup = azalia_stac9227_init_dacgroup;
  break;
  case 0x83847618:
  this->name = "Sigmatel STAC9227X";
- this->init_dacgroup = azalia_stac9227_init_dacgroup;
  break;
  case 0x83847620:
  this->name = "Sigmatel STAC9274";
- this->init_dacgroup = azalia_stac9271_init_dacgroup;
  break;
  case 0x83847621:
  this->name = "Sigmatel STAC9274D";
- this->init_dacgroup = azalia_stac9271_init_dacgroup;
  break;
  case 0x83847626:
  this->name = "Sigmatel STAC9271X";
- this->init_dacgroup = azalia_stac9271_init_dacgroup;
  break;
  case 0x83847627:
  this->name = "Sigmatel STAC9271D";
- this->init_dacgroup = azalia_stac9271_init_dacgroup;
  break;
  case 0x83847632:
  this->name = "Sigmatel STAC9202";
@@ -280,7 +251,6 @@
  break;
  case 0x83847683:
  this->name = "Sigmatel STAC9221D";
- this->init_dacgroup = azalia_stac9221_init_dacgroup;
  break;
  case 0x83847690:
  /* http://www.idt.com/products/getDoc.cfm?docID=17812077 */
@@ -292,19 +262,15 @@
  break;
  case 0x838476a0:
  this->name = "Sigmatel STAC9205X";
- this->init_dacgroup = azalia_stac9205_init_dacgroup;
  break;
  case 0x838476a1:
  this->name = "Sigmatel STAC9205D";
- this->init_dacgroup = azalia_stac9205_init_dacgroup;
  break;
  case 0x838476a2:
  this->name = "Sigmatel STAC9204X";
- this->init_dacgroup = azalia_stac9205_init_dacgroup;
  break;
  case 0x838476a3:
  this->name = "Sigmatel STAC9204D";
- this->init_dacgroup = azalia_stac9205_init_dacgroup;
  break;
  }
  return 0;
@@ -317,153 +283,168 @@
 int
 azalia_generic_codec_init_dacgroup(codec_t *this)
 {
- int i, j, assoc, group;
-
- /*
- * grouping DACs
- *   [0] the lowest assoc DACs
- *   [1] the lowest assoc digital outputs
- *   [2] the 2nd assoc DACs
- *      :
- */
  this->dacs.ngroups = 0;
- for (assoc = 0; assoc < CORB_CD_ASSOCIATION_MAX; assoc++) {
- azalia_generic_codec_add_dacgroup(this, assoc, 0);
- azalia_generic_codec_add_dacgroup(this, assoc, COP_AWCAP_DIGITAL);
- }
-
- /* find DACs which do not connect with any pins by default */
- FOR_EACH_WIDGET(this, i) {
- boolean_t found;
-
- if (this->w[i].type != COP_AWTYPE_AUDIO_OUTPUT)
- continue;
- found = FALSE;
- for (group = 0; group < this->dacs.ngroups; group++) {
- for (j = 0; j < this->dacs.groups[group].nconv; j++) {
- if (i == this->dacs.groups[group].conv[j]) {
- found = TRUE;
- group = this->dacs.ngroups;
- break;
- }
- }
- }
- if (found)
- continue;
- if (this->dacs.ngroups >= 32)
- break;
- this->dacs.groups[this->dacs.ngroups].nconv = 1;
- this->dacs.groups[this->dacs.ngroups].conv[0] = i;
- this->dacs.ngroups++;
- }
+ azalia_generic_codec_add_convgroup(this, &this->dacs,
+    COP_AWTYPE_AUDIO_OUTPUT, 0);
+ azalia_generic_codec_add_convgroup(this, &this->dacs,
+    COP_AWTYPE_AUDIO_OUTPUT, COP_AWCAP_DIGITAL);
  this->dacs.cur = 0;
 
- /* enumerate ADCs */
  this->adcs.ngroups = 0;
- FOR_EACH_WIDGET(this, i) {
- if (this->w[i].type != COP_AWTYPE_AUDIO_INPUT)
- continue;
- this->adcs.groups[this->adcs.ngroups].nconv = 1;
- this->adcs.groups[this->adcs.ngroups].conv[0] = i;
- this->adcs.ngroups++;
- if (this->adcs.ngroups >= 32)
- break;
- }
+ azalia_generic_codec_add_convgroup(this, &this->adcs,
+    COP_AWTYPE_AUDIO_INPUT, 0);
+ azalia_generic_codec_add_convgroup(this, &this->adcs,
+    COP_AWTYPE_AUDIO_INPUT, COP_AWCAP_DIGITAL);
  this->adcs.cur = 0;
+
  return 0;
 }
 
 int
-azalia_generic_codec_add_dacgroup(codec_t *this, int assoc, uint32_t digital)
+azalia_generic_codec_add_convgroup(codec_t *this, convgroupset_t *group,
+    uint32_t type, uint32_t digital)
 {
- int i, j, n, dac, seq;
+ nid_t all_convs[HDA_MAX_CHANNELS];
+ int nall_convs;
+ nid_t convs[HDA_MAX_CHANNELS];
+ int nconvs;
+ int assoc, seq;
+ nid_t conv;
+ int i, j, k, l;
+
+ DPRINTF(("%s: looking for %s %s\n", __func__,
+    digital ? "digital" : "analog",
+    (type == COP_AWTYPE_AUDIO_OUTPUT) ? "DACs" : "ADCs"));
 
- n = 0;
- for (seq = 0 ; seq < CORB_CD_SEQUENCE_MAX; seq++) {
- i = azalia_generic_codec_find_pin(this, assoc, seq, digital);
- if (i < 0)
- continue;
- dac = azalia_generic_codec_find_dac(this, i, 0);
- if (dac < 0)
- continue;
- /* duplication check */
- for (j = 0; j < n; j++) {
- if (this->dacs.groups[this->dacs.ngroups].conv[j] == dac)
- break;
- }
- if (j < n) /* this group already has <dac> */
- continue;
- this->dacs.groups[this->dacs.ngroups].conv[n++] = dac;
+ nall_convs = 0;
+ FOR_EACH_WIDGET(this, i) {
+ if (this->w[i].type == type &&
+    (this->w[i].widgetcap & COP_AWCAP_DIGITAL) == digital &&
+    nall_convs < HDA_MAX_CHANNELS)
+ all_convs[nall_convs++] = this->w[i].nid;
  }
- if (n <= 0) /* no such DACs */
- return 0;
- this->dacs.groups[this->dacs.ngroups].nconv = n;
 
- /* check if the same combination is already registered */
- for (i = 0; i < this->dacs.ngroups; i++) {
- if (n != this->dacs.groups[i].nconv)
- continue;
- for (j = 0; j < n; j++) {
- if (this->dacs.groups[this->dacs.ngroups].conv[j] !=
-    this->dacs.groups[i].conv[j])
- break;
+ nconvs = 0;
+ for (assoc = 0; assoc < CORB_CD_ASSOCIATION_MAX; assoc++) {
+ for (seq = 0; seq < CORB_CD_SEQUENCE_MAX; seq++) {
+ FOR_EACH_WIDGET(this, i) {
+ const widget_t *w = &this->w[i];
+ if (w->d.pin.sequence != seq ||
+    w->d.pin.association != assoc)
+ continue;
+ if (type == COP_AWTYPE_AUDIO_OUTPUT) {
+ if (azalia_generic_codec_is_live_pin(w,
+    COP_PINCAP_OUTPUT, digital) == 0)
+ continue;
+ } else {
+ if (azalia_generic_codec_is_live_pin(w,
+    COP_PINCAP_INPUT, digital) == 0)
+ continue;
+ }
+ DPRINTF(("\tpin=%2.2x, assoc=%d, seq=%d:",
+    w->nid, assoc, seq));
+ for (j = 0; j < nall_convs; j++) {
+ conv = all_convs[j];
+ for (k = 0; k < nconvs; k++) {
+ if (convs[k] == conv)
+ break;
+ }
+ if (k < nconvs)
+ continue;
+ if (type == COP_AWTYPE_AUDIO_OUTPUT) {
+ k = azalia_generic_codec_fnode
+    (this, conv, i, 0);
+ if (k < 0 ||
+    this->w[k].nid != conv)
+ continue;
+ } else {
+ for (l = 0; l < this->wend; l++)
+ if (this->w[l].nid ==
+    conv)
+ break;
+ k = azalia_generic_codec_fnode
+    (this, w->nid, l, 0);
+ if (k < 0 || this->w[k].nid !=
+    w->nid)
+ continue;
+ }
+ convs[nconvs++] = conv;
+ DPRINTF((" conv=%2.2x", conv));
+ if (nconvs >= nall_convs ||
+    nconvs >= HDA_MAX_CHANNELS) {
+ DPRINTF(("\n"));
+ goto done;
+ }
+ }
+ DPRINTF(("\n"));
+ }
  }
- if (j >= n) /* matched */
- return 0;
  }
- /* found no equivalent group */
- this->dacs.ngroups++;
+done:
+ for (i = 0; i < nconvs; i++)
+ group->groups[group->ngroups].conv[i] = convs[i];
+ if (nconvs > 0) {
+ group->groups[group->ngroups].nconv = i;
+ group->ngroups++;
+ }
+
  return 0;
 }
 
 int
-azalia_generic_codec_find_pin(const codec_t *this, int assoc, int seq, uint32_t digital)
+azalia_generic_codec_is_live_pin(const widget_t *w, uint32_t iocap, uint32_t digital)
 {
- int i;
+ uint8_t conn, dev;
 
- FOR_EACH_WIDGET(this, i) {
- if (this->w[i].type != COP_AWTYPE_PIN_COMPLEX)
- continue;
- if ((this->w[i].d.pin.cap & COP_PINCAP_OUTPUT) == 0)
- continue;
- if ((this->w[i].widgetcap & COP_AWCAP_DIGITAL) != digital)
- continue;
- if (this->w[i].d.pin.association != assoc)
- continue;
- if (this->w[i].d.pin.sequence == seq) {
- return i;
- }
+ if (w->type != COP_AWTYPE_PIN_COMPLEX)
+ return 0;
+ if ((w->d.pin.cap & iocap) == 0)
+ return 0;
+ if ((w->widgetcap & COP_AWCAP_DIGITAL) != digital)
+ return 0;
+ PIN_STATUS(w, conn);
+ if (conn == CORB_CD_NONE)
+ return 0;
+ dev = CORB_CD_DEVICE(w->d.pin.config);
+ if (iocap == COP_PINCAP_OUTPUT) {
+ if (dev == CORB_CD_LINEOUT || dev == CORB_CD_SPEAKER ||
+    dev == CORB_CD_HEADPHONE ||
+    (digital == COP_AWCAP_DIGITAL &&
+    (dev == CORB_CD_SPDIFOUT || dev == CORB_CD_DIGITALOUT)))
+ return 1;
+ } else {
+ if (dev == CORB_CD_MICIN || dev == CORB_CD_LINEIN ||
+    (digital == COP_AWCAP_DIGITAL &&
+    (dev == CORB_CD_SPDIFIN || dev == CORB_CD_DIGITALIN)))
+ return 1;
  }
- return -1;
+
+ return 0;
 }
 
 int
-azalia_generic_codec_find_dac(const codec_t *this, int index, int depth)
+azalia_generic_codec_fnode(codec_t *this, nid_t node, int index, int depth)
 {
  const widget_t *w;
- int i, j, ret;
+ int i, j, k, ret;
 
  w = &this->w[index];
- if (w->type == COP_AWTYPE_AUDIO_OUTPUT)
+ if (w->nid == node)
  return index;
- if (++depth > 50) {
+ if (++depth > 50)
  return -1;
- }
- if (w->selected >= 0) {
- j = w->connections[w->selected];
- if (VALID_WIDGET_NID(j, this)) {
- ret = azalia_generic_codec_find_dac(this, j, depth);
- if (ret >= 0)
- return ret;
- }
- }
  for (i = 0; i < w->nconnections; i++) {
  j = w->connections[i];
  if (!VALID_WIDGET_NID(j, this))
  continue;
- ret = azalia_generic_codec_find_dac(this, j, depth);
- if (ret >= 0)
- return ret;
+ FOR_EACH_WIDGET(this, k)
+ if (this->w[k].nid == j)
+ break;
+ if (k < this->wend) {
+ ret = azalia_generic_codec_fnode(this, node, k, depth);
+ if (ret >= 0)
+ return ret;
+ }
  }
  return -1;
 }
@@ -1813,63 +1794,6 @@
  return 0;
 }
 
-int
-azalia_alc260_init_dacgroup(codec_t *this)
-{
- static const convgroupset_t dacs = {
- -1, 2,
- {{1, {0x02}}, /* analog 2ch */
- {1, {0x03}}}}; /* digital */
- static const convgroupset_t adcs = {
- -1, 3,
- {{1, {0x04}}, /* analog 2ch */
- {1, {0x05}}, /* analog 2ch */
- {1, {0x06}}}}; /* digital */
-
- this->dacs = dacs;
- this->adcs = adcs;
- return 0;
-}
-
-/* ----------------------------------------------------------------
- * Realtek ALC662-GR
- * ---------------------------------------------------------------- */
-
-int
-azalia_alc662_init_dacgroup(codec_t *this)
-{
- static const convgroupset_t dacs = {
- -1, 1,
- {{3, {0x02, 0x03, 0x04}}}}; /* analog 6ch */
- static const convgroupset_t adcs = {
- -1, 1,
- {{2, {0x09, 0x08}}}}; /* analog 4ch */
-
- this->dacs = dacs;
- this->adcs = adcs;
- return 0;
-}
-
-/* ----------------------------------------------------------------
- * Realtek ALC861
- * ---------------------------------------------------------------- */
-
-int
-azalia_alc861_init_dacgroup(codec_t *this)
-{
- static const convgroupset_t dacs = {
- -1, 2,
- {{4, {0x03, 0x04, 0x05, 0x06}}, /* analog 8ch */
- {1, {0x07}}}}; /* digital */
- static const convgroupset_t adcs = {
- -1, 1,
- {{1, {0x08}}}}; /* analog 2ch */
-
- this->dacs = dacs;
- this->adcs = adcs;
- return 0;
-}
-
 /* ----------------------------------------------------------------
  * Realtek ALC88x mixer init - volume control is on the mixer
  * instead of the DAC.
@@ -1886,113 +1810,6 @@
 }
 
 /* ----------------------------------------------------------------
- * Realtek ALC880
- * ---------------------------------------------------------------- */
-
-int
-azalia_alc880_init_dacgroup(codec_t *this)
-{
- static const convgroupset_t dacs = {
- -1, 2,
- {{4, {0x02, 0x03, 0x04, 0x05}}, /* analog 8ch */
- {1, {0x06}}}}; /* digital */
- static const convgroupset_t adcs = {
- -1, 2,
- {{3, {0x07, 0x08, 0x09}}, /* analog 6ch */
- {1, {0x0a}}}}; /* digital */
-
- this->dacs = dacs;
- this->adcs = adcs;
- return 0;
-}
-
-/* ----------------------------------------------------------------
- * Realtek ALC882
- * ---------------------------------------------------------------- */
-
-int
-azalia_alc882_init_dacgroup(codec_t *this)
-{
- static const convgroupset_t dacs = {
- -1, 2,
- {{5, {0x02, 0x03, 0x04, 0x05, 0x25}}, /* analog 10ch */
- {1, {0x06}}}}; /* digital */
- static const convgroupset_t adcs = {
- -1, 2,
- {{3, {0x07, 0x08, 0x09}}, /* analog 6ch */
- {1, {0x0a}}}}; /* digital */
-
- this->dacs = dacs;
- this->adcs = adcs;
- return 0;
-}
-
-/* ----------------------------------------------------------------
- * Realtek ALC883
- * ALC882 without adc07 and mix24.
- * ---------------------------------------------------------------- */
-
-int
-azalia_alc883_init_dacgroup(codec_t *this)
-{
- static const convgroupset_t dacs = {
- -1, 2,
- {{5, {0x02, 0x03, 0x04, 0x05, 0x25}}, /* analog 10ch */
- {1, {0x06}}}}; /* digital */
- static const convgroupset_t adcs = {
- -1, 2,
- {{2, {0x08, 0x09}}, /* analog 4ch */
- {1, {0x0a}}}}; /* digital */
-
- this->dacs = dacs;
- this->adcs = adcs;
- return 0;
-}
-
-/* ----------------------------------------------------------------
- * Realtek ALC885
- * ---------------------------------------------------------------- */
-
-int
-azalia_alc885_init_dacgroup(codec_t *this)
-{
- static const convgroupset_t dacs = {
- -1, 2,
- {{5, {0x02, 0x03, 0x04, 0x05, 0x25}}, /* analog 10ch */
- {1, {0x06}}}}; /* digital */
- static const convgroupset_t adcs = {
- -1, 2,
- {{3, {0x07, 0x08, 0x09}}, /* analog 6ch */
- {1, {0x0a}}}}; /* digital */
-
- this->dacs = dacs;
- this->adcs = adcs;
- return 0;
-}
-
-/* ----------------------------------------------------------------
- * Realtek ALC888
- * ---------------------------------------------------------------- */
-
-int
-azalia_alc888_init_dacgroup(codec_t *this)
-{
- static const convgroupset_t dacs = {
- -1, 2,
- {{5, {0x02, 0x03, 0x04, 0x05, 0x25}}, /* analog 10ch */
- {1, {0x06}}}}; /* digital */
- /* ALC888S has another SPDIF-out 0x10 */
- static const convgroupset_t adcs = {
- -1, 2,
- {{2, {0x08, 0x09}}, /* analog 4ch */
- {1, {0x0a}}}}; /* digital */
-
- this->dacs = dacs;
- this->adcs = adcs;
- return 0;
-}
-
-/* ----------------------------------------------------------------
  * Analog Devices AD1984
  * ---------------------------------------------------------------- */
 
@@ -2141,28 +1958,6 @@
 }
 
 /* ----------------------------------------------------------------
- * Analog Devices AD1988A/AD1988B
- * ---------------------------------------------------------------- */
-
-int
-azalia_ad1988_init_dacgroup(codec_t *this)
-{
- static const convgroupset_t dacs = {
- -1, 3,
- {{4, {0x04, 0x05, 0x06, 0x0a}}, /* analog 8ch */
- {1, {0x02}}, /* digital */
- {1, {0x03}}}}; /* another analog */
- static const convgroupset_t adcs = {
- -1, 2,
- {{2, {0x08, 0x09, 0x0f}}, /* analog 6ch */
- {1, {0x07}}}}; /* digital */
-
- this->dacs = dacs;
- this->adcs = adcs;
- return 0;
-}
-
-/* ----------------------------------------------------------------
  * CMedia CMI9880
  * ---------------------------------------------------------------- */
 
@@ -2445,62 +2240,6 @@
     MI_TARGET_OUTAMP, mc);
  return azalia_generic_mixer_get(this, m->nid, m->target, mc);
 }
-
-
-int
-azalia_stac9205_init_dacgroup(codec_t *this)
-{
- /* volume knob at nid 24 */
- static const convgroupset_t dacs = {
- -1, 1,
- {{2, {0x10, 0x11}}}};
-
- /* vols: 1d:1b, 1e:1a */
- static const convgroupset_t adcs = {
- -1, 1,
- {{2, {0x1d, 0x1e}}}};
-
- this->dacs = dacs;
- this->adcs = adcs;
- return 0;
-}
-
-int
-azalia_stac9227_init_dacgroup(codec_t *this)
-{
- /* volume knob at nid 24 */
- static const convgroupset_t dacs = {
- -1, 1,
- {{4, {0x02, 0x03, 0x04, 0x05}}}};
-
- /* vols: 07:18, 08:19, 09:1a */
- static const convgroupset_t adcs = {
- -1, 1,
- {{3, {0x07, 0x08, 0x09}}}};
-
- this->dacs = dacs;
- this->adcs = adcs;
- return 0;
-}
-
-int
-azalia_stac9271_init_dacgroup(codec_t *this)
-{
- /* volume knob at nid 24 */
- static const convgroupset_t dacs = {
- -1, 1,
- {{5, {0x02, 0x03, 0x04, 0x05, 0x06}}}};
-
- /* vols: 07:18, 08:19, 09:1a */
- static const convgroupset_t adcs = {
- -1, 1,
- {{3, {0x07, 0x08, 0x09}}}};
-
- this->dacs = dacs;
- this->adcs = adcs;
- return 0;
-}
-
 
 /* ----------------------------------------------------------------
  * Sony VAIO FE and SZ

Reply | Threaded
Open this post in threaded view
|

Re: azalia: better conveter group configuration

Thomas Pfaff-2
On Tue, 25 Nov 2008 22:36:13 +0000
Jacob Meuser <[hidden email]> wrote:

> On Mon, Nov 24, 2008 at 05:58:23AM +0000, Jacob Meuser wrote:
> > On Sun, Nov 23, 2008 at 09:32:03PM +0000, Jacob Meuser wrote:
> > > this is an important patch to test on all azalia.
>
> really, it is.  if we don't get this right, we will never be able
> to get meaningful names in azalia's mixer.

Here you are.

OpenBSD 4.4-current (GENERIC.MP) #6: Wed Nov 26 00:19:27 CET 2008
    [hidden email]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 3140489216 (2995MB)
avail mem = 3045228544 (2904MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xf06b0 (76 entries)
bios0: vendor American Megatrends Inc. version "1704" date 11/27/2007
bios0: ASUSTeK Computer INC. P5B-E
acpi0 at bios0: rev 2
acpi0: tables DSDT FACP APIC MCFG OEMB HPET
acpi0: wakeup devices P0P2(S4) P0P1(S4) UAR1(S4) PS2K(S4) PS2M(S4) EUSB(S4) USBE(S4) P0P4(S4) P0P5(S4) P0P6(S4) P0P7(S4) P0P8(S4) P0P9(S4) USB0(S4) USB1(S4) USB2(S4) USB3(S4) USB4(S4) USB5(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM)2 CPU 6400 @ 2.13GHz, 2562.35 MHz
cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,EST,TM2,CX16,xTPR,NXE,LONG
cpu0: 2MB 64b/line 8-way L2 cache
cpu0: apic clock running at 266MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM)2 CPU 6400 @ 2.13GHz, 2135.04 MHz
cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,EST,TM2,CX16,xTPR,NXE,LONG
cpu1: 2MB 64b/line 8-way L2 cache
ioapic0 at mainbus0 apid 2 pa 0xfec00000, version 20, 24 pins
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (P0P2)
acpiprt2 at acpi0: bus 4 (P0P1)
acpiprt3 at acpi0: bus 3 (P0P4)
acpiprt4 at acpi0: bus -1 (P0P5)
acpiprt5 at acpi0: bus -1 (P0P6)
acpiprt6 at acpi0: bus -1 (P0P7)
acpiprt7 at acpi0: bus 2 (P0P8)
acpicpu0 at acpi0: PSS
acpicpu1 at acpi0: PSS
acpibtn0 at acpi0: PWRB
pci0 at mainbus0 bus 0: configuration mode 1
pchb0 at pci0 dev 0 function 0 "Intel 82G965 Host" rev 0x02
ppb0 at pci0 dev 1 function 0 "Intel 82G965 PCIE" rev 0x02: apic 2 int 16 (irq 11)
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 "NVIDIA GeForce 7600 GT" rev 0xa1
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
uhci0 at pci0 dev 26 function 0 "Intel 82801H USB" rev 0x02: apic 2 int 16 (irq 11)
uhci1 at pci0 dev 26 function 1 "Intel 82801H USB" rev 0x02: apic 2 int 17 (irq 5)
ehci0 at pci0 dev 26 function 7 "Intel 82801H USB" rev 0x02: apic 2 int 18 (irq 15)
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
azalia0 at pci0 dev 27 function 0 "Intel 82801H HD Audio" rev 0x02: apic 2 int 22 (irq 3)
azalia0: host: High Definition Audio rev. 1.0
azalia0: host: 4 output, 4 input, and 0 bidi streams
azalia_attach: resetting
azalia_attach: reset counter = 4999
azalia_attach: reset counter = 4984
azalia0: found a codec at #0
azalia_init_corb: CORB allocation succeeded.
azalia_init_corb: CORBWP=0; size=256
azalia_init_rirb: RIRB allocation succeeded.
azalia_init_rirb: RIRBRP=0, size=256
azalia0: codec[0] vid 0x11d41988, subid 0x81ec1043, rev. 4.0, HDA version 1.0
azalia_codec_init: nidstart=1 #functions=1
azalia_codec_init: FTYPE result = 0x00000001
azalia_codec_init: There are 60 widgets in the audio function.
        encodings=1<PCM>
        PCM formats=e07ff<24bit,20bit,16bit,192kHz,176.4kHz,96kHz,88.2kHz,48kHz,44.1kHz,32kHz,22.05kHz,16kHz,11.025kHz,8kHz>
        inamp: mute=1 size=0 steps=0 offset=0
        outamp: mute=0 size=5 steps=39 offset=39
        gpio: wake=0 unsol=1 gpis=0 gpos=0 gpios=2
azalia0: dac02 wcap=30311<DIGITAL,CONNLIST,FORMATOV,STEREO>
        encodings=5<AC3,PCM>
        PCM formats=e07e0<24bit,20bit,16bit,192kHz,176.4kHz,96kHz,88.2kHz,48kHz,44.1kHz>
        connections=0x1d; selected=0x1d
azalia0: dac03 wcap=405<POWER,OUTAMP,STEREO>
azalia0: dac04 wcap=405<POWER,OUTAMP,STEREO>
azalia0: dac05 wcap=405<POWER,OUTAMP,STEREO>
azalia0: dac06 wcap=405<POWER,OUTAMP,STEREO>
azalia0: adc07 wcap=130391<DIGITAL,CONNLIST,UNSOL,FORMATOV,STEREO>
        encodings=5<AC3,PCM>
        PCM formats=e07e0<24bit,20bit,16bit,192kHz,176.4kHz,96kHz,88.2kHz,48kHz,44.1kHz>
        connections=0x1c; selected=0x1c
azalia0: adc08 wcap=100501<POWER,CONNLIST,STEREO>
        connections=0xc; selected=0xc
azalia0: adc09 wcap=100501<POWER,CONNLIST,STEREO>
        connections=0xd; selected=0xd
azalia0: dac0a wcap=405<POWER,OUTAMP,STEREO>
azalia0: sel0b wcap=300301<DIGITAL,CONNLIST,STEREO>
        connections=0x8,0x9,0xf; selected=0x8
azalia0: sel0c wcap=30010d<CONNLIST,AMPOV,OUTAMP,STEREO>
        outamp: mute=1 size=5 steps=54 offset=39
        connections=0x38,0xbc,0x18,0x24,0x25,0x3d,0x20; selected=0x38
azalia0: sel0d wcap=30010d<CONNLIST,AMPOV,OUTAMP,STEREO>
        outamp: mute=1 size=5 steps=54 offset=39
        connections=0x38,0xbc,0x18,0x24,0x25,0x3d,0x20; selected=0x38
azalia0: sel0e wcap=30010d<CONNLIST,AMPOV,OUTAMP,STEREO>
        outamp: mute=1 size=5 steps=54 offset=39
        connections=0x38,0xbc,0x18,0x24,0x25,0x3d,0x20; selected=0x38
azalia0: adc0f wcap=100501<POWER,CONNLIST,STEREO>
        connections=0xe; selected=0xe
azalia0: beep10 wcap=70000c<AMPOV,OUTAMP>
        outamp: mute=1 size=11 steps=15 offset=15
azalia0: green11 wcap=40018d<CONNLIST,UNSOL,AMPOV,OUTAMP,STEREO>
        cap=373f<VREF100,VREF80,VREFGND,VREF50,VREFHIZ,INPUT,OUTPUT,HEADPHONE,PRESENCE,TRIGGER,IMPEDANCE>
        [03/00] color=green device=hp conn=jack conntype=1/8
        location=front chassis=external special=none
        outamp: mute=1 size=0 steps=0 offset=0
        connections=0x22; selected=0x22
azalia0: green12 wcap=40018d<CONNLIST,UNSOL,AMPOV,OUTAMP,STEREO>
        cap=373f<VREF100,VREF80,VREFGND,VREF50,VREFHIZ,INPUT,OUTPUT,HEADPHONE,PRESENCE,TRIGGER,IMPEDANCE>
        [01/00] color=green device=line conn=jack conntype=1/8
        location=rear chassis=external special=none
        outamp: mute=1 size=0 steps=0 offset=0
        connections=0x29; selected=0x29
azalia0: black13 wcap=40010c<CONNLIST,AMPOV,OUTAMP>
        cap=10<OUTPUT>
        [15/00] color=black device=spkr conn=none conntype=analog
        location=rear chassis=internal special=none
        outamp: mute=1 size=5 steps=31 offset=31
        connections=0x2d; selected=0x2d
azalia0: pink14 wcap=40018d<CONNLIST,UNSOL,AMPOV,OUTAMP,STEREO>
        cap=373f<VREF100,VREF80,VREFGND,VREF50,VREFHIZ,INPUT,OUTPUT,HEADPHONE,PRESENCE,TRIGGER,IMPEDANCE>
        [02/02] color=pink device=mic conn=jack conntype=1/8
        location=front chassis=external special=none
        outamp: mute=1 size=0 steps=0 offset=0
        connections=0x2b; selected=0x2b
azalia0: blue15 wcap=40018d<CONNLIST,UNSOL,AMPOV,OUTAMP,STEREO>
        cap=3737<VREF100,VREF80,VREFGND,VREF50,VREFHIZ,INPUT,OUTPUT,PRESENCE,TRIGGER,IMPEDANCE>
        [02/01] color=blue device=line conn=jack conntype=1/8
        location=rear chassis=external special=none
        outamp: mute=1 size=0 steps=0 offset=0
        connections=0x2c; selected=0x2c
azalia0: black16 wcap=40018d<CONNLIST,UNSOL,AMPOV,OUTAMP,STEREO>
        cap=3737<VREF100,VREF80,VREFGND,VREF50,VREFHIZ,INPUT,OUTPUT,PRESENCE,TRIGGER,IMPEDANCE>
        [01/02] color=black device=line conn=jack conntype=1/8
        location=rear chassis=external special=none
        outamp: mute=1 size=0 steps=0 offset=0
        connections=0x2a; selected=0x2a
azalia0: pink17 wcap=40098d<LRSWAP,CONNLIST,UNSOL,AMPOV,OUTAMP,STEREO>
        cap=3737<VREF100,VREF80,VREFGND,VREF50,VREFHIZ,INPUT,OUTPUT,PRESENCE,TRIGGER,IMPEDANCE>
        [02/00] color=pink device=mic conn=jack conntype=1/8
        location=rear chassis=external special=none
        outamp: mute=1 size=0 steps=0 offset=0
        connections=0x26; selected=0x26
azalia0: black18 wcap=400001<STEREO>
        cap=20<INPUT>
        [02/14] color=black device=cd conn=fixed conntype=atapi
        location=spec2 chassis=internal special=atapi
azalia0: pow19 wcap=500500<POWER,CONNLIST>
        connections=0x20,0x21; selected=0x20
azalia0: black1a wcap=400000
        cap=20<INPUT>
        [15/00] color=black device=line conn=fixed conntype=analog
        location=rear chassis=internal special=none
azalia0: other1b wcap=40030d<DIGITAL,CONNLIST,AMPOV,OUTAMP,STEREO>
        cap=10<OUTPUT>
        [15/00] color=other device=SPDIF-out conn=jack conntype=optical
        location=rear chassis=external special=none
        outamp: mute=1 size=5 steps=39 offset=39
        connections=0x2; selected=0x2
azalia0: other1c wcap=40020b<DIGITAL,AMPOV,INAMP,STEREO>
        cap=20<INPUT>
        [15/00] color=other device=SPDIF-in conn=none conntype=optical
        location=rear chassis=external special=none
        inamp: mute=1 size=5 steps=31 offset=23
azalia0: mix1d wcap=200303<DIGITAL,CONNLIST,INAMP,STEREO>
        connections=0x1,0xb; selected=0x1
azalia0: mix1e wcap=200103<CONNLIST,INAMP,STEREO>
        connections=0x36,0x21; selected=0x36
azalia0: volume1f wcap=600080<UNSOL>
        delta=1 steps=63
azalia0: mix20 wcap=20010b<CONNLIST,AMPOV,INAMP,STEREO>
        inamp: mute=1 size=5 steps=31 offset=23
        connections=0x39,0x33,0x38,0x3d,0x34,0x3b,0x18,0x1a; selected=0x39
azalia0: sel21 wcap=30010d<CONNLIST,AMPOV,OUTAMP,STEREO>
        outamp: mute=1 size=5 steps=31 offset=31
        connections=0x20; selected=0x20
azalia0: mix22 wcap=200103<CONNLIST,INAMP,STEREO>
        connections=0x37,0x21; selected=0x37
azalia0: vendor23 wcap=f00100<CONNLIST>
        connections=0x11,0x98,0x24,0x25,0x38,0xbd,0x20,0x21; selected=0x11
azalia0: orange24 wcap=40098d<LRSWAP,CONNLIST,UNSOL,AMPOV,OUTAMP,STEREO>
        cap=37<INPUT,OUTPUT,PRESENCE,TRIGGER,IMPEDANCE>
        [01/01] color=orange device=line conn=jack conntype=1/8
        location=rear chassis=external special=none
        outamp: mute=1 size=0 steps=0 offset=0
        connections=0x27; selected=0x27
azalia0: gray25 wcap=40018d<CONNLIST,UNSOL,AMPOV,OUTAMP,STEREO>
        cap=37<INPUT,OUTPUT,PRESENCE,TRIGGER,IMPEDANCE>
        [01/03] color=gray device=line conn=jack conntype=1/8
        location=rear chassis=external special=none
        outamp: mute=1 size=0 steps=0 offset=0
        connections=0x28; selected=0x28
azalia0: mix26 wcap=200103<CONNLIST,INAMP,STEREO>
        connections=0x32,0x21; selected=0x32
azalia0: mix27 wcap=200103<CONNLIST,INAMP,STEREO>
        connections=0x5,0x21; selected=0x5
azalia0: mix28 wcap=200103<CONNLIST,INAMP,STEREO>
        connections=0xa,0x21; selected=0xa
azalia0: mix29 wcap=200103<CONNLIST,INAMP,STEREO>
        connections=0x4,0x21; selected=0x4
azalia0: mix2a wcap=200103<CONNLIST,INAMP,STEREO>
        connections=0x6,0x21; selected=0x6
azalia0: mix2b wcap=200103<CONNLIST,INAMP,STEREO>
        connections=0x30,0x21; selected=0x30
azalia0: mix2c wcap=200103<CONNLIST,INAMP,STEREO>
        connections=0x31,0x21; selected=0x31
azalia0: mix2d wcap=200100<CONNLIST>
        connections=0x1e; selected=0x1e
azalia0: vendor2e wcap=f00000
azalia0: vendor2f wcap=f00100<CONNLIST>
        connections=0x11,0x12,0x14,0x15,0x16,0x17; selected=0x11
azalia0: sel30 wcap=300101<CONNLIST,STEREO>
        connections=0x3,0x4,0x6; selected=0x3
azalia0: sel31 wcap=300101<CONNLIST,STEREO>
        connections=0x4,0xa; selected=0x4
azalia0: sel32 wcap=300101<CONNLIST,STEREO>
        connections=0x5,0x4; selected=0x5
azalia0: sel33 wcap=300101<CONNLIST,STEREO>
        connections=0x3a,0x25,0x24; selected=0x3a
azalia0: sel34 wcap=300101<CONNLIST,STEREO>
        connections=0x3c,0x25,0x24; selected=0x3c
azalia0: vendor35 wcap=f00000
azalia0: sel36 wcap=300101<CONNLIST,STEREO>
        connections=0x3,0x4,0x6; selected=0x3
azalia0: sel37 wcap=300101<CONNLIST,STEREO>
        connections=0x3,0x4,0x6; selected=0x3
azalia0: sel38 wcap=30010d<CONNLIST,AMPOV,OUTAMP,STEREO>
        outamp: mute=0 size=39 steps=3 offset=0
        connections=0x11; selected=0x11
azalia0: sel39 wcap=30010d<CONNLIST,AMPOV,OUTAMP,STEREO>
        outamp: mute=0 size=39 steps=3 offset=0
        connections=0x14; selected=0x14
azalia0: sel3a wcap=30010d<CONNLIST,AMPOV,OUTAMP,STEREO>
        outamp: mute=0 size=39 steps=3 offset=0
        connections=0x15; selected=0x15
azalia0: sel3b wcap=30010d<CONNLIST,AMPOV,OUTAMP,STEREO>
        outamp: mute=0 size=39 steps=3 offset=0
        connections=0x16; selected=0x16
azalia0: sel3c wcap=30010d<CONNLIST,AMPOV,OUTAMP,STEREO>
        outamp: mute=0 size=39 steps=3 offset=0
        connections=0x17; selected=0x17
azalia0: sel3d wcap=30010d<CONNLIST,AMPOV,OUTAMP,STEREO>
        outamp: mute=0 size=39 steps=3 offset=0
        connections=0x12; selected=0x12
azalia_generic_codec_add_convgroup: looking for analog DACs
        pin=12, assoc=1, seq=0: conv=03 conv=04 conv=05 conv=06 conv=0a
azalia_generic_codec_add_convgroup: looking for digital DACs
azalia_generic_codec_add_convgroup: looking for analog ADCs
        pin=17, assoc=2, seq=0: conv=08 conv=09 conv=0f
azalia_generic_codec_add_convgroup: looking for digital ADCs
azalia_codec_init: dacgroup[0]: 03 04 05 06 0a
azalia_codec_init: adcgroup[0]: 08 09 0f
azalia0: codecs: Analog Devices AD1988A
audio0 at azalia0
ppb1 at pci0 dev 28 function 0 "Intel 82801H PCIE" rev 0x02: apic 2 int 16 (irq 11)
pci2 at ppb1 bus 3
ppb2 at pci0 dev 28 function 4 "Intel 82801H PCIE" rev 0x02: apic 2 int 16 (irq 11)
pci3 at ppb2 bus 2
jmb0 at pci3 dev 0 function 0 "JMicron JMB363 IDE/SATA" rev 0x02
ahci0 at jmb0: apic 2 int 16 (irq 11), AHCI 1.0
scsibus0 at ahci0: 32 targets, initiator 32
pciide0 at jmb0: DMA, channel 0 wired to native-PCI, channel 1 wired to native-PCI
pciide0: using apic 2 int 16 (irq 11) for native-PCI interrupt
atapiscsi0 at pciide0 channel 0 drive 0
scsibus1 at atapiscsi0: 2 targets, initiator 7
cd0 at scsibus1 targ 0 lun 0: <PLEXTOR, DVDR PX-740A, 1.00> ATAPI 5/cdrom removable
cd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2
pciide0: channel 1 disabled (no drives)
uhci2 at pci0 dev 29 function 0 "Intel 82801H USB" rev 0x02: apic 2 int 23 (irq 7)
uhci3 at pci0 dev 29 function 1 "Intel 82801H USB" rev 0x02: apic 2 int 19 (irq 10)
uhci4 at pci0 dev 29 function 2 "Intel 82801H USB" rev 0x02: apic 2 int 18 (irq 15)
ehci1 at pci0 dev 29 function 7 "Intel 82801H USB" rev 0x02: apic 2 int 23 (irq 7)
usb1 at ehci1: USB revision 2.0
uhub1 at usb1 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb3 at pci0 dev 30 function 0 "Intel 82801BA Hub-to-PCI" rev 0xf2
pci4 at ppb3 bus 4
re0 at pci4 dev 1 function 0 "D-Link Systems DGE-528T" rev 0x10: RTL8169/8110SB (0x1000), apic 2 int 22 (irq 3), address 00:21:91:11:dd:5e
rgephy0 at re0 phy 7: RTL8169S/8110S PHY, rev. 3
pcib0 at pci0 dev 31 function 0 "Intel 82801H LPC" rev 0x02
pciide1 at pci0 dev 31 function 2 "Intel 82801H SATA" rev 0x02: DMA, channel 0 configured to native-PCI, channel 1 configured to native-PCI
pciide1: using apic 2 int 19 (irq 10) for native-PCI interrupt
wd0 at pciide1 channel 0 drive 0: <SAMSUNG HD321KJ>
wd0: 16-sector PIO, LBA48, 305245MB, 625142448 sectors
wd0(pciide1:0:0): using PIO mode 4, Ultra-DMA mode 5
ichiic0 at pci0 dev 31 function 3 "Intel 82801H SMBus" rev 0x02: apic 2 int 18 (irq 10)
iic0 at ichiic0
spdmem0 at iic0 addr 0x50: 1GB DDR2 SDRAM non-parity PC2-5300CL5
spdmem1 at iic0 addr 0x51: 1GB DDR2 SDRAM non-parity PC2-5300CL5
spdmem2 at iic0 addr 0x52: 1GB DDR2 SDRAM non-parity PC2-5300CL5
spdmem3 at iic0 addr 0x53: 1GB DDR2 SDRAM non-parity PC2-5300CL5
pciide2 at pci0 dev 31 function 5 "Intel 82801H SATA" rev 0x02: DMA, channel 0 wired to native-PCI, channel 1 wired to native-PCI
pciide2: using apic 2 int 19 (irq 10) for native-PCI interrupt
usb2 at uhci0: USB revision 1.0
uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb3 at uhci1: USB revision 1.0
uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb4 at uhci2: USB revision 1.0
uhub4 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb5 at uhci3: USB revision 1.0
uhub5 at usb5 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb6 at uhci4: USB revision 1.0
uhub6 at usb6 "Intel UHCI root hub" rev 1.00/1.00 addr 1
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: <PC speaker>
spkr0 at pcppi0
wbsio0 at isa0 port 0x2e/2: W83627DHG rev 0x23
lm1 at wbsio0 port 0x290/8: W83627DHG
mtrr: Pentium Pro MTRR support
uvideo0 at uhub1 port 5 configuration 1 interface 0 "Logitech QuickCam E 3500 Plus" rev 2.00/0.06 addr 2
video0 at uvideo0
uaudio0 at uhub1 port 5 configuration 1 interface 2 "Logitech QuickCam E 3500 Plus" rev 2.00/0.06 addr 2
uaudio0: audio rev 1.00, 2 mixer controls
audio1 at uaudio0
uhidev0 at uhub5 port 1 configuration 1 interface 0 "Logitech USB-PS/2 Optical Mouse" rev 2.00/20.00 addr 2
uhidev0: iclass 3/1
ums0 at uhidev0: 3 buttons, Z dir
wsmouse0 at ums0 mux 0
ugen0 at uhub5 port 2 "American Power Conversion Back-UPS CS 650 FW:817.v4.I USB FW:v4" rev 1.10/0.06 addr 3
softraid0 at root
root on wd0a swap on wd0b dump on wd0b

inputs.dac2=198,198
inputs.dac3=126,126
inputs.dac4=126,126
inputs.dac5=126,126
inputs.dac6=126,126
inputs.sel_source=adc2  [ adc2 adc3 adc4 ]
inputs.sel2_source=sel13  [ sel13 cd line5 line6 sel18 mix3 ]
outputs.sel2_mute=off  [ off on ]
outputs.sel2=124,124
inputs.sel3_source=sel13  [ sel13 cd line5 line6 sel18 mix3 ]
outputs.sel3_mute=off  [ off on ]
outputs.sel3=124,124
inputs.sel4_source=sel13  [ sel13 cd line5 line6 sel18 mix3 ]
outputs.sel4_mute=off  [ off on ]
outputs.sel4=124,124
inputs.beep_mute=off  [ off on ]
inputs.beep=119
outputs.hp_mute=off  [ off on ]
outputs.hp_dir=output  [ input output ]
outputs.hp_boost=off  [ off on ]
outputs.line_mute=off  [ off on ]
outputs.line_dir=output  [ input output ]
outputs.line_boost=off  [ off on ]
outputs.mic_mute=off  [ off on ]
outputs.mic_dir=input  [ input output ]
outputs.mic_boost=off  [ off on ]
outputs.line2_mute=off  [ off on ]
outputs.line2_dir=input  [ input output ]
outputs.line3_mute=off  [ off on ]
outputs.line3_dir=output  [ input output ]
outputs.mic2_mute=off  [ off on ]
outputs.mic2_dir=input  [ input output ]
outputs.SPDIF-out_mute=off  [ off on ]
outputs.SPDIF-out=126,126
inputs.mix_hdaudio_mut=off  [ off on ]
inputs.mix_sel_mute=off  [ off on ]
inputs.mix2_sel11_mute=off  [ off on ]
inputs.mix2_sel5_mute=off  [ off on ]
outputs.volume=124
inputs.mix3_sel14_mute=off  [ off on ]
inputs.mix3_sel9_mute=off  [ off on ]
inputs.mix3_sel13_mute=off  [ off on ]
inputs.mix3_sel18_mute=off  [ off on ]
inputs.mix3_sel10_mute=off  [ off on ]
inputs.mix3_sel16_mute=off  [ off on ]
inputs.mix3_cd_mute=off  [ off on ]
inputs.mix3_line4_mute=off  [ off on ]
inputs.mix3_sel14=120,120
inputs.mix3_sel9=120,120
inputs.mix3_sel13=120,120
inputs.mix3_sel18=120,120
inputs.mix3_sel10=120,120
inputs.mix3_sel16=120,120
inputs.mix3_cd=120,120
inputs.mix3_line4=120
outputs.sel5_mute=off  [ off on ]
outputs.sel5=120,120
inputs.mix4_sel12_mute=off  [ off on ]
inputs.mix4_sel5_mute=off  [ off on ]
outputs.vendor_source=hp  [ hp line5 line6 sel13 mix3 sel5 ]
outputs.line5_mute=off  [ off on ]
outputs.line5_dir=output  [ input output ]
outputs.line6_mute=off  [ off on ]
outputs.line6_dir=output  [ input output ]
inputs.mix5_sel8_mute=off  [ off on ]
inputs.mix5_sel5_mute=off  [ off on ]
inputs.mix6_dac4_mute=off  [ off on ]
inputs.mix6_sel5_mute=off  [ off on ]
inputs.mix7_dac6_mute=off  [ off on ]
inputs.mix7_sel5_mute=off  [ off on ]
inputs.mix8_dac3_mute=off  [ off on ]
inputs.mix8_sel5_mute=off  [ off on ]
inputs.mix9_dac5_mute=off  [ off on ]
inputs.mix9_sel5_mute=off  [ off on ]
inputs.mix10_sel6_mute=off  [ off on ]
inputs.mix10_sel5_mute=off  [ off on ]
inputs.mix11_sel7_mute=off  [ off on ]
inputs.mix11_sel5_mute=off  [ off on ]
outputs.vendor3_source=hp  [ hp line mic line2 line3 mic2 ]
inputs.sel6_source=dac2  [ dac2 dac3 dac5 ]
inputs.sel7_source=dac3  [ dac3 dac6 ]
inputs.sel8_source=dac4  [ dac4 dac3 ]
inputs.sel9_source=sel15  [ sel15 line6 line5 ]
inputs.sel10_source=sel17  [ sel17 line6 line5 ]
inputs.sel11_source=dac2  [ dac2 dac3 dac5 ]
inputs.sel12_source=dac2  [ dac2 dac3 dac5 ]
outputs.sel13=85,85
outputs.sel14=85,85
outputs.sel15=85,85
outputs.sel16=85,85
outputs.sel17=85,85
outputs.sel18=85,85
outputs.hp_sense=unplugged  [ unplugged plugged ]
outputs.line_sense=plugged  [ unplugged plugged ]
outputs.mic_sense=unplugged  [ unplugged plugged ]
outputs.line2_sense=unplugged  [ unplugged plugged ]
outputs.line3_sense=plugged  [ unplugged plugged ]
outputs.mic2_sense=unplugged  [ unplugged plugged ]
outputs.line5_sense=unplugged  [ unplugged plugged ]
outputs.line6_sense=unplugged  [ unplugged plugged ]
outputs.master=198,198

Reply | Threaded
Open this post in threaded view
|

Re: azalia: better conveter group configuration

Alexandre Ratchov-2
In reply to this post by j4nKy
On Tue, Nov 25, 2008 at 10:36:13PM +0000, Jacob Meuser wrote:

> On Mon, Nov 24, 2008 at 05:58:23AM +0000, Jacob Meuser wrote:
> > On Sun, Nov 23, 2008 at 09:32:03PM +0000, Jacob Meuser wrote:
> > > this is an important patch to test on all azalia.
>
> really, it is.  if we don't get this right, we will never be able
> to get meaningful names in azalia's mixer.
>
> it's working correctly in most cases, but the hard ones are really
> hard.  here's a new version which adds just a bit more useful
> debug output and silences some we don't need right now.
>
> please also see http://jakemsr.trancell.org/
>

I believe Jacob changes will also help us overally improving the
mixer, not only the azalia one.

-- Alexandre

Reply | Threaded
Open this post in threaded view
|

Re: azalia: better conveter group configuration

guilherme m. schroeder-2
In reply to this post by j4nKy
Jacob,

Here's dmesg and mixerctl with your new patch.

OpenBSD 4.4-current (GENERIC.MP) #1: Tue Nov 25 22:28:20 BRST 2008
    root@dub:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 3694911488 (3523MB)
avail mem = 3585921024 (3419MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xf6590 (57 entries)
bios0: vendor Dell Inc. version "A06" date 10/10/2008
bios0: Dell Inc. Latitude E6400
acpi0 at bios0: rev 2
acpi0: tables DSDT FACP HPET DMAR APIC ASF! MCFG SLIC TCPA SSDT
acpi0: wakeup devices PCI0(S4) PCIE(S4) USB1(S0) USB2(S0) USB3(S0) USB4(S0) USB5(S0) USB6(S0) EHC2(S0) EHCI(S0) AZAL(S3) RP01(S4) RP02(S4) RP03(S4) RP04(S3) RP05(S3) RP06(S5) LID_(S3) PBTN(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM)2 Duo CPU P8400 @ 2.26GHz, 2261.36 MHz
cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,SMX,EST,TM2,CX16,xTPR,NXE,LONG
cpu0: 3MB 64b/line 8-way L2 cache
cpu0: apic clock running at 266MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM)2 Duo CPU P8400 @ 2.26GHz, 2261.00 MHz
cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,SMX,EST,TM2,CX16,xTPR,NXE,LONG
cpu1: 3MB 64b/line 8-way L2 cache
ioapic0 at mainbus0 apid 2 pa 0xfec00000, version 20, 24 pins
ioapic0: misconfigured as apic 0, remapped to apid 2
acpiprt0 at acpi0: bus 3 (PCIE)
acpiprt1 at acpi0: bus -1 (AGP_)
acpiprt2 at acpi0: bus 11 (RP01)
acpiprt3 at acpi0: bus 12 (RP02)
acpiprt4 at acpi0: bus 13 (RP03)
acpiprt5 at acpi0: bus 14 (RP04)
acpiprt6 at acpi0: bus -1 (RP05)
acpiprt7 at acpi0: bus -1 (RP06)
acpiprt8 at acpi0: bus 0 (PCI0)
acpiec0 at acpi0
acpicpu0 at acpi0: C3, C2, C1, PSS
acpicpu1 at acpi0: C3, C2, C1, PSS
acpitz0 at acpi0: critical temperature 107 degC
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: PBTN
acpibtn2 at acpi0: SBTN
acpiac0 at acpi0: AC unit online
acpibat0 at acpi0: BAT0 model "DELL FU27488" serial 30161 type LION oem "Sony"
acpibat1 at acpi0: BAT1 not present
acpivideo at acpi0 not configured
acpivideo at acpi0 not configured
acpivideo at acpi0 not configured
cpu0: Enhanced SpeedStep 2261 MHz: speeds: 2268, 2267, 1600, 800 MHz
pci0 at mainbus0 bus 0: configuration mode 1
pchb0 at pci0 dev 0 function 0 "Intel GM45 Host" rev 0x07
vga1 at pci0 dev 2 function 0 "Intel GM45 Video" rev 0x07
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
intagp at vga1 not configured
inteldrm0 at vga1
drm0 at inteldrm0: couldn't find agp
"Intel GM45 Video" rev 0x07 at pci0 dev 2 function 1 not configured
em0 at pci0 dev 25 function 0 "Intel ICH9 IGP M AMT" rev 0x03: apic 2 int 22 (irq 10), address 00:21:70:a5:77:b8
uhci0 at pci0 dev 26 function 0 "Intel 82801I USB" rev 0x03: apic 2 int 20 (irq 7)
uhci1 at pci0 dev 26 function 1 "Intel 82801I USB" rev 0x03: apic 2 int 21 (irq 4)
uhci2 at pci0 dev 26 function 2 "Intel 82801I USB" rev 0x03: apic 2 int 22 (irq 10)
ehci0 at pci0 dev 26 function 7 "Intel 82801I USB" rev 0x03: apic 2 int 22 (irq 10)
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
azalia0 at pci0 dev 27 function 0 "Intel 82801I HD Audio" rev 0x03: apic 2 int 21 (irq 4)
azalia0: host: High Definition Audio rev. 1.0
azalia0: host: 4 output, 4 input, and 0 bidi streams
azalia_attach: resetting
azalia_attach: reset counter = 5000
azalia_attach: reset counter = 4985
azalia0: found a codec at #0
azalia0: found a codec at #2
azalia_init_corb: CORB allocation succeeded.
azalia_init_corb: CORBWP=0; size=256
azalia_init_rirb: RIRB allocation succeeded.
azalia_init_rirb: RIRBRP=0, size=256
azalia0: codec[0] vid 0x111d76b2, subid 0x02331028, rev. 3.2, HDA version 1.0
azalia_codec_init: nidstart=1 #functions=1
azalia_codec_init: FTYPE result = 0x00000101
azalia_codec_init: There are 31 widgets in the audio function.
        encodings=1<PCM>
        PCM formats=e07e0<24bit,20bit,16bit,192kHz,176.4kHz,96kHz,88.2kHz,48kHz,44.1kHz>
        inamp: mute=1 size=0 steps=0 offset=0
        outamp: mute=1 size=2 steps=127 offset=127
        gpio: wake=1 unsol=1 gpis=0 gpos=0 gpios=8
azalia0: black0a wcap=400181<CONNLIST,UNSOL,STEREO>
        cap=1c<OUTPUT,HEADPHONE,PRESENCE>
        [01/15] color=black device=hp conn=jack conntype=1/8
        location=right chassis=external special=none
        connections=0x10,0x11,0x17; selected=0x10
azalia0: black0b wcap=400081<UNSOL,STEREO>
        cap=1724<VREF80,VREFGND,VREF50,VREFHIZ,INPUT,PRESENCE>
        [02/01] color=black device=mic conn=jack conntype=1/8
        location=right chassis=external special=none
azalia0: unknown0c wcap=400081<UNSOL,STEREO>
        cap=1724<VREF80,VREFGND,VREF50,VREFHIZ,INPUT,PRESENCE>
        [15/00] color=unknown device=other conn=none conntype=unknown
        location=n/a chassis=external special=none
azalia0: unknown0d wcap=400181<CONNLIST,UNSOL,STEREO>
        cap=14<OUTPUT,PRESENCE>
        [01/00] color=unknown device=spkr conn=fixed conntype=analog
        location=n/a chassis=internal special=none
        connections=0x10,0x11,0x17; selected=0x10
azalia0: black0e wcap=400081<UNSOL,STEREO>
        cap=1724<VREF80,VREFGND,VREF50,VREFHIZ,INPUT,PRESENCE>
        [02/14] color=black device=mic conn=jack conntype=1/8
        location=left chassis=separate special=none
azalia0: black0f wcap=400181<CONNLIST,UNSOL,STEREO>
        cap=14<OUTPUT,PRESENCE>
        [05/00] color=black device=line conn=jack conntype=1/8
        location=left chassis=separate special=none
        connections=0x10,0x11,0x17; selected=0x10
azalia0: dac10 wcap=d0c05<LRSWAP,POWER,OUTAMP,STEREO>
azalia0: dac11 wcap=d0c05<LRSWAP,POWER,OUTAMP,STEREO>
azalia0: adc12 wcap=1d0541<POWER,CONNLIST,PROC,STEREO>
        connections=0x1c; selected=0x1c
azalia0: adc13 wcap=1d0541<POWER,CONNLIST,PROC,STEREO>
        connections=0x1d; selected=0x1d
azalia0: unknown14 wcap=400100<CONNLIST>
        cap=10<OUTPUT>
        [15/02] color=unknown device=other conn=none conntype=unknown
        location=n/a chassis=external special=none
        connections=0x16; selected=0x16
azalia0: sel15 wcap=300101<CONNLIST,STEREO>
        connections=0x10,0x11,0x17; selected=0x10
azalia0: mix16 wcap=200100<CONNLIST>
        connections=0x15; selected=0x15
azalia0: mix17 wcap=20010b<CONNLIST,AMPOV,INAMP,STEREO>
        inamp: mute=1 size=5 steps=31 offset=23
        connections=0x10,0x11,0x27,0x1a,0x1b; selected=0x10
azalia0: unknown18 wcap=40000d<AMPOV,OUTAMP,STEREO>
        cap=20<INPUT>
        [10/00] color=unknown device=mic conn=fixed conntype=digital
        location=n/a chassis=internal special=none
        outamp: mute=0 size=39 steps=3 offset=0
azalia0: unknown19 wcap=40000d<AMPOV,OUTAMP,STEREO>
        cap=20<INPUT>
        [15/04] color=unknown device=other conn=none conntype=unknown
        location=n/a chassis=external special=none
        outamp: mute=0 size=39 steps=3 offset=0
azalia0: sel1a wcap=30010d<CONNLIST,AMPOV,OUTAMP,STEREO>
        outamp: mute=0 size=39 steps=3 offset=0
        connections=0xb,0xc,0xe; selected=0xb
azalia0: sel1b wcap=30010d<CONNLIST,AMPOV,OUTAMP,STEREO>
        outamp: mute=0 size=39 steps=3 offset=0
        connections=0xb,0xc,0xe; selected=0xb
azalia0: sel1c wcap=30090d<LRSWAP,CONNLIST,AMPOV,OUTAMP,STEREO>
        outamp: mute=1 size=5 steps=15 offset=0
        connections=0x1a,0x17,0x18,0x19; selected=0x1a
azalia0: sel1d wcap=30090d<LRSWAP,CONNLIST,AMPOV,OUTAMP,STEREO>
        outamp: mute=1 size=5 steps=15 offset=0
        connections=0x1b,0x17,0x18,0x19; selected=0x1b
azalia0: unknown1e wcap=400301<DIGITAL,CONNLIST,STEREO>
        cap=10<OUTPUT>
        [15/05] color=unknown device=other conn=none conntype=unknown
        location=n/a chassis=external special=none
        connections=0x24; selected=0x24
azalia0: unknown1f wcap=400701<POWER,DIGITAL,CONNLIST,STEREO>
        cap=10010<EAPD,OUTPUT>
        [15/06] color=unknown device=other conn=none conntype=unknown
        location=n/a chassis=external special=none
        connections=0x24,0x25; selected=0x24
azalia0: unknown20 wcap=400301<DIGITAL,CONNLIST,STEREO>
        cap=10<OUTPUT>
        [15/07] color=unknown device=other conn=none conntype=unknown
        location=n/a chassis=external special=none
        connections=0x25; selected=0x25
azalia0: dac21 wcap=40211<DIGITAL,FORMATOV,STEREO>
        encodings=5<AC3,PCM>
        PCM formats=e07e0<24bit,20bit,16bit,192kHz,176.4kHz,96kHz,88.2kHz,48kHz,44.1kHz>
azalia0: dac22 wcap=40211<DIGITAL,FORMATOV,STEREO>
        encodings=5<AC3,PCM>
        PCM formats=e07e0<24bit,20bit,16bit,192kHz,176.4kHz,96kHz,88.2kHz,48kHz,44.1kHz>
azalia0: vendor23 wcap=f00000
azalia0: sel24 wcap=300101<CONNLIST,STEREO>
        connections=0x21,0x1c,0x1d; selected=0x21
azalia0: sel25 wcap=300101<CONNLIST,STEREO>
        connections=0x22,0x1c,0x1d; selected=0x22
azalia0: beep26 wcap=70000c<AMPOV,OUTAMP>
        outamp: mute=1 size=23 steps=3 offset=3
azalia0: unknown27 wcap=400000
        cap=20<INPUT>
        [15/00] color=unknown device=other conn=none conntype=unknown
        location=n/a chassis=external special=none
azalia0: volume28 wcap=600000
        delta=1 steps=127
azalia_generic_codec_add_convgroup: looking for analog DACs
        pin=0d, assoc=1, seq=0: conv=10 conv=11
azalia_generic_codec_add_convgroup: looking for digital DACs
azalia_generic_codec_add_convgroup: looking for analog ADCs
        pin=0b, assoc=2, seq=1: conv=12 conv=13
azalia_generic_codec_add_convgroup: looking for digital ADCs
azalia_codec_init: dacgroup[0]: 10 11
azalia_codec_init: adcgroup[0]: 12 13
azalia0: codec[2] vid 0x80862802, subid 0x02331028, rev. 0.0, HDA version 1.0
azalia_codec_init: nidstart=1 #functions=1
azalia_codec_init: FTYPE result = 0x00000001
azalia_codec_init: There are 2 widgets in the audio function.
        encodings=0
        PCM formats=0
        inamp: mute=0 size=0 steps=0 offset=0
        outamp: mute=0 size=0 steps=0 offset=0
        gpio: wake=0 unsol=0 gpis=0 gpos=0 gpios=0
azalia0: dac02 wcap=6211<DIGITAL,FORMATOV,STEREO>
        encodings=5<AC3,PCM>
        PCM formats=1e07f0<32bit,24bit,20bit,16bit,192kHz,176.4kHz,96kHz,88.2kHz,48kHz,44.1kHz,32kHz>
azalia0: unknown03 wcap=40739d<DIGITAL,CONNLIST,UNSOL,FORMATOV,AMPOV,OUTAMP,STEREO>
        encodings=94<AC3>
        PCM formats=18560010<32bit,20bit,16bit,32kHz>
        cap=94<OUTPUT,PRESENCE>
        [01/00] color=unknown device=digital-out conn=jack conntype=digital
        location=spec1 chassis=internal special=hdmi
        outamp: mute=1 size=0 steps=0 offset=0
        connections=0x2; selected=0x2
azalia_generic_codec_add_convgroup: looking for analog DACs
azalia_generic_codec_add_convgroup: looking for digital DACs
        pin=03, assoc=1, seq=0: conv=02
azalia_generic_codec_add_convgroup: looking for analog ADCs
azalia_generic_codec_add_convgroup: looking for digital ADCs
azalia_codec_init: dacgroup[0]: 02
azalia0: invalid ADC PCM format: 0x00000000
azalia0: codecs: IDT/0x76b2, Intel/0x2802, using IDT/0x76b2
audio0 at azalia0
ppb0 at pci0 dev 28 function 0 "Intel 82801I PCIE" rev 0x03: apic 2 int 16 (irq 0)
pci1 at ppb0 bus 11
ppb1 at pci0 dev 28 function 1 "Intel 82801I PCIE" rev 0x03: apic 2 int 17 (irq 0)
pci2 at ppb1 bus 12
iwn0 at pci2 dev 0 function 0 "Intel WiFi Link 5300AGN" rev 0x00: apic 2 int 17 (irq 3), MIMO 3T3R, MoW, address 00:16:ea:5e:dc:32
ppb2 at pci0 dev 28 function 2 "Intel 82801I PCIE" rev 0x03: apic 2 int 18 (irq 0)
pci3 at ppb2 bus 13
ppb3 at pci0 dev 28 function 3 "Intel 82801I PCIE" rev 0x03: apic 2 int 19 (irq 0)
pci4 at ppb3 bus 14
uhci3 at pci0 dev 29 function 0 "Intel 82801I USB" rev 0x03: apic 2 int 20 (irq 7)
uhci4 at pci0 dev 29 function 1 "Intel 82801I USB" rev 0x03: apic 2 int 21 (irq 4)
uhci5 at pci0 dev 29 function 2 "Intel 82801I USB" rev 0x03: apic 2 int 22 (irq 10)
ehci1 at pci0 dev 29 function 7 "Intel 82801I USB" rev 0x03: apic 2 int 20 (irq 7)
usb1 at ehci1: USB revision 2.0
uhub1 at usb1 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb4 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0x93
pci5 at ppb4 bus 3
"Ricoh 5C832 Firewire" rev 0x04 at pci5 dev 1 function 0 not configured
sdhc0 at pci5 dev 1 function 1 "Ricoh 5C822 SD/MMC" rev 0x21: apic 2 int 18 (irq 11)
sdmmc0 at sdhc0
sdhc1 at pci5 dev 1 function 2 "Ricoh 5C843 MMC" rev 0x11: apic 2 int 18 (irq 11)
sdhc1: base clock frequency unknown
sdhc1 at 0x10: can't initialize host
pcib0 at pci0 dev 31 function 0 "Intel 82801IEM LPC" rev 0x03
ahci0 at pci0 dev 31 function 2 "Intel 82801I AHCI" rev 0x03: apic 2 int 19 (irq 10), AHCI 1.2
scsibus0 at ahci0: 32 targets, initiator 32
sd0 at scsibus0 targ 0 lun 0: <ATA, ST980813ASG, 3.AD> SCSI3 0/direct fixed
sd0: 76319MB, 512 bytes/sec, 156301488 sec total
cd0 at scsibus0 targ 1 lun 0: <PLDS, DVD+-RW DU-8A2S, 4D12> ATAPI 5/cdrom removable
ichiic0 at pci0 dev 31 function 3 "Intel 82801I SMBus" rev 0x03: apic 2 int 17 (irq 3)
iic0 at ichiic0
spdmem0 at iic0 addr 0x50: 2GB DDR2 SDRAM non-parity PC2-6400CL5 SO-DIMM
spdmem1 at iic0 addr 0x52: 2GB DDR2 SDRAM non-parity PC2-6400CL5 SO-DIMM
usb2 at uhci0: USB revision 1.0
uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb3 at uhci1: USB revision 1.0
uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb4 at uhci2: USB revision 1.0
uhub4 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb5 at uhci3: USB revision 1.0
uhub5 at usb5 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb6 at uhci4: USB revision 1.0
uhub6 at usb6 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb7 at uhci5: USB revision 1.0
uhub7 at usb7 "Intel UHCI root hub" rev 1.00/1.00 addr 1
isa0 at pcib0
isadma0 at isa0
com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: <PC speaker>
spkr0 at pcppi0
mtrr: Pentium Pro MTRR support
ugen0 at uhub4 port 1 "Broadcom Corp 5880" rev 1.10/1.01 addr 2
uhidev0 at uhub5 port 2 configuration 1 interface 0 "Microsoft Basic Optical Mouse" rev 1.10/0.00 addr 2
uhidev0: iclass 3/1
ums0 at uhidev0: 3 buttons, Z dir
wsmouse1 at ums0 mux 0
softraid0 at root
root on sd0a swap on sd0b dump on sd0b

outputs.hp_source=dac  [ dac dac2 mix2 ]
outputs.hp_boost=off  [ off on ]
outputs.spkr_source=dac  [ dac dac2 mix2 ]
outputs.line_source=dac  [ dac dac2 mix2 ]
inputs.dac_mute=off  [ off on ]
inputs.dac=254,254
inputs.dac2_mute=off  [ off on ]
inputs.dac2=254,254
inputs.sel_source=dac  [ dac dac2 mix2 ]
inputs.mix2_dac_mute=off  [ off on ]
inputs.mix2_dac2_mute=off  [ off on ]
inputs.mix2_sel2_mute=off  [ off on ]
inputs.mix2_sel3_mute=off  [ off on ]
inputs.mix2_dac=248,248
inputs.mix2_dac2=248,248
inputs.mix2_sel2=248,248
inputs.mix2_sel3=248,248
outputs.mic3=255,255
inputs.sel2_source=mic  [ mic mic2 ]
outputs.sel2=255,255
inputs.sel3_source=mic  [ mic mic2 ]
outputs.sel3=255,255
inputs.sel4_source=sel2  [ sel2 mix2 mic3 ]
outputs.sel4_mute=off  [ off on ]
outputs.sel4=255,255
inputs.sel5_source=sel3  [ sel3 mix2 mic3 ]
outputs.sel5_mute=off  [ off on ]
outputs.sel5=255,255
inputs.sel6_source=dac3  [ dac3 sel4 sel5 ]
inputs.sel7_source=dac4  [ dac4 sel4 sel5 ]
inputs.beep_mute=off  [ off on ]
inputs.beep=255
outputs.volume=254
outputs.hp_sense=unplugged  [ unplugged plugged ]
outputs.mic_sense=plugged  [ unplugged plugged ]
outputs.mic2_sense=unplugged  [ unplugged plugged ]
outputs.line_sense=unplugged  [ unplugged plugged ]
outputs.master=254,254

I was seeing the information ALSA gives me and noticed this:

This is the headphone on ALSA:

Node 0x0a [Pin Complex] wcaps 0x400181: Stereo
  Pincap 0x0000001c: OUT HP Detect
  Pin Default 0x0421101f: [Jack] HP Out at Ext Right
    Conn = 1/8, Color = Black
    DefAssociation = 0x1, Sequence = 0xf
  Pin-ctls: 0x00:
  Unsolicited: tag=30, enabled=1
  Connection: 3
     0x10 0x11* 0x17

This is the headphone on OpenBSD:

azalia0: black0a wcap=400181<CONNLIST,UNSOL,STEREO>
        cap=1c<OUTPUT,HEADPHONE,PRESENCE>
        [01/15] color=black device=hp conn=jack conntype=1/8
        location=right chassis=external special=none
        connections=0x10,0x11,0x17; selected=0x10

ALSA uses 0x11 and OpenBSD selects 0x10. Maybe if i force it to 0x11 i can get sound on headphone?
There's a simple way to do that?

Thanks.

Reply | Threaded
Open this post in threaded view
|

Re: azalia: better conveter group configuration

Zak B. Elep-6
In reply to this post by j4nKy
Jacob Meuser writes:
> it's working correctly in most cases, but the hard ones are really
> hard.  here's a new version which adds just a bit more useful
> debug output and silences some we don't need right now.

Here's my updated dmesg:

OpenBSD 4.4-current (GENERIC.MP) #15: Wed Nov 26 11:24:33 PHT 2008
    [hidden email]:/usr/src/sys/arch/i386/compile/GENERIC.MP
cpu0: Genuine Intel(R) CPU T2300 @ 1.66GHz ("GenuineIntel" 686-class) 1.67 GHz
cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,EST,TM2,xTPR
real mem  = 1064726528 (1015MB)
avail mem = 1021304832 (973MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 06/21/06, BIOS32 rev. 0 @ 0xf0010, SMBIOS rev. 2.3 @ 0xfb340 (21 entries)
bios0: vendor American Megatrends Inc. version "A1057IMS V2.10" date 06/21/2006
bios0: MICRO-STAR INT'L CO.,LTD. MS-1057
acpi0 at bios0: rev 0
acpi0: tables DSDT FACP APIC MCFG OEMB ASF!
acpi0: wakeup devices P0PC(S4) USB0(S3) USB1(S3) USB2(S3) USB3(S3) EUSB(S3) MC97(S4) P0P7(S4) P0P8(S4) P0P9(S4) P0P1(S4) OZF1(S3) OZF2(S3) OZF3(S3) P0P5(S4) P0P4(S4) P0P3(S4) AZAL(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: apic clock running at 166MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Genuine Intel(R) CPU T2300 @ 1.66GHz ("GenuineIntel" 686-class) 1.67 GHz
cpu1: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,EST,TM2,xTPR
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 24 pins
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (P0P7)
acpiprt2 at acpi0: bus -1 (P0P8)
acpiprt3 at acpi0: bus -1 (P0P9)
acpiprt4 at acpi0: bus 1 (P0P1)
acpiprt5 at acpi0: bus 5 (P0P5)
acpiprt6 at acpi0: bus 4 (P0P4)
acpiprt7 at acpi0: bus 3 (P0P3)
acpiec0 at acpi0
acpicpu0 at acpi0: C3, C2
acpicpu1 at acpi0
acpitz0 at acpi0: critical temperature 99 degC
acpiac0 at acpi0: AC unit offline
acpibat0 at acpi0: BAT1 model "MS-1057
" serial
 type LION
 oem "MSI Corp.
"
acpibtn0 at acpi0: PWRB
acpibtn1 at acpi0: LID0
acpibtn2 at acpi0: SLPB
acpivideo at acpi0 not configured
bios0: ROM list: 0xc0000/0xe600! 0xce800/0x1000
cpu0: unknown Enhanced SpeedStep CPU, msr 0x06130a2c06000a2c
cpu0: using only highest and lowest power states
cpu0: Enhanced SpeedStep 1667 MHz (1404 mV): speeds: 1667, 1000 MHz
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 "Intel 82945GM Host" rev 0x03
vga1 at pci0 dev 2 function 0 "Intel 82945GM Video" rev 0x03
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
intagp0 at vga1
agp0 at intagp0: aperture at 0xd0000000, size 0x10000000
inteldrm0 at vga1
drm0 at inteldrm0
"Intel 82945GM Video" rev 0x03 at pci0 dev 2 function 1 not configured
azalia0 at pci0 dev 27 function 0 "Intel 82801GB HD Audio" rev 0x02: apic 2 int 17 (irq 11)
azalia0: host: High Definition Audio rev. 1.0
azalia0: host: 4 output, 4 input, and 0 bidi streams
azalia_attach: resetting
azalia_attach: reset counter = 4999
azalia_attach: reset counter = 4984
azalia0: found a codec at #0
azalia0: found a codec at #1
azalia_init_corb: CORB allocation succeeded.
azalia_init_corb: CORBWP=0; size=256
azalia_init_rirb: RIRB allocation succeeded.
azalia_init_rirb: RIRBRP=0, size=256
azalia0: codec[0] vid 0x10ec0882, subid 0x05711462, rev. 1.1, HDA version 1.0
azalia_codec_init: nidstart=1 #functions=1
azalia_codec_init: FTYPE result = 0x00000001
azalia_codec_init: There are 37 widgets in the audio function.
        encodings=1<PCM>
        PCM formats=e0560<24bit,20bit,16bit,192kHz,96kHz,48kHz,44.1kHz>
        inamp: mute=0 size=0 steps=0 offset=0
        outamp: mute=0 size=0 steps=0 offset=0
        gpio: wake=0 unsol=1 gpis=0 gpos=0 gpios=2
azalia0: dac02 wcap=11<FORMATOV,STEREO>
        encodings=1<PCM>
        PCM formats=e0560<24bit,20bit,16bit,192kHz,96kHz,48kHz,44.1kHz>
azalia0: dac03 wcap=11<FORMATOV,STEREO>
        encodings=1<PCM>
        PCM formats=e0560<24bit,20bit,16bit,192kHz,96kHz,48kHz,44.1kHz>
azalia0: dac04 wcap=11<FORMATOV,STEREO>
        encodings=1<PCM>
        PCM formats=e0560<24bit,20bit,16bit,192kHz,96kHz,48kHz,44.1kHz>
azalia0: dac05 wcap=11<FORMATOV,STEREO>
        encodings=1<PCM>
        PCM formats=e0560<24bit,20bit,16bit,192kHz,96kHz,48kHz,44.1kHz>
azalia0: dac06 wcap=211<DIGITAL,FORMATOV,STEREO>
        encodings=1<PCM>
        PCM formats=1e0560<32bit,24bit,20bit,16bit,192kHz,96kHz,48kHz,44.1kHz>
azalia0: adc07 wcap=10011b<CONNLIST,FORMATOV,AMPOV,INAMP,STEREO>
        encodings=1<PCM>
        PCM formats=60160<20bit,16bit,96kHz,48kHz,44.1kHz>
        inamp: mute=1 size=5 steps=31 offset=8
        connections=0x24; selected=0x24
azalia0: adc08 wcap=10011b<CONNLIST,FORMATOV,AMPOV,INAMP,STEREO>
        encodings=1<PCM>
        PCM formats=60160<20bit,16bit,96kHz,48kHz,44.1kHz>
        inamp: mute=1 size=5 steps=31 offset=8
        connections=0x23; selected=0x23
azalia0: adc09 wcap=10011b<CONNLIST,FORMATOV,AMPOV,INAMP,STEREO>
        encodings=1<PCM>
        PCM formats=60160<20bit,16bit,96kHz,48kHz,44.1kHz>
        inamp: mute=1 size=5 steps=31 offset=8
        connections=0x22; selected=0x22
azalia0: adc0a wcap=100391<DIGITAL,CONNLIST,UNSOL,FORMATOV,STEREO>
        encodings=1<PCM>
        PCM formats=1e0560<32bit,24bit,20bit,16bit,192kHz,96kHz,48kHz,44.1kHz>
        connections=0x1f; selected=0x1f
azalia0: mix0b wcap=20010b<CONNLIST,AMPOV,INAMP,STEREO>
        inamp: mute=1 size=5 steps=31 offset=23
        connections=0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x14,0x15,0x16,0x17; selected=0x18
azalia0: mix0c wcap=20010f<CONNLIST,AMPOV,OUTAMP,INAMP,STEREO>
        inamp: mute=1 size=0 steps=0 offset=0
        outamp: mute=0 size=5 steps=31 offset=31
        connections=0x2,0xb; selected=0x2
azalia0: mix0d wcap=20010f<CONNLIST,AMPOV,OUTAMP,INAMP,STEREO>
        inamp: mute=1 size=0 steps=0 offset=0
        outamp: mute=0 size=5 steps=31 offset=31
        connections=0x3,0xb; selected=0x3
azalia0: mix0e wcap=20010f<CONNLIST,AMPOV,OUTAMP,INAMP,STEREO>
        inamp: mute=1 size=0 steps=0 offset=0
        outamp: mute=0 size=5 steps=31 offset=31
        connections=0x4,0xb; selected=0x4
azalia0: mix0f wcap=20010f<CONNLIST,AMPOV,OUTAMP,INAMP,STEREO>
        inamp: mute=1 size=0 steps=0 offset=0
        outamp: mute=0 size=5 steps=31 offset=31
        connections=0x5,0xb; selected=0x5
azalia0: vendor10 wcap=f00000
azalia0: vendor11 wcap=f00000
azalia0: vendor12 wcap=f00000
azalia0: vendor13 wcap=f00000
azalia0: green14 wcap=40018f<CONNLIST,UNSOL,AMPOV,OUTAMP,INAMP,STEREO>
        cap=3f<INPUT,OUTPUT,HEADPHONE,PRESENCE,TRIGGER,IMPEDANCE>
        [01/00] color=green device=hp conn=jack conntype=1/8
        location=rear chassis=external special=none
        inamp: mute=0 size=39 steps=3 offset=0
        outamp: mute=1 size=0 steps=0 offset=0
        connections=0xc,0xd,0xe,0xf,0x26; selected=0xc
azalia0: black15 wcap=40018f<CONNLIST,UNSOL,AMPOV,OUTAMP,INAMP,STEREO>
        cap=3f<INPUT,OUTPUT,HEADPHONE,PRESENCE,TRIGGER,IMPEDANCE>
        [15/00] color=black device=spkr conn=none conntype=1/8
        location=rear chassis=external special=none
        inamp: mute=0 size=39 steps=3 offset=0
        outamp: mute=1 size=0 steps=0 offset=0
        connections=0xc,0xd,0xe,0xf,0x26; selected=0xd
azalia0: black16 wcap=40018f<CONNLIST,UNSOL,AMPOV,OUTAMP,INAMP,STEREO>
        cap=3f<INPUT,OUTPUT,HEADPHONE,PRESENCE,TRIGGER,IMPEDANCE>
        [15/00] color=black device=spkr conn=none conntype=1/8
        location=rear chassis=external special=none
        inamp: mute=0 size=39 steps=3 offset=0
        outamp: mute=1 size=0 steps=0 offset=0
        connections=0xc,0xd,0xe,0xf,0x26; selected=0xe
azalia0: black17 wcap=40018f<CONNLIST,UNSOL,AMPOV,OUTAMP,INAMP,STEREO>
        cap=3f<INPUT,OUTPUT,HEADPHONE,PRESENCE,TRIGGER,IMPEDANCE>
        [15/00] color=black device=spkr conn=none conntype=1/8
        location=rear chassis=external special=none
        inamp: mute=0 size=39 steps=3 offset=0
        outamp: mute=1 size=0 steps=0 offset=0
        connections=0xc,0xd,0xe,0xf,0x26; selected=0xf
azalia0: pink18 wcap=40018f<CONNLIST,UNSOL,AMPOV,OUTAMP,INAMP,STEREO>
        cap=173f<VREF80,VREFGND,VREF50,VREFHIZ,INPUT,OUTPUT,HEADPHONE,PRESENCE,TRIGGER,IMPEDANCE>
        [03/00] color=pink device=mic conn=jack conntype=1/8
        location=rear chassis=external special=none
        inamp: mute=0 size=39 steps=3 offset=0
        outamp: mute=1 size=0 steps=0 offset=0
        connections=0xc,0xd,0xe,0xf,0x26; selected=0xc
azalia0: black19 wcap=40018f<CONNLIST,UNSOL,AMPOV,OUTAMP,INAMP,STEREO>
        cap=173f<VREF80,VREFGND,VREF50,VREFHIZ,INPUT,OUTPUT,HEADPHONE,PRESENCE,TRIGGER,IMPEDANCE>
        [15/00] color=black device=spkr conn=none conntype=1/8
        location=rear chassis=external special=none
        inamp: mute=0 size=39 steps=3 offset=0
        outamp: mute=1 size=0 steps=0 offset=0
        connections=0xc,0xd,0xe,0xf,0x26; selected=0xc
azalia0: black1a wcap=40018f<CONNLIST,UNSOL,AMPOV,OUTAMP,INAMP,STEREO>
        cap=173f<VREF80,VREFGND,VREF50,VREFHIZ,INPUT,OUTPUT,HEADPHONE,PRESENCE,TRIGGER,IMPEDANCE>
        [15/00] color=black device=spkr conn=none conntype=1/8
        location=rear chassis=external special=none
        inamp: mute=0 size=39 steps=3 offset=0
        outamp: mute=1 size=0 steps=0 offset=0
        connections=0xc,0xd,0xe,0xf,0x26; selected=0xc
azalia0: black1b wcap=40018f<CONNLIST,UNSOL,AMPOV,OUTAMP,INAMP,STEREO>
        cap=173f<VREF80,VREFGND,VREF50,VREFHIZ,INPUT,OUTPUT,HEADPHONE,PRESENCE,TRIGGER,IMPEDANCE>
        [15/00] color=black device=spkr conn=none conntype=1/8
        location=rear chassis=external special=none
        inamp: mute=0 size=39 steps=3 offset=0
        outamp: mute=1 size=0 steps=0 offset=0
        connections=0xc,0xd,0xe,0xf,0x26; selected=0xc
azalia0: unknown1c wcap=400001<STEREO>
        cap=20<INPUT>
        [03/01] color=unknown device=cd conn=fixed conntype=atapi
        location=spec2 chassis=internal special=atapi
azalia0: unknown1d wcap=400000
        cap=20<INPUT>
        [03/15] color=unknown device=line conn=fixed conntype=atapi
        location=spec2 chassis=internal special=atapi
azalia0: unknown1e wcap=400300<DIGITAL,CONNLIST>
        cap=10<OUTPUT>
        [02/00] color=unknown device=SPDIF-out conn=fixed conntype=atapi
        location=spec2 chassis=internal special=atapi
        connections=0x6; selected=0x6
azalia0: black1f wcap=400200<DIGITAL>
        cap=20<INPUT>
        [15/00] color=black device=spkr conn=none conntype=1/8
        location=rear chassis=external special=none
azalia0: vendor20 wcap=f00040<PROC>
azalia0: volume21 wcap=600080<UNSOL>
        delta=0 steps=32
azalia0: mix22 wcap=20010f<CONNLIST,AMPOV,OUTAMP,INAMP,STEREO>
        inamp: mute=1 size=0 steps=0 offset=0
        outamp: mute=0 size=0 steps=0 offset=0
        connections=0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x14,0x15,0x16,0x17,0xb; selected=0x18
azalia0: mix23 wcap=20010f<CONNLIST,AMPOV,OUTAMP,INAMP,STEREO>
        inamp: mute=1 size=0 steps=0 offset=0
        outamp: mute=0 size=0 steps=0 offset=0
        connections=0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x14,0x15,0x16,0x17,0xb; selected=0x18
azalia0: mix24 wcap=20010f<CONNLIST,AMPOV,OUTAMP,INAMP,STEREO>
        inamp: mute=1 size=0 steps=0 offset=0
        outamp: mute=0 size=0 steps=0 offset=0
        connections=0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x14,0x15,0x16,0x17,0xb; selected=0x18
azalia0: dac25 wcap=11<FORMATOV,STEREO>
        encodings=1<PCM>
        PCM formats=e0560<24bit,20bit,16bit,192kHz,96kHz,48kHz,44.1kHz>
azalia0: mix26 wcap=20010f<CONNLIST,AMPOV,OUTAMP,INAMP,STEREO>
        inamp: mute=1 size=0 steps=0 offset=0
        outamp: mute=0 size=5 steps=31 offset=31
        connections=0x25,0xb; selected=0x25
azalia_generic_codec_add_convgroup: looking for analog DACs
        pin=14, assoc=1, seq=0: conv=02 conv=03 conv=04 conv=05 conv=25
azalia_generic_codec_add_convgroup: looking for digital DACs
        pin=1e, assoc=2, seq=0: conv=06
azalia_generic_codec_add_convgroup: looking for analog ADCs
        pin=18, assoc=3, seq=0: conv=07 conv=08 conv=09
azalia_generic_codec_add_convgroup: looking for digital ADCs
azalia_codec_init: dacgroup[0]: 02 03 04 05 25
azalia_codec_init: dacgroup[1]: 06
azalia_codec_init: adcgroup[0]: 07 08 09
azalia0: codec[1] vid 0x11c13055, subid 0x05711462, rev. 7.0, HDA version 1.0
azalia_codec_init: nidstart=1 #functions=1
azalia_codec_init: FTYPE result = 0x00000102
azalia0: codec[1]: No audio function groups
azalia0: codecs: Realtek ALC882, AT&T/Lucent/0x3055, using Realtek ALC882
audio0 at azalia0
ppb0 at pci0 dev 28 function 0 "Intel 82801GB PCIE" rev 0x02: apic 2 int 16 (irq 5)
pci1 at ppb0 bus 5
ppb1 at pci0 dev 28 function 1 "Intel 82801GB PCIE" rev 0x02: apic 2 int 17 (irq 11)
pci2 at ppb1 bus 4
re0 at pci2 dev 0 function 0 "Realtek 8168" rev 0x01: RTL8168 1 (0x3000), apic 2 int 17 (irq 11), address 00:16:17:4d:b7:f8
rgephy0 at re0 phy 7: RTL8169S/8110S PHY, rev. 2
ppb2 at pci0 dev 28 function 2 "Intel 82801GB PCIE" rev 0x02: apic 2 int 18 (irq 10)
pci3 at ppb2 bus 3
wpi0 at pci3 dev 0 function 0 "Intel PRO/Wireless 3945ABG" rev 0x02: apic 2 int 18 (irq 10), MoW2, address 00:13:02:02:14:45
uhci0 at pci0 dev 29 function 0 "Intel 82801GB USB" rev 0x02: apic 2 int 23 (irq 15)
uhci1 at pci0 dev 29 function 1 "Intel 82801GB USB" rev 0x02: apic 2 int 19 (irq 3)
uhci2 at pci0 dev 29 function 2 "Intel 82801GB USB" rev 0x02: apic 2 int 18 (irq 10)
uhci3 at pci0 dev 29 function 3 "Intel 82801GB USB" rev 0x02: apic 2 int 16 (irq 5)
ehci0 at pci0 dev 29 function 7 "Intel 82801GB USB" rev 0x02: apic 2 int 23 (irq 15)
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb3 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0xe2
pci4 at ppb3 bus 1
"O2 Micro Firewire" rev 0x02 at pci4 dev 4 function 0 not configured
sdhc0 at pci4 dev 4 function 2 "O2 Micro OZ711MP1 SDHC" rev 0x01: apic 2 int 16 (irq 5)
sdmmc0 at sdhc0
"O2 Micro OZ711MP1 XDHC" rev 0x01 at pci4 dev 4 function 3 not configured
ichpcib0 at pci0 dev 31 function 0 "Intel 82801GBM LPC" rev 0x02: PM disabled
pciide0 at pci0 dev 31 function 1 "Intel 82801GB IDE" rev 0x02: DMA, channel 0 configured to compatibility, channel 1 configured to compatibility
wd0 at pciide0 channel 0 drive 0: <WDC WD800VE-00HDT0>
wd0: 16-sector PIO, LBA, 76319MB, 156301488 sectors
atapiscsi0 at pciide0 channel 0 drive 1
scsibus0 at atapiscsi0: 2 targets, initiator 7
cd0 at scsibus0 targ 0 lun 0: <HL-DT-ST, DVD-RW GWA-4082N, CB03> ATAPI 5/cdrom removable
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5
cd0(pciide0:0:1): using PIO mode 4, Ultra-DMA mode 2
pciide0: channel 1 ignored (disabled)
ichiic0 at pci0 dev 31 function 3 "Intel 82801GB SMBus" rev 0x02: apic 2 int 19 (irq 3)
iic0 at ichiic0
spdmem0 at iic0 addr 0x52: 1GB DDR2 SDRAM non-parity PC2-5300CL5 SO-DIMM
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb2 at uhci1: USB revision 1.0
uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb3 at uhci2: USB revision 1.0
uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb4 at uhci3: USB revision 1.0
uhub4 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1
isa0 at ichpcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pmsi0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pmsi0 mux 0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: <PC speaker>
spkr0 at pcppi0
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
mtrr: Pentium Pro MTRR support
ugen0 at uhub4 port 2 "Cambridge Silicon Radio Bluetooth" rev 2.00/15.93 addr 2
uhidev0 at uhub1 port 2 configuration 1 interface 0 "Logitech USB Receiver" rev 2.00/57.01 addr 2
uhidev0: iclass 3/1
ums0 at uhidev0: 16 buttons, Z dir
wsmouse1 at ums0 mux 0
uhidev1 at uhub1 port 2 configuration 1 interface 1 "Logitech USB Receiver" rev 2.00/57.01 addr 2
uhidev1: iclass 3/0, 17 report ids
uhid0 at uhidev1 reportid 3: input=4, output=0, feature=0
uhid1 at uhidev1 reportid 16: input=6, output=6, feature=0
uhid2 at uhidev1 reportid 17: input=19, output=19, feature=0
softraid0 at root
root on wd0a swap on wd0b dump on wd0b

Here's mixerctl -av too for completeness:

record.adc_mute=off  [ off on ]
record.adc=120,120
record.adc2_mute=off  [ off on ]
record.adc2=120,120
record.adc3_mute=off  [ off on ]
record.adc3=120,120
inputs.mix_mic_mute=off  [ off on ]
inputs.mix_cd_mute=off  [ off on ]
inputs.mix_line_mute=off  [ off on ]
inputs.mix_hp_mute=off  [ off on ]
inputs.mix_mic=120,120
inputs.mix_cd=120,120
inputs.mix_line=120
inputs.mix_hp=120,120
outputs.mix2=120,120
inputs.mix2_dac_mute=off  [ off on ]
inputs.mix2_mix_mute=off  [ off on ]
outputs.mix3=120,120
inputs.mix3_dac2_mute=off  [ off on ]
inputs.mix3_mix_mute=off  [ off on ]
outputs.mix4=120,120
inputs.mix4_dac3_mute=off  [ off on ]
inputs.mix4_mix_mute=off  [ off on ]
outputs.mix5=120,120
inputs.mix5_dac4_mute=off  [ off on ]
inputs.mix5_mix_mute=off  [ off on ]
outputs.hp_source=mix2  [ mix2 mix3 mix4 mix5 mix9 ]
outputs.hp_mute=off  [ off on ]
inputs.hp=85,85
outputs.hp_dir=output  [ input output ]
outputs.hp_boost=off  [ off on ]
outputs.mic_source=mix2  [ mix2 mix3 mix4 mix5 mix9 ]
outputs.mic_mute=off  [ off on ]
inputs.mic=85,85
outputs.mic_dir=input  [ input output ]
outputs.mic_boost=off  [ off on ]
record.mix6_mic_mute=off  [ off on ]
record.mix6_cd_mute=off  [ off on ]
record.mix6_line_mute=off  [ off on ]
record.mix6_hp_mute=off  [ off on ]
record.mix6_mix_mute=off  [ off on ]
record.mix7_mic_mute=off  [ off on ]
record.mix7_cd_mute=off  [ off on ]
record.mix7_line_mute=off  [ off on ]
record.mix7_hp_mute=off  [ off on ]
record.mix7_mix_mute=off  [ off on ]
record.mix8_mic_mute=off  [ off on ]
record.mix8_cd_mute=off  [ off on ]
record.mix8_line_mute=off  [ off on ]
record.mix8_hp_mute=off  [ off on ]
record.mix8_mix_mute=off  [ off on ]
outputs.mix9=120,120
inputs.mix9_dac6_mute=off  [ off on ]
inputs.mix9_mix_mute=off  [ off on ]
outputs.hp_sense=unplugged  [ unplugged plugged ]
outputs.mic_sense=unplugged  [ unplugged plugged ]
inputs.usingdac=0203040525  [ 0203040525 06 ]
outputs.master=120,120
record.volume=120,120

Cheers,

Zak


--
  I like the idea of 256 bits, though: 32 for the (Unicode) character leaves
  room for 224 Bucky bits, which ought to be enough for anyone.
                                -- Roland Hutchinson, in alt.folklore.computers

Reply | Threaded
Open this post in threaded view
|

Re: azalia: better conveter group configuration

j4nKy
In reply to this post by j4nKy
On Tue, Nov 25, 2008 at 10:36:13PM +0000, Jacob Meuser wrote:

> On Mon, Nov 24, 2008 at 05:58:23AM +0000, Jacob Meuser wrote:
> > On Sun, Nov 23, 2008 at 09:32:03PM +0000, Jacob Meuser wrote:
> > > this is an important patch to test on all azalia.
>
> really, it is.  if we don't get this right, we will never be able
> to get meaningful names in azalia's mixer.
>
> it's working correctly in most cases, but the hard ones are really
> hard.  here's a new version which adds just a bit more useful
> debug output and silences some we don't need right now.

I think I've got it now.  this should be the last one of these to test.

thanks for the feedback so far!

> please also see http://jakemsr.trancell.org/

that's been updated as well.

--
[hidden email]
SDF Public Access UNIX System - http://sdf.lonestar.org

Index: azalia.c
===================================================================
RCS file: /home2/cvs/OpenBSD/src/sys/dev/pci/azalia.c,v
retrieving revision 1.73
diff -u -r1.73 azalia.c
--- azalia.c 19 Nov 2008 03:44:14 -0000 1.73
+++ azalia.c 26 Nov 2008 03:38:30 -0000
@@ -107,6 +107,14 @@
 };
 
 
+#ifdef AZALIA_DEBUG
+# define DPRINTFN(n,x) do { if (az_debug > (n)) printf x; } while (0/*CONSTCOND*/)
+int az_debug = 0;
+#else
+# define DPRINTFN(n,x) do {} while (0/*CONSTCOND*/)
+#endif
+
+
 /* ----------------------------------------------------------------
  * ICH6/ICH7 constant values
  * ---------------------------------------------------------------- */
@@ -1289,6 +1297,13 @@
  }
  DPRINTF(("\n"));
  }
+ for (i = 0; i < this->adcs.ngroups; i++) {
+ DPRINTF(("%s: adcgroup[%d]:", __func__, i));
+ for (n = 0; n < this->adcs.groups[i].nconv; n++) {
+ DPRINTF((" %2.2x", this->adcs.groups[i].conv[n]));
+ }
+ DPRINTF(("\n"));
+ }
 #endif
 
  /* set invalid values for azalia_codec_construct_format() to work */
@@ -1516,7 +1531,7 @@
  nid_t nid;
  boolean_t flag222;
 
- DPRINTF(("%s: fmt=0x%4.4x number=%d\n", __func__, fmt, number));
+ DPRINTFN(1, ("%s: fmt=0x%4.4x number=%d\n", __func__, fmt, number));
  err = 0;
  if (dir == AUMODE_RECORD)
  group = &this->adcs.groups[this->adcs.cur];
@@ -1564,7 +1579,7 @@
  }
 
 exit:
- DPRINTF(("%s: leave with %d\n", __func__, err));
+ DPRINTFN(1, ("%s: leave with %d\n", __func__, err));
  return err;
 }
 
@@ -2151,7 +2166,7 @@
  azalia_t *az;
  codec_t *codec;
 
- DPRINTF(("%s: flags=0x%x\n", __func__, flags));
+ DPRINTFN(1, ("%s: flags=0x%x\n", __func__, flags));
  az = v;
  codec = &az->codecs[az->codecno];
  codec->running++;
@@ -2164,7 +2179,7 @@
  azalia_t *az;
  codec_t *codec;
 
- DPRINTF(("%s\n", __func__));
+ DPRINTFN(1, ("%s\n", __func__));
  az = v;
  codec = &az->codecs[az->codecno];
  codec->running--;
@@ -2374,7 +2389,7 @@
  if (blk & 0x7f)
  blk = (blk + 0x7f) & ~0x7f;
  }
- DPRINTF(("%s: resultant block size = %d\n", __func__, blk));
+ DPRINTFN(1,("%s: resultant block size = %d\n", __func__, blk));
  return blk;
 }
 
@@ -2383,7 +2398,7 @@
 {
  azalia_t *az;
 
- DPRINTF(("%s\n", __func__));
+ DPRINTFN(1, ("%s\n", __func__));
  az = v;
  return azalia_stream_halt(&az->pstream);
 }
@@ -2393,7 +2408,7 @@
 {
  azalia_t *az;
 
- DPRINTF(("%s\n", __func__));
+ DPRINTFN(1, ("%s\n", __func__));
  az = v;
  return azalia_stream_halt(&az->rstream);
 }
@@ -2524,7 +2539,7 @@
  int err;
  uint16_t fmt;
 
- DPRINTF(("%s: this=%p start=%p end=%p blk=%d {enc=%u %uch %u/%ubit %uHz}\n",
+ DPRINTFN(1, ("%s: this=%p start=%p end=%p blk=%d {enc=%u %uch %u/%ubit %uHz}\n",
     __func__, v, start, end, blk, param->encoding, param->channels,
     param->precision, param->precision, param->sample_rate));
 
Index: azalia.h
===================================================================
RCS file: /home2/cvs/OpenBSD/src/sys/dev/pci/azalia.h,v
retrieving revision 1.21
diff -u -r1.21 azalia.h
--- azalia.h 19 Nov 2008 03:44:14 -0000 1.21
+++ azalia.h 26 Nov 2008 03:38:30 -0000
@@ -501,7 +501,7 @@
 } __packed rirb_entry_t;
 
 
-/* #define AZALIA_DEBUG */
+#define AZALIA_DEBUG
 #ifdef AZALIA_DEBUG
 # define DPRINTF(x) do { printf x; } while (0/*CONSTCOND*/)
 #else
Index: azalia_codec.c
===================================================================
RCS file: /home2/cvs/OpenBSD/src/sys/dev/pci/azalia_codec.c,v
retrieving revision 1.67
diff -u -r1.67 azalia_codec.c
--- azalia_codec.c 19 Nov 2008 21:49:44 -0000 1.67
+++ azalia_codec.c 26 Nov 2008 03:38:31 -0000
@@ -71,10 +71,10 @@
 #define STAC9205_DELL_V1500 0x02281028
 
 int azalia_generic_codec_init_dacgroup(codec_t *);
-int azalia_generic_codec_add_dacgroup(codec_t *, int, uint32_t);
-int azalia_generic_codec_find_pin(const codec_t *, int, int, uint32_t);
-int azalia_generic_codec_find_dac(const codec_t *, int, int);
-
+int azalia_generic_codec_is_live_pin(const widget_t *, uint32_t, uint32_t);
+int azalia_generic_codec_fnode(codec_t *, nid_t, int, int);
+int azalia_generic_codec_add_convgroup(codec_t *, convgroupset_t *,
+    uint32_t, uint32_t);
 int azalia_generic_mixer_init(codec_t *);
 int azalia_generic_mixer_autoinit(codec_t *);
 
@@ -94,31 +94,19 @@
 int azalia_generic_get_port(codec_t *, mixer_ctrl_t *);
 int azalia_gpio_unmute(codec_t *, int);
 
-int azalia_alc260_init_dacgroup(codec_t *);
 int azalia_alc260_mixer_init(codec_t *);
-int azalia_alc662_init_dacgroup(codec_t *);
-int azalia_alc861_init_dacgroup(codec_t *);
 int azalia_alc88x_mixer_init(codec_t *);
-int azalia_alc880_init_dacgroup(codec_t *);
-int azalia_alc882_init_dacgroup(codec_t *);
-int azalia_alc883_init_dacgroup(codec_t *);
-int azalia_alc885_init_dacgroup(codec_t *);
-int azalia_alc888_init_dacgroup(codec_t *);
 int azalia_ad1984_init_dacgroup(codec_t *);
 int azalia_ad1984_mixer_init(codec_t *);
 int azalia_ad1984_set_port(codec_t *, mixer_ctrl_t *);
 int azalia_ad1984_get_port(codec_t *, mixer_ctrl_t *);
-int azalia_ad1988_init_dacgroup(codec_t *);
 int azalia_cmi9880_init_dacgroup(codec_t *);
 int azalia_cmi9880_mixer_init(codec_t *);
 int azalia_stac9200_mixer_init(codec_t *);
-int azalia_stac9205_init_dacgroup(codec_t *);
-int azalia_stac9221_mixer_init(codec_t *);
 int azalia_stac9221_init_dacgroup(codec_t *);
+int azalia_stac9221_mixer_init(codec_t *);
 int azalia_stac9221_set_port(codec_t *, mixer_ctrl_t *);
 int azalia_stac9221_get_port(codec_t *, mixer_ctrl_t *);
-int azalia_stac9227_init_dacgroup(codec_t *);
-int azalia_stac9271_init_dacgroup(codec_t *);
 int azalia_stac7661_init_dacgroup(codec_t *);
 int azalia_stac7661_mixer_init(codec_t *);
 int azalia_stac7661_set_port(codec_t *, mixer_ctrl_t *);
@@ -141,7 +129,6 @@
  case 0x10ec0260:
  this->name = "Realtek ALC260";
  this->mixer_init = azalia_alc260_mixer_init;
- this->init_dacgroup = azalia_alc260_init_dacgroup;
  break;
  case 0x10ec0268:
  this->name = "Realtek ALC268";
@@ -151,36 +138,29 @@
  break;
  case 0x10ec0662:
  this->name = "Realtek ALC662-GR";
- this->init_dacgroup = azalia_alc662_init_dacgroup;
  break;
  case 0x10ec0861:
  this->name = "Realtek ALC861";
- this->init_dacgroup = azalia_alc861_init_dacgroup;
  break;
  case 0x10ec0880:
  this->name = "Realtek ALC880";
- this->init_dacgroup = azalia_alc880_init_dacgroup;
  this->mixer_init = azalia_alc88x_mixer_init;
  break;
  case 0x10ec0882:
  this->name = "Realtek ALC882";
- this->init_dacgroup = azalia_alc882_init_dacgroup;
  this->mixer_init = azalia_alc88x_mixer_init;
  break;
  case 0x10ec0883:
  /* ftp://209.216.61.149/pc/audio/ALC883_DataSheet_1.3.pdf */
  this->name = "Realtek ALC883";
- this->init_dacgroup = azalia_alc883_init_dacgroup;
  this->mixer_init = azalia_alc88x_mixer_init;
  break;
  case 0x10ec0885:
  this->name = "Realtek ALC885";
- this->init_dacgroup = azalia_alc885_init_dacgroup;
  this->mixer_init = azalia_alc88x_mixer_init;
  break;
  case 0x10ec0888:
  this->name = "Realtek ALC888";
- this->init_dacgroup = azalia_alc888_init_dacgroup;
  this->mixer_init = azalia_alc88x_mixer_init;
  break;
  case 0x11d41983:
@@ -198,12 +178,10 @@
  case 0x11d41988:
  /* http://www.analog.com/en/prod/0,2877,AD1988A,00.html */
  this->name = "Analog Devices AD1988A";
- this->init_dacgroup = azalia_ad1988_init_dacgroup;
  break;
  case 0x11d4198b:
  /* http://www.analog.com/en/prod/0,2877,AD1988B,00.html */
  this->name = "Analog Devices AD1988B";
- this->init_dacgroup = azalia_ad1988_init_dacgroup;
  break;
  case 0x14f15045:
  this->name = "Conexant CX20549";  /* Venice */
@@ -221,31 +199,24 @@
  break;
  case 0x83847616:
  this->name = "Sigmatel STAC9228X";
- this->init_dacgroup = azalia_stac9227_init_dacgroup;
  break;
  case 0x83847617:
  this->name = "Sigmatel STAC9228D";
- this->init_dacgroup = azalia_stac9227_init_dacgroup;
  break;
  case 0x83847618:
  this->name = "Sigmatel STAC9227X";
- this->init_dacgroup = azalia_stac9227_init_dacgroup;
  break;
  case 0x83847620:
  this->name = "Sigmatel STAC9274";
- this->init_dacgroup = azalia_stac9271_init_dacgroup;
  break;
  case 0x83847621:
  this->name = "Sigmatel STAC9274D";
- this->init_dacgroup = azalia_stac9271_init_dacgroup;
  break;
  case 0x83847626:
  this->name = "Sigmatel STAC9271X";
- this->init_dacgroup = azalia_stac9271_init_dacgroup;
  break;
  case 0x83847627:
  this->name = "Sigmatel STAC9271D";
- this->init_dacgroup = azalia_stac9271_init_dacgroup;
  break;
  case 0x83847632:
  this->name = "Sigmatel STAC9202";
@@ -280,7 +251,6 @@
  break;
  case 0x83847683:
  this->name = "Sigmatel STAC9221D";
- this->init_dacgroup = azalia_stac9221_init_dacgroup;
  break;
  case 0x83847690:
  /* http://www.idt.com/products/getDoc.cfm?docID=17812077 */
@@ -292,19 +262,15 @@
  break;
  case 0x838476a0:
  this->name = "Sigmatel STAC9205X";
- this->init_dacgroup = azalia_stac9205_init_dacgroup;
  break;
  case 0x838476a1:
  this->name = "Sigmatel STAC9205D";
- this->init_dacgroup = azalia_stac9205_init_dacgroup;
  break;
  case 0x838476a2:
  this->name = "Sigmatel STAC9204X";
- this->init_dacgroup = azalia_stac9205_init_dacgroup;
  break;
  case 0x838476a3:
  this->name = "Sigmatel STAC9204D";
- this->init_dacgroup = azalia_stac9205_init_dacgroup;
  break;
  }
  return 0;
@@ -317,153 +283,176 @@
 int
 azalia_generic_codec_init_dacgroup(codec_t *this)
 {
- int i, j, assoc, group;
-
- /*
- * grouping DACs
- *   [0] the lowest assoc DACs
- *   [1] the lowest assoc digital outputs
- *   [2] the 2nd assoc DACs
- *      :
- */
  this->dacs.ngroups = 0;
- for (assoc = 0; assoc < CORB_CD_ASSOCIATION_MAX; assoc++) {
- azalia_generic_codec_add_dacgroup(this, assoc, 0);
- azalia_generic_codec_add_dacgroup(this, assoc, COP_AWCAP_DIGITAL);
- }
-
- /* find DACs which do not connect with any pins by default */
- FOR_EACH_WIDGET(this, i) {
- boolean_t found;
-
- if (this->w[i].type != COP_AWTYPE_AUDIO_OUTPUT)
- continue;
- found = FALSE;
- for (group = 0; group < this->dacs.ngroups; group++) {
- for (j = 0; j < this->dacs.groups[group].nconv; j++) {
- if (i == this->dacs.groups[group].conv[j]) {
- found = TRUE;
- group = this->dacs.ngroups;
- break;
- }
- }
- }
- if (found)
- continue;
- if (this->dacs.ngroups >= 32)
- break;
- this->dacs.groups[this->dacs.ngroups].nconv = 1;
- this->dacs.groups[this->dacs.ngroups].conv[0] = i;
- this->dacs.ngroups++;
- }
+ azalia_generic_codec_add_convgroup(this, &this->dacs,
+    COP_AWTYPE_AUDIO_OUTPUT, 0);
+ azalia_generic_codec_add_convgroup(this, &this->dacs,
+    COP_AWTYPE_AUDIO_OUTPUT, COP_AWCAP_DIGITAL);
  this->dacs.cur = 0;
 
- /* enumerate ADCs */
  this->adcs.ngroups = 0;
- FOR_EACH_WIDGET(this, i) {
- if (this->w[i].type != COP_AWTYPE_AUDIO_INPUT)
- continue;
- this->adcs.groups[this->adcs.ngroups].nconv = 1;
- this->adcs.groups[this->adcs.ngroups].conv[0] = i;
- this->adcs.ngroups++;
- if (this->adcs.ngroups >= 32)
- break;
- }
+ azalia_generic_codec_add_convgroup(this, &this->adcs,
+    COP_AWTYPE_AUDIO_INPUT, 0);
+ azalia_generic_codec_add_convgroup(this, &this->adcs,
+    COP_AWTYPE_AUDIO_INPUT, COP_AWCAP_DIGITAL);
  this->adcs.cur = 0;
+
  return 0;
 }
 
 int
-azalia_generic_codec_add_dacgroup(codec_t *this, int assoc, uint32_t digital)
+azalia_generic_codec_add_convgroup(codec_t *this, convgroupset_t *group,
+    uint32_t type, uint32_t digital)
 {
- int i, j, n, dac, seq;
+ nid_t all_convs[HDA_MAX_CHANNELS];
+ int nall_convs;
+ nid_t convs[HDA_MAX_CHANNELS];
+ int nconvs;
+ int assoc, seq;
+ nid_t conv;
+ int i, j, k, l;
+
+ DPRINTF(("%s: looking for %s %s\n", __func__,
+    digital ? "digital" : "analog",
+    (type == COP_AWTYPE_AUDIO_OUTPUT) ? "DACs" : "ADCs"));
 
- n = 0;
- for (seq = 0 ; seq < CORB_CD_SEQUENCE_MAX; seq++) {
- i = azalia_generic_codec_find_pin(this, assoc, seq, digital);
- if (i < 0)
- continue;
- dac = azalia_generic_codec_find_dac(this, i, 0);
- if (dac < 0)
- continue;
- /* duplication check */
- for (j = 0; j < n; j++) {
- if (this->dacs.groups[this->dacs.ngroups].conv[j] == dac)
- break;
- }
- if (j < n) /* this group already has <dac> */
- continue;
- this->dacs.groups[this->dacs.ngroups].conv[n++] = dac;
+ nall_convs = 0;
+ FOR_EACH_WIDGET(this, i) {
+ if (this->w[i].type == type &&
+    (this->w[i].widgetcap & COP_AWCAP_DIGITAL) == digital &&
+    nall_convs < HDA_MAX_CHANNELS)
+ all_convs[nall_convs++] = this->w[i].nid;
  }
- if (n <= 0) /* no such DACs */
- return 0;
- this->dacs.groups[this->dacs.ngroups].nconv = n;
 
- /* check if the same combination is already registered */
- for (i = 0; i < this->dacs.ngroups; i++) {
- if (n != this->dacs.groups[i].nconv)
- continue;
- for (j = 0; j < n; j++) {
- if (this->dacs.groups[this->dacs.ngroups].conv[j] !=
-    this->dacs.groups[i].conv[j])
- break;
+ nconvs = 0;
+ for (assoc = 0; assoc < CORB_CD_ASSOCIATION_MAX; assoc++) {
+ for (seq = 0; seq < CORB_CD_SEQUENCE_MAX; seq++) {
+ FOR_EACH_WIDGET(this, i) {
+ const widget_t *w = &this->w[i];
+ if (w->d.pin.sequence != seq ||
+    w->d.pin.association != assoc)
+ continue;
+ if (type == COP_AWTYPE_AUDIO_OUTPUT) {
+ if (azalia_generic_codec_is_live_pin(w,
+    COP_PINCAP_OUTPUT, digital) == 0)
+ continue;
+ } else {
+ if (azalia_generic_codec_is_live_pin(w,
+    COP_PINCAP_INPUT, digital) == 0)
+ continue;
+ }
+ DPRINTF(("\tpin=%2.2x, assoc=%d, seq=%d:",
+    w->nid, assoc, seq));
+ for (j = 0; j < nall_convs; j++) {
+ conv = all_convs[j];
+ for (k = 0; k < nconvs; k++) {
+ if (convs[k] == conv)
+ break;
+ }
+ if (k < nconvs)
+ continue;
+ if (type == COP_AWTYPE_AUDIO_OUTPUT) {
+ k = azalia_generic_codec_fnode
+    (this, conv, i, 0);
+ if (k < 0 ||
+    this->w[k].nid != conv)
+ continue;
+ } else {
+ for (l = 0; l < this->wend; l++)
+ if (this->w[l].nid ==
+    conv)
+ break;
+ k = azalia_generic_codec_fnode
+    (this, w->nid, l, 0);
+ if (k < 0 || this->w[k].nid !=
+    w->nid)
+ continue;
+ }
+ convs[nconvs++] = conv;
+ DPRINTF(("%2.2x", conv));
+ if (nconvs >= nall_convs ||
+    nconvs >= HDA_MAX_CHANNELS) {
+ DPRINTF(("\n"));
+ goto done;
+ }
+ }
+ DPRINTF(("\n"));
+ }
  }
- if (j >= n) /* matched */
- return 0;
  }
- /* found no equivalent group */
- this->dacs.ngroups++;
+done:
+ for (i = 0; i < nconvs; i++)
+ group->groups[group->ngroups].conv[i] = convs[i];
+ if (nconvs > 0) {
+ group->groups[group->ngroups].nconv = i;
+ group->ngroups++;
+ }
+
  return 0;
 }
 
 int
-azalia_generic_codec_find_pin(const codec_t *this, int assoc, int seq, uint32_t digital)
+azalia_generic_codec_is_live_pin(const widget_t *w, uint32_t iocap, uint32_t digital)
 {
- int i;
+ uint8_t conn, dev;
 
- FOR_EACH_WIDGET(this, i) {
- if (this->w[i].type != COP_AWTYPE_PIN_COMPLEX)
- continue;
- if ((this->w[i].d.pin.cap & COP_PINCAP_OUTPUT) == 0)
- continue;
- if ((this->w[i].widgetcap & COP_AWCAP_DIGITAL) != digital)
- continue;
- if (this->w[i].d.pin.association != assoc)
- continue;
- if (this->w[i].d.pin.sequence == seq) {
- return i;
- }
+ if (w->type != COP_AWTYPE_PIN_COMPLEX)
+ return 0;
+ if ((w->d.pin.cap & iocap) == 0)
+ return 0;
+ if ((w->widgetcap & COP_AWCAP_DIGITAL) != digital)
+ return 0;
+ PIN_STATUS(w, conn);
+ if (conn == CORB_CD_NONE)
+ return 0;
+ dev = CORB_CD_DEVICE(w->d.pin.config);
+ if (iocap == COP_PINCAP_OUTPUT) {
+ if (dev == CORB_CD_LINEOUT || dev == CORB_CD_SPEAKER ||
+    dev == CORB_CD_HEADPHONE ||
+    (digital == COP_AWCAP_DIGITAL &&
+    (dev == CORB_CD_SPDIFOUT || dev == CORB_CD_DIGITALOUT)))
+ return 1;
+ } else {
+ if (dev == CORB_CD_MICIN || dev == CORB_CD_LINEIN ||
+    (digital == COP_AWCAP_DIGITAL &&
+    (dev == CORB_CD_SPDIFIN || dev == CORB_CD_DIGITALIN)))
+ return 1;
  }
- return -1;
+
+ return 0;
 }
 
 int
-azalia_generic_codec_find_dac(const codec_t *this, int index, int depth)
+azalia_generic_codec_fnode(codec_t *this, nid_t node, int index, int depth)
 {
  const widget_t *w;
- int i, j, ret;
+ int i, j, k, ret;
 
  w = &this->w[index];
- if (w->type == COP_AWTYPE_AUDIO_OUTPUT)
+ if (w->nid == node) {
+ DPRINTF((" depth=%d:", depth));
  return index;
- if (++depth > 50) {
- return -1;
- }
- if (w->selected >= 0) {
- j = w->connections[w->selected];
- if (VALID_WIDGET_NID(j, this)) {
- ret = azalia_generic_codec_find_dac(this, j, depth);
- if (ret >= 0)
- return ret;
- }
  }
+ /* back at the beginning or a bad end */
+ if (depth > 0 &&
+    (w->type == COP_AWTYPE_PIN_COMPLEX ||
+    w->type == COP_AWTYPE_AUDIO_OUTPUT ||
+    w->type == COP_AWTYPE_AUDIO_INPUT))
+ return -1;
+ if (++depth >= 10)
+ return -1;
  for (i = 0; i < w->nconnections; i++) {
  j = w->connections[i];
  if (!VALID_WIDGET_NID(j, this))
  continue;
- ret = azalia_generic_codec_find_dac(this, j, depth);
- if (ret >= 0)
- return ret;
+ FOR_EACH_WIDGET(this, k)
+ if (this->w[k].nid == j)
+ break;
+ if (k < this->wend) {
+ ret = azalia_generic_codec_fnode(this, node, k, depth);
+ if (ret >= 0)
+ return ret;
+ }
  }
  return -1;
 }
@@ -1813,63 +1802,6 @@
  return 0;
 }
 
-int
-azalia_alc260_init_dacgroup(codec_t *this)
-{
- static const convgroupset_t dacs = {
- -1, 2,
- {{1, {0x02}}, /* analog 2ch */
- {1, {0x03}}}}; /* digital */
- static const convgroupset_t adcs = {
- -1, 3,
- {{1, {0x04}}, /* analog 2ch */
- {1, {0x05}}, /* analog 2ch */
- {1, {0x06}}}}; /* digital */
-
- this->dacs = dacs;
- this->adcs = adcs;
- return 0;
-}
-
-/* ----------------------------------------------------------------
- * Realtek ALC662-GR
- * ---------------------------------------------------------------- */
-
-int
-azalia_alc662_init_dacgroup(codec_t *this)
-{
- static const convgroupset_t dacs = {
- -1, 1,
- {{3, {0x02, 0x03, 0x04}}}}; /* analog 6ch */
- static const convgroupset_t adcs = {
- -1, 1,
- {{2, {0x09, 0x08}}}}; /* analog 4ch */
-
- this->dacs = dacs;
- this->adcs = adcs;
- return 0;
-}
-
-/* ----------------------------------------------------------------
- * Realtek ALC861
- * ---------------------------------------------------------------- */
-
-int
-azalia_alc861_init_dacgroup(codec_t *this)
-{
- static const convgroupset_t dacs = {
- -1, 2,
- {{4, {0x03, 0x04, 0x05, 0x06}}, /* analog 8ch */
- {1, {0x07}}}}; /* digital */
- static const convgroupset_t adcs = {
- -1, 1,
- {{1, {0x08}}}}; /* analog 2ch */
-
- this->dacs = dacs;
- this->adcs = adcs;
- return 0;
-}
-
 /* ----------------------------------------------------------------
  * Realtek ALC88x mixer init - volume control is on the mixer
  * instead of the DAC.
@@ -1886,113 +1818,6 @@
 }
 
 /* ----------------------------------------------------------------
- * Realtek ALC880
- * ---------------------------------------------------------------- */
-
-int
-azalia_alc880_init_dacgroup(codec_t *this)
-{
- static const convgroupset_t dacs = {
- -1, 2,
- {{4, {0x02, 0x03, 0x04, 0x05}}, /* analog 8ch */
- {1, {0x06}}}}; /* digital */
- static const convgroupset_t adcs = {
- -1, 2,
- {{3, {0x07, 0x08, 0x09}}, /* analog 6ch */
- {1, {0x0a}}}}; /* digital */
-
- this->dacs = dacs;
- this->adcs = adcs;
- return 0;
-}
-
-/* ----------------------------------------------------------------
- * Realtek ALC882
- * ---------------------------------------------------------------- */
-
-int
-azalia_alc882_init_dacgroup(codec_t *this)
-{
- static const convgroupset_t dacs = {
- -1, 2,
- {{5, {0x02, 0x03, 0x04, 0x05, 0x25}}, /* analog 10ch */
- {1, {0x06}}}}; /* digital */
- static const convgroupset_t adcs = {
- -1, 2,
- {{3, {0x07, 0x08, 0x09}}, /* analog 6ch */
- {1, {0x0a}}}}; /* digital */
-
- this->dacs = dacs;
- this->adcs = adcs;
- return 0;
-}
-
-/* ----------------------------------------------------------------
- * Realtek ALC883
- * ALC882 without adc07 and mix24.
- * ---------------------------------------------------------------- */
-
-int
-azalia_alc883_init_dacgroup(codec_t *this)
-{
- static const convgroupset_t dacs = {
- -1, 2,
- {{5, {0x02, 0x03, 0x04, 0x05, 0x25}}, /* analog 10ch */
- {1, {0x06}}}}; /* digital */
- static const convgroupset_t adcs = {
- -1, 2,
- {{2, {0x08, 0x09}}, /* analog 4ch */
- {1, {0x0a}}}}; /* digital */
-
- this->dacs = dacs;
- this->adcs = adcs;
- return 0;
-}
-
-/* ----------------------------------------------------------------
- * Realtek ALC885
- * ---------------------------------------------------------------- */
-
-int
-azalia_alc885_init_dacgroup(codec_t *this)
-{
- static const convgroupset_t dacs = {
- -1, 2,
- {{5, {0x02, 0x03, 0x04, 0x05, 0x25}}, /* analog 10ch */
- {1, {0x06}}}}; /* digital */
- static const convgroupset_t adcs = {
- -1, 2,
- {{3, {0x07, 0x08, 0x09}}, /* analog 6ch */
- {1, {0x0a}}}}; /* digital */
-
- this->dacs = dacs;
- this->adcs = adcs;
- return 0;
-}
-
-/* ----------------------------------------------------------------
- * Realtek ALC888
- * ---------------------------------------------------------------- */
-
-int
-azalia_alc888_init_dacgroup(codec_t *this)
-{
- static const convgroupset_t dacs = {
- -1, 2,
- {{5, {0x02, 0x03, 0x04, 0x05, 0x25}}, /* analog 10ch */
- {1, {0x06}}}}; /* digital */
- /* ALC888S has another SPDIF-out 0x10 */
- static const convgroupset_t adcs = {
- -1, 2,
- {{2, {0x08, 0x09}}, /* analog 4ch */
- {1, {0x0a}}}}; /* digital */
-
- this->dacs = dacs;
- this->adcs = adcs;
- return 0;
-}
-
-/* ----------------------------------------------------------------
  * Analog Devices AD1984
  * ---------------------------------------------------------------- */
 
@@ -2141,28 +1966,6 @@
 }
 
 /* ----------------------------------------------------------------
- * Analog Devices AD1988A/AD1988B
- * ---------------------------------------------------------------- */
-
-int
-azalia_ad1988_init_dacgroup(codec_t *this)
-{
- static const convgroupset_t dacs = {
- -1, 3,
- {{4, {0x04, 0x05, 0x06, 0x0a}}, /* analog 8ch */
- {1, {0x02}}, /* digital */
- {1, {0x03}}}}; /* another analog */
- static const convgroupset_t adcs = {
- -1, 2,
- {{2, {0x08, 0x09, 0x0f}}, /* analog 6ch */
- {1, {0x07}}}}; /* digital */
-
- this->dacs = dacs;
- this->adcs = adcs;
- return 0;
-}
-
-/* ----------------------------------------------------------------
  * CMedia CMI9880
  * ---------------------------------------------------------------- */
 
@@ -2445,62 +2248,6 @@
     MI_TARGET_OUTAMP, mc);
  return azalia_generic_mixer_get(this, m->nid, m->target, mc);
 }
-
-
-int
-azalia_stac9205_init_dacgroup(codec_t *this)
-{
- /* volume knob at nid 24 */
- static const convgroupset_t dacs = {
- -1, 1,
- {{2, {0x10, 0x11}}}};
-
- /* vols: 1d:1b, 1e:1a */
- static const convgroupset_t adcs = {
- -1, 1,
- {{2, {0x1d, 0x1e}}}};
-
- this->dacs = dacs;
- this->adcs = adcs;
- return 0;
-}
-
-int
-azalia_stac9227_init_dacgroup(codec_t *this)
-{
- /* volume knob at nid 24 */
- static const convgroupset_t dacs = {
- -1, 1,
- {{4, {0x02, 0x03, 0x04, 0x05}}}};
-
- /* vols: 07:18, 08:19, 09:1a */
- static const convgroupset_t adcs = {
- -1, 1,
- {{3, {0x07, 0x08, 0x09}}}};
-
- this->dacs = dacs;
- this->adcs = adcs;
- return 0;
-}
-
-int
-azalia_stac9271_init_dacgroup(codec_t *this)
-{
- /* volume knob at nid 24 */
- static const convgroupset_t dacs = {
- -1, 1,
- {{5, {0x02, 0x03, 0x04, 0x05, 0x06}}}};
-
- /* vols: 07:18, 08:19, 09:1a */
- static const convgroupset_t adcs = {
- -1, 1,
- {{3, {0x07, 0x08, 0x09}}}};
-
- this->dacs = dacs;
- this->adcs = adcs;
- return 0;
-}
-
 
 /* ----------------------------------------------------------------
  * Sony VAIO FE and SZ

Reply | Threaded
Open this post in threaded view
|

Re: azalia: better conveter group configuration

guilherme m. schroeder-2
On Wed, 26 Nov 2008 03:48:40 +0000
Jacob Meuser <[hidden email]> wrote:

> On Tue, Nov 25, 2008 at 10:36:13PM +0000, Jacob Meuser wrote:
> > On Mon, Nov 24, 2008 at 05:58:23AM +0000, Jacob Meuser wrote:
> > > On Sun, Nov 23, 2008 at 09:32:03PM +0000, Jacob Meuser wrote:
> > > > this is an important patch to test on all azalia.
> >
> > really, it is.  if we don't get this right, we will never be able
> > to get meaningful names in azalia's mixer.
> >
> > it's working correctly in most cases, but the hard ones are really
> > hard.  here's a new version which adds just a bit more useful
> > debug output and silences some we don't need right now.
>
> I think I've got it now.  this should be the last one of these to test.
>
> thanks for the feedback so far!
>
> > please also see http://jakemsr.trancell.org/
>
> that's been updated as well.
>
> --
> [hidden email]
> SDF Public Access UNIX System - http://sdf.lonestar.org/

Here's:

OpenBSD 4.4-current (GENERIC.MP) #2: Wed Nov 26 00:17:53 BRST 2008
    root@dub:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 3694911488 (3523MB)
avail mem = 3585921024 (3419MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xf6590 (57 entries)
bios0: vendor Dell Inc. version "A06" date 10/10/2008
bios0: Dell Inc. Latitude E6400
acpi0 at bios0: rev 2
acpi0: tables DSDT FACP HPET DMAR APIC ASF! MCFG SLIC TCPA SSDT
acpi0: wakeup devices PCI0(S4) PCIE(S4) USB1(S0) USB2(S0) USB3(S0) USB4(S0) USB5(S0) USB6(S0) EHC2(S0) EHCI(S0) AZAL(S3) RP01(S4) RP02(S4) RP03(S4) RP04(S3) RP05(S3) RP06(S5) LID_(S3) PBTN(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM)2 Duo CPU P8400 @ 2.26GHz, 2261.33 MHz
cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,SMX,EST,TM2,CX16,xTPR,NXE,LONG
cpu0: 3MB 64b/line 8-way L2 cache
cpu0: apic clock running at 266MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM)2 Duo CPU P8400 @ 2.26GHz, 2261.00 MHz
cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,SMX,EST,TM2,CX16,xTPR,NXE,LONG
cpu1: 3MB 64b/line 8-way L2 cache
ioapic0 at mainbus0 apid 2 pa 0xfec00000, version 20, 24 pins
ioapic0: misconfigured as apic 0, remapped to apid 2
acpiprt0 at acpi0: bus 3 (PCIE)
acpiprt1 at acpi0: bus -1 (AGP_)
acpiprt2 at acpi0: bus 11 (RP01)
acpiprt3 at acpi0: bus 12 (RP02)
acpiprt4 at acpi0: bus 13 (RP03)
acpiprt5 at acpi0: bus 14 (RP04)
acpiprt6 at acpi0: bus -1 (RP05)
acpiprt7 at acpi0: bus -1 (RP06)
acpiprt8 at acpi0: bus 0 (PCI0)
acpiec0 at acpi0
acpicpu0 at acpi0: C3, C2, C1, PSS
acpicpu1 at acpi0: C3, C2, C1, PSS
acpitz0 at acpi0: critical temperature 107 degC
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: PBTN
acpibtn2 at acpi0: SBTN
acpiac0 at acpi0: AC unit online
acpibat0 at acpi0: BAT0 model "DELL FU27488" serial 30161 type LION oem "Sony"
acpibat1 at acpi0: BAT1 not present
acpivideo at acpi0 not configured
acpivideo at acpi0 not configured
acpivideo at acpi0 not configured
cpu0: Enhanced SpeedStep 2261 MHz: speeds: 2268, 2267, 1600, 800 MHz
pci0 at mainbus0 bus 0: configuration mode 1
pchb0 at pci0 dev 0 function 0 "Intel GM45 Host" rev 0x07
vga1 at pci0 dev 2 function 0 "Intel GM45 Video" rev 0x07
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
intagp at vga1 not configured
inteldrm0 at vga1
drm0 at inteldrm0: couldn't find agp
"Intel GM45 Video" rev 0x07 at pci0 dev 2 function 1 not configured
em0 at pci0 dev 25 function 0 "Intel ICH9 IGP M AMT" rev 0x03: apic 2 int 22 (irq 10), address 00:21:70:a5:77:b8
uhci0 at pci0 dev 26 function 0 "Intel 82801I USB" rev 0x03: apic 2 int 20 (irq 7)
uhci1 at pci0 dev 26 function 1 "Intel 82801I USB" rev 0x03: apic 2 int 21 (irq 4)
uhci2 at pci0 dev 26 function 2 "Intel 82801I USB" rev 0x03: apic 2 int 22 (irq 10)
ehci0 at pci0 dev 26 function 7 "Intel 82801I USB" rev 0x03: apic 2 int 22 (irq 10)
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
azalia0 at pci0 dev 27 function 0 "Intel 82801I HD Audio" rev 0x03: apic 2 int 21 (irq 4)
azalia0: host: High Definition Audio rev. 1.0
azalia0: host: 4 output, 4 input, and 0 bidi streams
azalia_attach: resetting
azalia_attach: reset counter = 5000
azalia_attach: reset counter = 4985
azalia0: found a codec at #0
azalia0: found a codec at #2
azalia_init_corb: CORB allocation succeeded.
azalia_init_corb: CORBWP=0; size=256
azalia_init_rirb: RIRB allocation succeeded.
azalia_init_rirb: RIRBRP=0, size=256
azalia0: codec[0] vid 0x111d76b2, subid 0x02331028, rev. 3.2, HDA version 1.0
azalia_codec_init: nidstart=1 #functions=1
azalia_codec_init: FTYPE result = 0x00000101
azalia_codec_init: There are 31 widgets in the audio function.
        encodings=1<PCM>
        PCM formats=e07e0<24bit,20bit,16bit,192kHz,176.4kHz,96kHz,88.2kHz,48kHz,44.1kHz>
        inamp: mute=1 size=0 steps=0 offset=0
        outamp: mute=1 size=2 steps=127 offset=127
        gpio: wake=1 unsol=1 gpis=0 gpos=0 gpios=8
azalia0: black0a wcap=400181<CONNLIST,UNSOL,STEREO>
        cap=1c<OUTPUT,HEADPHONE,PRESENCE>
        [01/15] color=black device=hp conn=jack conntype=1/8
        location=right chassis=external special=none
        connections=0x10,0x11,0x17; selected=0x10
azalia0: black0b wcap=400081<UNSOL,STEREO>
        cap=1724<VREF80,VREFGND,VREF50,VREFHIZ,INPUT,PRESENCE>
        [02/01] color=black device=mic conn=jack conntype=1/8
        location=right chassis=external special=none
azalia0: unknown0c wcap=400081<UNSOL,STEREO>
        cap=1724<VREF80,VREFGND,VREF50,VREFHIZ,INPUT,PRESENCE>
        [15/00] color=unknown device=other conn=none conntype=unknown
        location=n/a chassis=external special=none
azalia0: unknown0d wcap=400181<CONNLIST,UNSOL,STEREO>
        cap=14<OUTPUT,PRESENCE>
        [01/00] color=unknown device=spkr conn=fixed conntype=analog
        location=n/a chassis=internal special=none
        connections=0x10,0x11,0x17; selected=0x10
azalia0: black0e wcap=400081<UNSOL,STEREO>
        cap=1724<VREF80,VREFGND,VREF50,VREFHIZ,INPUT,PRESENCE>
        [02/14] color=black device=mic conn=jack conntype=1/8
        location=left chassis=separate special=none
azalia0: black0f wcap=400181<CONNLIST,UNSOL,STEREO>
        cap=14<OUTPUT,PRESENCE>
        [05/00] color=black device=line conn=jack conntype=1/8
        location=left chassis=separate special=none
        connections=0x10,0x11,0x17; selected=0x10
azalia0: dac10 wcap=d0c05<LRSWAP,POWER,OUTAMP,STEREO>
azalia0: dac11 wcap=d0c05<LRSWAP,POWER,OUTAMP,STEREO>
azalia0: adc12 wcap=1d0541<POWER,CONNLIST,PROC,STEREO>
        connections=0x1c; selected=0x1c
azalia0: adc13 wcap=1d0541<POWER,CONNLIST,PROC,STEREO>
        connections=0x1d; selected=0x1d
azalia0: unknown14 wcap=400100<CONNLIST>
        cap=10<OUTPUT>
        [15/02] color=unknown device=other conn=none conntype=unknown
        location=n/a chassis=external special=none
        connections=0x16; selected=0x16
azalia0: sel15 wcap=300101<CONNLIST,STEREO>
        connections=0x10,0x11,0x17; selected=0x10
azalia0: mix16 wcap=200100<CONNLIST>
        connections=0x15; selected=0x15
azalia0: mix17 wcap=20010b<CONNLIST,AMPOV,INAMP,STEREO>
        inamp: mute=1 size=5 steps=31 offset=23
        connections=0x10,0x11,0x27,0x1a,0x1b; selected=0x10
azalia0: unknown18 wcap=40000d<AMPOV,OUTAMP,STEREO>
        cap=20<INPUT>
        [10/00] color=unknown device=mic conn=fixed conntype=digital
        location=n/a chassis=internal special=none
        outamp: mute=0 size=39 steps=3 offset=0
azalia0: unknown19 wcap=40000d<AMPOV,OUTAMP,STEREO>
        cap=20<INPUT>
        [15/04] color=unknown device=other conn=none conntype=unknown
        location=n/a chassis=external special=none
        outamp: mute=0 size=39 steps=3 offset=0
azalia0: sel1a wcap=30010d<CONNLIST,AMPOV,OUTAMP,STEREO>
        outamp: mute=0 size=39 steps=3 offset=0
        connections=0xb,0xc,0xe; selected=0xb
azalia0: sel1b wcap=30010d<CONNLIST,AMPOV,OUTAMP,STEREO>
        outamp: mute=0 size=39 steps=3 offset=0
        connections=0xb,0xc,0xe; selected=0xb
azalia0: sel1c wcap=30090d<LRSWAP,CONNLIST,AMPOV,OUTAMP,STEREO>
        outamp: mute=1 size=5 steps=15 offset=0
        connections=0x1a,0x17,0x18,0x19; selected=0x1a
azalia0: sel1d wcap=30090d<LRSWAP,CONNLIST,AMPOV,OUTAMP,STEREO>
        outamp: mute=1 size=5 steps=15 offset=0
        connections=0x1b,0x17,0x18,0x19; selected=0x1b
azalia0: unknown1e wcap=400301<DIGITAL,CONNLIST,STEREO>
        cap=10<OUTPUT>
        [15/05] color=unknown device=other conn=none conntype=unknown
        location=n/a chassis=external special=none
        connections=0x24; selected=0x24
azalia0: unknown1f wcap=400701<POWER,DIGITAL,CONNLIST,STEREO>
        cap=10010<EAPD,OUTPUT>
        [15/06] color=unknown device=other conn=none conntype=unknown
        location=n/a chassis=external special=none
        connections=0x24,0x25; selected=0x24
azalia0: unknown20 wcap=400301<DIGITAL,CONNLIST,STEREO>
        cap=10<OUTPUT>
        [15/07] color=unknown device=other conn=none conntype=unknown
        location=n/a chassis=external special=none
        connections=0x25; selected=0x25
azalia0: dac21 wcap=40211<DIGITAL,FORMATOV,STEREO>
        encodings=5<AC3,PCM>
        PCM formats=e07e0<24bit,20bit,16bit,192kHz,176.4kHz,96kHz,88.2kHz,48kHz,44.1kHz>
azalia0: dac22 wcap=40211<DIGITAL,FORMATOV,STEREO>
        encodings=5<AC3,PCM>
        PCM formats=e07e0<24bit,20bit,16bit,192kHz,176.4kHz,96kHz,88.2kHz,48kHz,44.1kHz>
azalia0: vendor23 wcap=f00000
azalia0: sel24 wcap=300101<CONNLIST,STEREO>
        connections=0x21,0x1c,0x1d; selected=0x21
azalia0: sel25 wcap=300101<CONNLIST,STEREO>
        connections=0x22,0x1c,0x1d; selected=0x22
azalia0: beep26 wcap=70000c<AMPOV,OUTAMP>
        outamp: mute=1 size=23 steps=3 offset=3
azalia0: unknown27 wcap=400000
        cap=20<INPUT>
        [15/00] color=unknown device=other conn=none conntype=unknown
        location=n/a chassis=external special=none
azalia0: volume28 wcap=600000
        delta=1 steps=127
azalia_generic_codec_add_convgroup: looking for analog DACs
        pin=0d, assoc=1, seq=0: depth=1:10 depth=1:11
azalia_generic_codec_add_convgroup: looking for digital DACs
azalia_generic_codec_add_convgroup: looking for analog ADCs
        pin=0b, assoc=2, seq=1: depth=3:12 depth=3:13
azalia_generic_codec_add_convgroup: looking for digital ADCs
azalia_codec_init: dacgroup[0]: 10 11
azalia_codec_init: adcgroup[0]: 12 13
azalia0: codec[2] vid 0x80862802, subid 0x02331028, rev. 0.0, HDA version 1.0
azalia_codec_init: nidstart=1 #functions=1
azalia_codec_init: FTYPE result = 0x00000001
azalia_codec_init: There are 2 widgets in the audio function.
        encodings=0
        PCM formats=0
        inamp: mute=0 size=0 steps=0 offset=0
        outamp: mute=0 size=0 steps=0 offset=0
        gpio: wake=0 unsol=0 gpis=0 gpos=0 gpios=0
azalia0: dac02 wcap=6211<DIGITAL,FORMATOV,STEREO>
        encodings=5<AC3,PCM>
        PCM formats=1e07f0<32bit,24bit,20bit,16bit,192kHz,176.4kHz,96kHz,88.2kHz,48kHz,44.1kHz,32kHz>
azalia0: unknown03 wcap=40739d<DIGITAL,CONNLIST,UNSOL,FORMATOV,AMPOV,OUTAMP,STEREO>
        encodings=94<AC3>
        PCM formats=18560010<32bit,20bit,16bit,32kHz>
        cap=94<OUTPUT,PRESENCE>
        [01/00] color=unknown device=digital-out conn=jack conntype=digital
        location=spec1 chassis=internal special=hdmi
        outamp: mute=1 size=0 steps=0 offset=0
        connections=0x2; selected=0x2
azalia_generic_codec_add_convgroup: looking for analog DACs
azalia_generic_codec_add_convgroup: looking for digital DACs
        pin=03, assoc=1, seq=0: depth=1:02
azalia_generic_codec_add_convgroup: looking for analog ADCs
azalia_generic_codec_add_convgroup: looking for digital ADCs
azalia_codec_init: dacgroup[0]: 02
azalia0: invalid ADC PCM format: 0x00000000
azalia0: codecs: IDT/0x76b2, Intel/0x2802, using IDT/0x76b2
audio0 at azalia0
ppb0 at pci0 dev 28 function 0 "Intel 82801I PCIE" rev 0x03: apic 2 int 16 (irq 0)
pci1 at ppb0 bus 11
ppb1 at pci0 dev 28 function 1 "Intel 82801I PCIE" rev 0x03: apic 2 int 17 (irq 0)
pci2 at ppb1 bus 12
iwn0 at pci2 dev 0 function 0 "Intel WiFi Link 5300AGN" rev 0x00: apic 2 int 17 (irq 3), MIMO 3T3R, MoW, address 00:16:ea:5e:dc:32
ppb2 at pci0 dev 28 function 2 "Intel 82801I PCIE" rev 0x03: apic 2 int 18 (irq 0)
pci3 at ppb2 bus 13
ppb3 at pci0 dev 28 function 3 "Intel 82801I PCIE" rev 0x03: apic 2 int 19 (irq 0)
pci4 at ppb3 bus 14
uhci3 at pci0 dev 29 function 0 "Intel 82801I USB" rev 0x03: apic 2 int 20 (irq 7)
uhci4 at pci0 dev 29 function 1 "Intel 82801I USB" rev 0x03: apic 2 int 21 (irq 4)
uhci5 at pci0 dev 29 function 2 "Intel 82801I USB" rev 0x03: apic 2 int 22 (irq 10)
ehci1 at pci0 dev 29 function 7 "Intel 82801I USB" rev 0x03: apic 2 int 20 (irq 7)
usb1 at ehci1: USB revision 2.0
uhub1 at usb1 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb4 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0x93
pci5 at ppb4 bus 3
"Ricoh 5C832 Firewire" rev 0x04 at pci5 dev 1 function 0 not configured
sdhc0 at pci5 dev 1 function 1 "Ricoh 5C822 SD/MMC" rev 0x21: apic 2 int 18 (irq 11)
sdmmc0 at sdhc0
sdhc1 at pci5 dev 1 function 2 "Ricoh 5C843 MMC" rev 0x11: apic 2 int 18 (irq 11)
sdhc1: base clock frequency unknown
sdhc1 at 0x10: can't initialize host
pcib0 at pci0 dev 31 function 0 "Intel 82801IEM LPC" rev 0x03
ahci0 at pci0 dev 31 function 2 "Intel 82801I AHCI" rev 0x03: apic 2 int 19 (irq 10), AHCI 1.2
scsibus0 at ahci0: 32 targets, initiator 32
sd0 at scsibus0 targ 0 lun 0: <ATA, ST980813ASG, 3.AD> SCSI3 0/direct fixed
sd0: 76319MB, 512 bytes/sec, 156301488 sec total
cd0 at scsibus0 targ 1 lun 0: <PLDS, DVD+-RW DU-8A2S, 4D12> ATAPI 5/cdrom removable
ichiic0 at pci0 dev 31 function 3 "Intel 82801I SMBus" rev 0x03: apic 2 int 17 (irq 3)
iic0 at ichiic0
spdmem0 at iic0 addr 0x50: 2GB DDR2 SDRAM non-parity PC2-6400CL5 SO-DIMM
spdmem1 at iic0 addr 0x52: 2GB DDR2 SDRAM non-parity PC2-6400CL5 SO-DIMM
usb2 at uhci0: USB revision 1.0
uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb3 at uhci1: USB revision 1.0
uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb4 at uhci2: USB revision 1.0
uhub4 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb5 at uhci3: USB revision 1.0
uhub5 at usb5 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb6 at uhci4: USB revision 1.0
uhub6 at usb6 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb7 at uhci5: USB revision 1.0
uhub7 at usb7 "Intel UHCI root hub" rev 1.00/1.00 addr 1
isa0 at pcib0
isadma0 at isa0
com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: <PC speaker>
spkr0 at pcppi0
mtrr: Pentium Pro MTRR support
umass0 at uhub1 port 3 configuration 1 interface 0 "Kingston DataTraveler 2.0" rev 2.00/1.00 addr 2
umass0: using SCSI over Bulk-Only
scsibus1 at umass0: 2 targets, initiator 0
sd1 at scsibus1 targ 1 lun 0: <Kingston, DataTraveler 2.0, PMAP> SCSI0 0/direct removable
sd1: 1968MB, 512 bytes/sec, 4030464 sec total
ugen0 at uhub4 port 1 "Broadcom Corp 5880" rev 1.10/1.01 addr 2
uhidev0 at uhub5 port 2 configuration 1 interface 0 "Microsoft Basic Optical Mouse" rev 1.10/0.00 addr 2
uhidev0: iclass 3/1
ums0 at uhidev0: 3 buttons, Z dir
wsmouse1 at ums0 mux 0
softraid0 at root
root on sd0a swap on sd0b dump on sd0b

outputs.hp_source=dac  [ dac dac2 mix2 ]
outputs.hp_boost=off  [ off on ]
outputs.spkr_source=dac  [ dac dac2 mix2 ]
outputs.line_source=dac  [ dac dac2 mix2 ]
inputs.dac_mute=off  [ off on ]
inputs.dac=254,254
inputs.dac2_mute=off  [ off on ]
inputs.dac2=254,254
inputs.sel_source=dac  [ dac dac2 mix2 ]
inputs.mix2_dac_mute=off  [ off on ]
inputs.mix2_dac2_mute=off  [ off on ]
inputs.mix2_sel2_mute=off  [ off on ]
inputs.mix2_sel3_mute=off  [ off on ]
inputs.mix2_dac=248,248
inputs.mix2_dac2=248,248
inputs.mix2_sel2=248,248
inputs.mix2_sel3=248,248
outputs.mic3=255,255
inputs.sel2_source=mic  [ mic mic2 ]
outputs.sel2=255,255
inputs.sel3_source=mic  [ mic mic2 ]
outputs.sel3=255,255
inputs.sel4_source=sel2  [ sel2 mix2 mic3 ]
outputs.sel4_mute=off  [ off on ]
outputs.sel4=255,255
inputs.sel5_source=sel3  [ sel3 mix2 mic3 ]
outputs.sel5_mute=off  [ off on ]
outputs.sel5=255,255
inputs.sel6_source=dac3  [ dac3 sel4 sel5 ]
inputs.sel7_source=dac4  [ dac4 sel4 sel5 ]
inputs.beep_mute=off  [ off on ]
inputs.beep=255
outputs.volume=254
outputs.hp_sense=plugged  [ unplugged plugged ]
outputs.mic_sense=unplugged  [ unplugged plugged ]
outputs.mic2_sense=unplugged  [ unplugged plugged ]
outputs.line_sense=unplugged  [ unplugged plugged ]
outputs.master=254,254

Reply | Threaded
Open this post in threaded view
|

Re: azalia: better conveter group configuration

j4nKy
On Wed, Nov 26, 2008 at 02:26:11AM -0200, guilherme m. schroeder wrote:

> Here's:

thanks.  btw, I'm pretty sure I know what's wrong with your machine.
you have input amps with mute capabilities on your output jacks.  for
some reason we don't detect that.  neither did whatever produces the
codecs.txt you referenced ...

--
[hidden email]
SDF Public Access UNIX System - http://sdf.lonestar.org

Reply | Threaded
Open this post in threaded view
|

Re: azalia: better conveter group configuration

Seth Jackson-2
I've tested using my HP Pavilion dv6000.....

My laptop has external volume controls and they work, except for muting.
I've tested using headphones and the built-in speakers and they both work.
I've unplugged the headphones and the sound switches to the built-in
speakers and vice versa.

dmesg:
(azalia stuff only)

azalia0 at pci0 dev 27 function 0 "Intel 82801H HD Audio" rev 0x03:
apic 2 int 22 (irq 11)
azalia0: host: High Definition Audio rev. 1.0
azalia0: host: 4 output, 4 input, and 0 bidi streams
azalia_attach: resetting
azalia_attach: reset counter = 5000
azalia_attach: reset counter = 4985
azalia0: found a codec at #0
azalia0: found a codec at #1
azalia_init_corb: CORB allocation succeeded.
azalia_init_corb: CORBWP=0; size=256
azalia_init_rirb: RIRB allocation succeeded.
azalia_init_rirb: RIRBRP=0, size=256
azalia0: codec[0] vid 0x10ec0268, subid 0x30cc103c, rev. 0.3, HDA version 1.0
azalia_codec_init: nidstart=1 #functions=1
azalia_codec_init: FTYPE result = 0x00000101
azalia_codec_init: There are 35 widgets in the audio function.
azalia0: dac02 wcap=1d<FORMATOV,AMPOV,OUTAMP,STEREO>
azalia0: dac03 wcap=1d<FORMATOV,AMPOV,OUTAMP,STEREO>
azalia0: vendor04 wcap=f00000
azalia0: vendor05 wcap=f00000
azalia0: dac06 wcap=211<DIGITAL,FORMATOV,STEREO>
azalia0: adc07 wcap=100111<CONNLIST,FORMATOV,STEREO>
azalia0: adc08 wcap=100111<CONNLIST,FORMATOV,STEREO>
azalia0: vendor09 wcap=f00000
azalia0: vendor0a wcap=f00000
azalia0: vendor0b wcap=f00000
azalia0: vendor0c wcap=f00000
azalia0: vendor0d wcap=f00000
azalia0: mix0e wcap=20010a<CONNLIST,AMPOV,INAMP>
azalia0: mix0f wcap=20010b<CONNLIST,AMPOV,INAMP,STEREO>
azalia0: mix10 wcap=20010b<CONNLIST,AMPOV,INAMP,STEREO>
azalia0: vendor11 wcap=f00000
azalia0: black12 wcap=400001<STEREO>
azalia0: black13 wcap=400001<STEREO>
azalia0: unknown14 wcap=40018d<CONNLIST,UNSOL,AMPOV,OUTAMP,STEREO>
azalia0: black15 wcap=40018d<CONNLIST,UNSOL,AMPOV,OUTAMP,STEREO>
azalia0: black16 wcap=40010c<CONNLIST,AMPOV,OUTAMP>
azalia0: vendor17 wcap=f00000
azalia0: black18 wcap=40018f<CONNLIST,UNSOL,AMPOV,OUTAMP,INAMP,STEREO>
azalia0: unknown19 wcap=40008b<UNSOL,AMPOV,INAMP,STEREO>
azalia0: black1a wcap=40018f<CONNLIST,UNSOL,AMPOV,OUTAMP,INAMP,STEREO>
azalia0: vendor1b wcap=f00000
azalia0: black1c wcap=400001<STEREO>
azalia0: black1d wcap=400000
azalia0: unknown1e wcap=400380<DIGITAL,CONNLIST,UNSOL>
azalia0: vendor1f wcap=f00000
azalia0: vendor20 wcap=f00040<PROC>
azalia0: vendor21 wcap=f00000
azalia0: vendor22 wcap=f00000
azalia0: sel23 wcap=30010d<CONNLIST,AMPOV,OUTAMP,STEREO>
azalia0: sel24 wcap=30010d<CONNLIST,AMPOV,OUTAMP,STEREO>
azalia_generic_codec_add_convgroup: looking for analog DACs
azalia_generic_codec_add_convgroup: looking for digital DACs
azalia_generic_codec_add_convgroup: looking for analog ADCs
azalia_generic_codec_add_convgroup: looking for digital ADCs
azalia_codec_init: dacgroup[0]: 02 03
azalia_codec_init: dacgroup[1]: 06
azalia_codec_init: adcgroup[0]: 07 08
azalia0: codec[1] vid 0x10573055, subid 0x30cc103c, rev. 7.0, HDA version 1.0
azalia_codec_init: nidstart=1 #functions=1
azalia_codec_init: FTYPE result = 0x00000102
azalia0: codec[1]: No audio function groups
azalia0: codecs: Realtek ALC268, Motorola/0x3055, using Realtek ALC268
audio0 at azalia0

mixerctl -v

inputs.dac=81,81
inputs.dac2=126,126
inputs.mix_dac_mute=off  [ off on ]
inputs.mix2_dac_mute=off  [ off on ]
inputs.mix3_dac2_mute=off  [ off on ]
inputs.mix3_dac_mute=off  [ off on ]
outputs.spkr3_mute=off  [ off on ]
outputs.spkr3_dir=output  [ input output ]
outputs.spkr3_boost=off  [ off on ]
outputs.spkr3_eapd=on  [ off on ]
outputs.hp_mute=off  [ off on ]
outputs.hp_dir=output  [ input output ]
outputs.hp_boost=off  [ off on ]
outputs.hp_eapd=on  [ off on ]
outputs.mic_mute=off  [ off on ]
inputs.mic=127,127
outputs.mic_dir=input  [ input output ]
inputs.mic2=127,127
inputs.sel_source=hp  [ mic mic2 spkr3 hp ]
outputs.sel_mute=off  [ off on ]
outputs.sel=120,120
inputs.sel2_source=spkr3  [ mic mic2 spkr3 hp ]
outputs.sel2_mute=off  [ off on ]
outputs.sel2=120,120
outputs.hp_sense=plugged  [ unplugged plugged ]
outputs.mic_sense=unplugged  [ unplugged plugged ]
inputs.usingdac=0203  [ 0203 06 ]
outputs.master=81,81

Reply | Threaded
Open this post in threaded view
|

Re: azalia: better conveter group configuration

roberth-5
In reply to this post by j4nKy
On Wed, 26 Nov 2008 03:48:40 +0000
Jacob Meuser <[hidden email]> wrote:

> On Tue, Nov 25, 2008 at 10:36:13PM +0000, Jacob Meuser wrote:
> > On Mon, Nov 24, 2008 at 05:58:23AM +0000, Jacob Meuser wrote:
> > > On Sun, Nov 23, 2008 at 09:32:03PM +0000, Jacob Meuser wrote:
> > > > this is an important patch to test on all azalia.
> >
> > really, it is.  if we don't get this right, we will never be able
> > to get meaningful names in azalia's mixer.
> >
> > it's working correctly in most cases, but the hard ones are really
> > hard.  here's a new version which adds just a bit more useful
> > debug output and silences some we don't need right now.
>
> I think I've got it now.  this should be the last one of these to
> test.
>
> thanks for the feedback so far!
>
> > please also see http://jakemsr.trancell.org/
>
> that's been updated as well.
>

Hi Jacob,

i tested this on my Thinkpad X200.

This patch makes azalia cry and not want to attach anymore.

- Robert



OpenBSD 4.4-current (GENERIC.MP) #0: Wed Nov 26 15:49:43 CET 2008
    root@x200:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 2058498048 (1963MB)
avail mem = 1998499840 (1905MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xe0010 (62 entries)
bios0: vendor LENOVO version "6DET28WW (1.05 )" date 07/30/2008
bios0: LENOVO 74542GU
acpi0 at bios0: rev 2
acpi0: tables DSDT FACP SSDT ECDT APIC MCFG HPET SLIC BOOT ASF! SSDT TCPA SSDT SSDT SSDT
acpi0: wakeup devices LID_(S3) SLPB(S3) IGBE(S4) EXP0(S4) EXP1(S4) EXP2(S4) EXP3(S4) USB0(S3) USB1(S3) USB2(S3) USB3(S3) USB4(S3) USB5(S3) EHC0(S3) EHC1(S3) HDEF(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM)2 Duo CPU P8600 @ 2.40GHz, 2394.31 MHz
cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,SMX,EST,TM2,CX16,xTPR,NXE,LONG
cpu0: 3MB 64b/line 8-way L2 cache
cpu0: apic clock running at 266MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM)2 Duo CPU P8600 @ 2.40GHz, 2394.00 MHz
cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,SMX,EST,TM2,CX16,xTPR,NXE,LONG
cpu1: 3MB 64b/line 8-way L2 cache
ioapic0 at mainbus0 apid 1 pa 0xfec00000, version 20, 24 pins
ioapic0: misconfigured as apic 2, remapped to apid 1
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (AGP_)
acpiprt2 at acpi0: bus 2 (EXP0)
acpiprt3 at acpi0: bus 3 (EXP1)
acpiprt4 at acpi0: bus -1 (EXP2)
acpiprt5 at acpi0: bus 5 (EXP3)
acpiec0 at acpi0
acpicpu0 at acpi0: C3, C2, C1, PSS
acpicpu1 at acpi0: C3, C2, C1, PSS
acpitz0 at acpi0: critical temperature 127 degC
acpitz1 at acpi0: critical temperature 104 degC
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: SLPB
acpibat0 at acpi0: BAT0 not present
acpibat1 at acpi0: BAT1 not present
acpiac0 at acpi0: AC unit online
acpithinkpad0 at acpi0
acpidock at acpi0 not configured
acpivideo at acpi0 not configured
acpivideo at acpi0 not configured
cpu0: Enhanced SpeedStep 2394 MHz: speeds: 2401, 2400, 1600, 800 MHz
pci0 at mainbus0 bus 0: configuration mode 1
pchb0 at pci0 dev 0 function 0 "Intel GM45 Host" rev 0x07
vga1 at pci0 dev 2 function 0 "Intel GM45 Video" rev 0x07
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
intagp at vga1 not configured
inteldrm0 at vga1
drm0 at inteldrm0: couldn't find agp
"Intel GM45 Video" rev 0x07 at pci0 dev 2 function 1 not configured
"Intel GM45 HECI" rev 0x07 at pci0 dev 3 function 0 not configured
"Intel ICH9 IGP M AMT" rev 0x03 at pci0 dev 25 function 0 not configured
uhci0 at pci0 dev 26 function 0 "Intel 82801I USB" rev 0x03: apic 1 int 20 (irq 11)
uhci1 at pci0 dev 26 function 1 "Intel 82801I USB" rev 0x03: apic 1 int 21 (irq 11)
uhci2 at pci0 dev 26 function 2 "Intel 82801I USB" rev 0x03: apic 1 int 22 (irq 11)
ehci0 at pci0 dev 26 function 7 "Intel 82801I USB" rev 0x03: apic 1 int 23 (irq 11)
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
azalia0 at pci0 dev 27 function 0 "Intel 82801I HD Audio" rev 0x03: apic 1 int 17 (irq 11)
azalia0: host: High Definition Audio rev. 1.0
azalia0: host: 4 output, 4 input, and 0 bidi streams
azalia_attach: resetting
azalia_attach: reset counter = 4999
azalia_attach: reset counter = 4985
azalia0: found a codec at #0
azalia_init_corb: CORB allocation succeeded.
azalia_init_corb: CORBWP=0; size=256
azalia_init_rirb: RIRB allocation succeeded.
azalia_init_rirb: RIRBRP=0, size=256
azalia0: codec[0] vid 0x14f15051, subid 0x20f217aa, rev. 0.0, HDA version 1.0
azalia_codec_init: nidstart=1 #functions=2
azalia_codec_init: FTYPE result = 0x00000101
azalia_codec_init: There are 15 widgets in the audio function.
        encodings=1<PCM>
        PCM formats=e0160<24bit,20bit,16bit,96kHz,48kHz,44.1kHz>
        inamp: mute=0 size=0 steps=0 offset=0
        outamp: mute=0 size=0 steps=0 offset=0
        gpio: wake=0 unsol=1 gpis=0 gpos=0 gpios=4
azalia0: dac10 wcap=c1d<LRSWAP,POWER,FORMATOV,AMPOV,OUTAMP,STEREO>
        encodings=1<PCM>
        PCM formats=e0560<24bit,20bit,16bit,192kHz,96kHz,48kHz,44.1kHz>
        outamp: mute=0 size=3 steps=74 offset=74
azalia0: dac11 wcap=c1d<LRSWAP,POWER,FORMATOV,AMPOV,OUTAMP,STEREO>
        encodings=1<PCM>
        PCM formats=e0560<24bit,20bit,16bit,192kHz,96kHz,48kHz,44.1kHz>
        outamp: mute=0 size=3 steps=74 offset=74
azalia0: dac12 wcap=211<DIGITAL,FORMATOV,STEREO>
        encodings=5<AC3,PCM>
        PCM formats=e0160<24bit,20bit,16bit,96kHz,48kHz,44.1kHz>
azalia0: beep13 wcap=70000c<AMPOV,OUTAMP>
        outamp: mute=0 size=23 steps=3 offset=3
azalia0: adc14 wcap=100d1b<LRSWAP,POWER,CONNLIST,FORMATOV,AMPOV,INAMP,STEREO>
        encodings=1<PCM>
        PCM formats=e0160<24bit,20bit,16bit,96kHz,48kHz,44.1kHz>
        inamp: mute=0 size=3 steps=80 offset=74
        connections=0x1d,0x17; selected=0x1d
azalia0: adc15 wcap=100d1b<LRSWAP,POWER,CONNLIST,FORMATOV,AMPOV,INAMP,STEREO>
        encodings=1<PCM>
        PCM formats=e0160<24bit,20bit,16bit,96kHz,48kHz,44.1kHz>
        inamp: mute=0 size=3 steps=80 offset=74
        connections=0x18; selected=0x18
azalia0: green16 wcap=400581<POWER,CONNLIST,UNSOL,STEREO>
        cap=1c<OUTPUT,HEADPHONE,PRESENCE>
        [15/00] color=green device=hp conn=jack conntype=1/8
        location=right chassis=external special=none
        connections=0x10,0x11; selected=0x10
azalia0: pink17 wcap=40048b<POWER,UNSOL,AMPOV,INAMP,STEREO>
        cap=1224<VREF80,VREF50,INPUT,PRESENCE>
        [15/00] color=pink device=mic conn=none conntype=1/8
        location=rear chassis=separate special=none
        inamp: mute=0 size=39 steps=4 offset=0
azalia0: pink18 wcap=40048b<POWER,UNSOL,AMPOV,INAMP,STEREO>
        cap=1224<VREF80,VREF50,INPUT,PRESENCE>
        [15/00] color=pink device=mic conn=jack conntype=1/8
        location=right chassis=external special=none
        inamp: mute=0 size=39 steps=4 offset=0
azalia0: green19 wcap=400581<POWER,CONNLIST,UNSOL,STEREO>
        cap=14<OUTPUT,PRESENCE>
        [15/00] color=green device=hp conn=none conntype=1/8
        location=rear chassis=separate special=none
        connections=0x10,0x11; selected=0x11
azalia0: unknown1a wcap=400501<POWER,CONNLIST,STEREO>
        cap=10010<EAPD,OUTPUT>
        [15/00] color=unknown device=spkr conn=fixed conntype=analog
        location=n/a chassis=internal special=none
        connections=0x10,0x11; selected=0x10
azalia0: unknown1b wcap=400500<POWER,CONNLIST>
        cap=10010<EAPD,OUTPUT>
        [15/00] color=unknown device=other conn=none conntype=unknown
        location=n/a chassis=external special=none
        connections=0x10,0x11; selected=0x10
azalia0: unknown1c wcap=400701<POWER,DIGITAL,CONNLIST,STEREO>
        cap=10<OUTPUT>
        [15/00] color=unknown device=other conn=none conntype=unknown
        location=n/a chassis=external special=none
        connections=0x12; selected=0x12
azalia0: unknown1d wcap=40040b<POWER,AMPOV,INAMP,STEREO>
        cap=20<INPUT>
        [15/00] color=unknown device=mic conn=fixed conntype=digital
        location=n/a chassis=internal special=none
        inamp: mute=0 size=47 steps=4 offset=0
azalia0: vendor1e wcap=f00000
azalia_generic_codec_add_convgroup: looking for analog DACs
azalia_generic_codec_add_convgroup: looking for digital DACs
azalia_generic_codec_add_convgroup: looking for analog ADCs
azalia_generic_codec_add_convgroup: looking for digital ADCs
azalia0: invalid DAC PCM format: 0x00000000
azalia0: No codecs found
azalia_pci_detach
azalia_pci_detach: delete streams
azalia_pci_detach: delete codecs
azalia_pci_detach: delete CORB and RIRB
azalia_pci_detach: disable interrupts
azalia_pci_detach: clear interrupts
azalia_pci_detach: delete PCI resources
ppb0 at pci0 dev 28 function 0 "Intel 82801I PCIE" rev 0x03: apic 1 int 20 (irq 11)
pci1 at ppb0 bus 2
ppb1 at pci0 dev 28 function 1 "Intel 82801I PCIE" rev 0x03: apic 1 int 21 (irq 11)
pci2 at ppb1 bus 3
iwn0 at pci2 dev 0 function 0 "Intel WiFi Link 5100AGN" rev 0x00: apic 1 int 17 (irq 11), MIMO 1T2R, MoW, address 00:16:ea:bb:12:34
ppb2 at pci0 dev 28 function 3 "Intel 82801I PCIE" rev 0x03: apic 1 int 23 (irq 11)
pci3 at ppb2 bus 5
mskc0 at pci3 dev 0 function 0 "Marvell Yukon 88E8053" rev 0x20, Yukon-2 EC rev. A2 (0x1): apic 1 int 19 (irq 11)
msk0 at mskc0 port A: address 00:00:5a:00:12:34
eephy0 at msk0 phy 0: 88E1111 Gigabit PHY, rev. 2
uhci3 at pci0 dev 29 function 0 "Intel 82801I USB" rev 0x03: apic 1 int 16 (irq 11)
uhci4 at pci0 dev 29 function 1 "Intel 82801I USB" rev 0x03: apic 1 int 17 (irq 11)
uhci5 at pci0 dev 29 function 2 "Intel 82801I USB" rev 0x03: apic 1 int 18 (irq 11)
ehci1 at pci0 dev 29 function 7 "Intel 82801I USB" rev 0x03: apic 1 int 19 (irq 11)
usb1 at ehci1: USB revision 2.0
uhub1 at usb1 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb3 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0x93
pci4 at ppb3 bus 13
pcib0 at pci0 dev 31 function 0 "Intel 82801IEM LPC" rev 0x03
ahci0 at pci0 dev 31 function 2 "Intel 82801I AHCI" rev 0x03: apic 1 int 16 (irq 11), AHCI 1.2
scsibus0 at ahci0: 32 targets, initiator 32
sd0 at scsibus0 targ 0 lun 0: <ATA, FUJITSU MHZ2160B, 0084> SCSI3 0/direct fixed
sd0: 152627MB, 512 bytes/sec, 312581808 sec total
ichiic0 at pci0 dev 31 function 3 "Intel 82801I SMBus" rev 0x03: apic 1 int 23 (irq 11)
iic0 at ichiic0
usb2 at uhci0: USB revision 1.0
uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb3 at uhci1: USB revision 1.0
uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb4 at uhci2: USB revision 1.0
uhub4 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb5 at uhci3: USB revision 1.0
uhub5 at usb5 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb6 at uhci4: USB revision 1.0
uhub6 at usb6 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb7 at uhci5: USB revision 1.0
uhub7 at usb7 "Intel UHCI root hub" rev 1.00/1.00 addr 1
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: <PC speaker>
spkr0 at pcppi0
aps0 at isa0 port 0x1600/31
mtrr: Pentium Pro MTRR support
ugen0 at uhub3 port 1 "AuthenTec Fingerprint Sensor" rev 2.00/17.03 addr 2
softraid0 at root
root on sd0a swap on sd0b dump on sd0b

Reply | Threaded
Open this post in threaded view
|

Re: azalia: better conveter group configuration

j4nKy
On Wed, Nov 26, 2008 at 05:41:50PM +0100, Robert wrote:

> This patch makes azalia cry and not want to attach anymore.

oh, duh.  I'm clipping off the highest associations/sequences.  your
codec uses only the highest association, so it doesn't find anything.

in azalia_codec.c, in the function azalia_generic_codec_add_convgroup,
if you change the lines

        for (assoc = 0; assoc < CORB_CD_ASSOCIATION_MAX; assoc++) {
                for (seq = 0; seq < CORB_CD_SEQUENCE_MAX; seq++) {

to

        for (assoc = 0; assoc <= CORB_CD_ASSOCIATION_MAX; assoc++) {
                for (seq = 0; seq <= CORB_CD_SEQUENCE_MAX; seq++) {

it should work as expected.  can you verify that?

--
[hidden email]
SDF Public Access UNIX System - http://sdf.lonestar.org

Reply | Threaded
Open this post in threaded view
|

Re: azalia: better conveter group configuration

Zak B. Elep-6
In reply to this post by j4nKy
Jacob Meuser writes:
> I think I've got it now.  this should be the last one of these to test.

Here's my update from my MSI MegaBook S262:

dmesg:

OpenBSD 4.4-current (GENERIC.MP) #16: Thu Nov 27 18:42:27 PHT 2008
    [hidden email]:/usr/src/sys/arch/i386/compile/GENERIC.MP
cpu0: Genuine Intel(R) CPU T2300 @ 1.66GHz ("GenuineIntel" 686-class) 1.67 GHz
cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,EST,TM2,xTPR
real mem  = 1064726528 (1015MB)
avail mem = 1021206528 (973MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 06/21/06, BIOS32 rev. 0 @ 0xf0010, SMBIOS rev. 2.3 @ 0xfb340 (21 entries)
bios0: vendor American Megatrends Inc. version "A1057IMS V2.10" date 06/21/2006
bios0: MICRO-STAR INT'L CO.,LTD. MS-1057
acpi0 at bios0: rev 0
acpi0: tables DSDT FACP APIC MCFG OEMB ASF!
acpi0: wakeup devices P0PC(S4) USB0(S3) USB1(S3) USB2(S3) USB3(S3) EUSB(S3) MC97(S4) P0P7(S4) P0P8(S4) P0P9(S4) P0P1(S4) OZF1(S3) OZF2(S3) OZF3(S3) P0P5(S4) P0P4(S4) P0P3(S4) AZAL(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: apic clock running at 166MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Genuine Intel(R) CPU T2300 @ 1.66GHz ("GenuineIntel" 686-class) 1.67 GHz
cpu1: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,EST,TM2,xTPR
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 24 pins
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (P0P7)
acpiprt2 at acpi0: bus -1 (P0P8)
acpiprt3 at acpi0: bus -1 (P0P9)
acpiprt4 at acpi0: bus 1 (P0P1)
acpiprt5 at acpi0: bus 5 (P0P5)
acpiprt6 at acpi0: bus 4 (P0P4)
acpiprt7 at acpi0: bus 3 (P0P3)
acpiec0 at acpi0
acpicpu0 at acpi0: C3, C2
acpicpu1 at acpi0
acpitz0 at acpi0: critical temperature 99 degC
acpiac0 at acpi0: AC unit online
acpibat0 at acpi0: BAT1 model "MS-1057
" serial
 type LION
 oem "MSI Corp.
"
acpibtn0 at acpi0: PWRB
acpibtn1 at acpi0: LID0
acpibtn2 at acpi0: SLPB
acpivideo at acpi0 not configured
bios0: ROM list: 0xc0000/0xe600! 0xce800/0x1000
cpu0: unknown Enhanced SpeedStep CPU, msr 0x06130a2c06000a2c
cpu0: using only highest and lowest power states
cpu0: Enhanced SpeedStep 1667 MHz (1404 mV): speeds: 1667, 1000 MHz
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 "Intel 82945GM Host" rev 0x03
vga1 at pci0 dev 2 function 0 "Intel 82945GM Video" rev 0x03
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
intagp0 at vga1
agp0 at intagp0: aperture at 0xd0000000, size 0x10000000
inteldrm0 at vga1
drm0 at inteldrm0
"Intel 82945GM Video" rev 0x03 at pci0 dev 2 function 1 not configured
azalia0 at pci0 dev 27 function 0 "Intel 82801GB HD Audio" rev 0x02: apic 2 int 17 (irq 11)
azalia0: host: High Definition Audio rev. 1.0
azalia0: host: 4 output, 4 input, and 0 bidi streams
azalia_attach: resetting
azalia_attach: reset counter = 4999
azalia_attach: reset counter = 4984
azalia0: found a codec at #0
azalia0: found a codec at #1
azalia_init_corb: CORB allocation succeeded.
azalia_init_corb: CORBWP=0; size=256
azalia_init_rirb: RIRB allocation succeeded.
azalia_init_rirb: RIRBRP=0, size=256
azalia0: codec[0] vid 0x10ec0882, subid 0x05711462, rev. 1.1, HDA version 1.0
azalia_codec_init: nidstart=1 #functions=1
azalia_codec_init: FTYPE result = 0x00000001
azalia_codec_init: There are 37 widgets in the audio function.
        encodings=1<PCM>
        PCM formats=e0560<24bit,20bit,16bit,192kHz,96kHz,48kHz,44.1kHz>
        inamp: mute=0 size=0 steps=0 offset=0
        outamp: mute=0 size=0 steps=0 offset=0
        gpio: wake=0 unsol=1 gpis=0 gpos=0 gpios=2
azalia0: dac02 wcap=11<FORMATOV,STEREO>
        encodings=1<PCM>
        PCM formats=e0560<24bit,20bit,16bit,192kHz,96kHz,48kHz,44.1kHz>
azalia0: dac03 wcap=11<FORMATOV,STEREO>
        encodings=1<PCM>
        PCM formats=e0560<24bit,20bit,16bit,192kHz,96kHz,48kHz,44.1kHz>
azalia0: dac04 wcap=11<FORMATOV,STEREO>
        encodings=1<PCM>
        PCM formats=e0560<24bit,20bit,16bit,192kHz,96kHz,48kHz,44.1kHz>
azalia0: dac05 wcap=11<FORMATOV,STEREO>
        encodings=1<PCM>
        PCM formats=e0560<24bit,20bit,16bit,192kHz,96kHz,48kHz,44.1kHz>
azalia0: dac06 wcap=211<DIGITAL,FORMATOV,STEREO>
        encodings=1<PCM>
        PCM formats=1e0560<32bit,24bit,20bit,16bit,192kHz,96kHz,48kHz,44.1kHz>
azalia0: adc07 wcap=10011b<CONNLIST,FORMATOV,AMPOV,INAMP,STEREO>
        encodings=1<PCM>
        PCM formats=60160<20bit,16bit,96kHz,48kHz,44.1kHz>
        inamp: mute=1 size=5 steps=31 offset=8
        connections=0x24; selected=0x24
azalia0: adc08 wcap=10011b<CONNLIST,FORMATOV,AMPOV,INAMP,STEREO>
        encodings=1<PCM>
        PCM formats=60160<20bit,16bit,96kHz,48kHz,44.1kHz>
        inamp: mute=1 size=5 steps=31 offset=8
        connections=0x23; selected=0x23
azalia0: adc09 wcap=10011b<CONNLIST,FORMATOV,AMPOV,INAMP,STEREO>
        encodings=1<PCM>
        PCM formats=60160<20bit,16bit,96kHz,48kHz,44.1kHz>
        inamp: mute=1 size=5 steps=31 offset=8
        connections=0x22; selected=0x22
azalia0: adc0a wcap=100391<DIGITAL,CONNLIST,UNSOL,FORMATOV,STEREO>
        encodings=1<PCM>
        PCM formats=1e0560<32bit,24bit,20bit,16bit,192kHz,96kHz,48kHz,44.1kHz>
        connections=0x1f; selected=0x1f
azalia0: mix0b wcap=20010b<CONNLIST,AMPOV,INAMP,STEREO>
        inamp: mute=1 size=5 steps=31 offset=23
        connections=0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x14,0x15,0x16,0x17; selected=0x18
azalia0: mix0c wcap=20010f<CONNLIST,AMPOV,OUTAMP,INAMP,STEREO>
        inamp: mute=1 size=0 steps=0 offset=0
        outamp: mute=0 size=5 steps=31 offset=31
        connections=0x2,0xb; selected=0x2
azalia0: mix0d wcap=20010f<CONNLIST,AMPOV,OUTAMP,INAMP,STEREO>
        inamp: mute=1 size=0 steps=0 offset=0
        outamp: mute=0 size=5 steps=31 offset=31
        connections=0x3,0xb; selected=0x3
azalia0: mix0e wcap=20010f<CONNLIST,AMPOV,OUTAMP,INAMP,STEREO>
        inamp: mute=1 size=0 steps=0 offset=0
        outamp: mute=0 size=5 steps=31 offset=31
        connections=0x4,0xb; selected=0x4
azalia0: mix0f wcap=20010f<CONNLIST,AMPOV,OUTAMP,INAMP,STEREO>
        inamp: mute=1 size=0 steps=0 offset=0
        outamp: mute=0 size=5 steps=31 offset=31
        connections=0x5,0xb; selected=0x5
azalia0: vendor10 wcap=f00000
azalia0: vendor11 wcap=f00000
azalia0: vendor12 wcap=f00000
azalia0: vendor13 wcap=f00000
azalia0: green14 wcap=40018f<CONNLIST,UNSOL,AMPOV,OUTAMP,INAMP,STEREO>
        cap=3f<INPUT,OUTPUT,HEADPHONE,PRESENCE,TRIGGER,IMPEDANCE>
        [01/00] color=green device=hp conn=jack conntype=1/8
        location=rear chassis=external special=none
        inamp: mute=0 size=39 steps=3 offset=0
        outamp: mute=1 size=0 steps=0 offset=0
        connections=0xc,0xd,0xe,0xf,0x26; selected=0xc
azalia0: black15 wcap=40018f<CONNLIST,UNSOL,AMPOV,OUTAMP,INAMP,STEREO>
        cap=3f<INPUT,OUTPUT,HEADPHONE,PRESENCE,TRIGGER,IMPEDANCE>
        [15/00] color=black device=spkr conn=none conntype=1/8
        location=rear chassis=external special=none
        inamp: mute=0 size=39 steps=3 offset=0
        outamp: mute=1 size=0 steps=0 offset=0
        connections=0xc,0xd,0xe,0xf,0x26; selected=0xd
azalia0: black16 wcap=40018f<CONNLIST,UNSOL,AMPOV,OUTAMP,INAMP,STEREO>
        cap=3f<INPUT,OUTPUT,HEADPHONE,PRESENCE,TRIGGER,IMPEDANCE>
        [15/00] color=black device=spkr conn=none conntype=1/8
        location=rear chassis=external special=none
        inamp: mute=0 size=39 steps=3 offset=0
        outamp: mute=1 size=0 steps=0 offset=0
        connections=0xc,0xd,0xe,0xf,0x26; selected=0xe
azalia0: black17 wcap=40018f<CONNLIST,UNSOL,AMPOV,OUTAMP,INAMP,STEREO>
        cap=3f<INPUT,OUTPUT,HEADPHONE,PRESENCE,TRIGGER,IMPEDANCE>
        [15/00] color=black device=spkr conn=none conntype=1/8
        location=rear chassis=external special=none
        inamp: mute=0 size=39 steps=3 offset=0
        outamp: mute=1 size=0 steps=0 offset=0
        connections=0xc,0xd,0xe,0xf,0x26; selected=0xf
azalia0: pink18 wcap=40018f<CONNLIST,UNSOL,AMPOV,OUTAMP,INAMP,STEREO>
        cap=173f<VREF80,VREFGND,VREF50,VREFHIZ,INPUT,OUTPUT,HEADPHONE,PRESENCE,TRIGGER,IMPEDANCE>
        [03/00] color=pink device=mic conn=jack conntype=1/8
        location=rear chassis=external special=none
        inamp: mute=0 size=39 steps=3 offset=0
        outamp: mute=1 size=0 steps=0 offset=0
        connections=0xc,0xd,0xe,0xf,0x26; selected=0xc
azalia0: black19 wcap=40018f<CONNLIST,UNSOL,AMPOV,OUTAMP,INAMP,STEREO>
        cap=173f<VREF80,VREFGND,VREF50,VREFHIZ,INPUT,OUTPUT,HEADPHONE,PRESENCE,TRIGGER,IMPEDANCE>
        [15/00] color=black device=spkr conn=none conntype=1/8
        location=rear chassis=external special=none
        inamp: mute=0 size=39 steps=3 offset=0
        outamp: mute=1 size=0 steps=0 offset=0
        connections=0xc,0xd,0xe,0xf,0x26; selected=0xc
azalia0: black1a wcap=40018f<CONNLIST,UNSOL,AMPOV,OUTAMP,INAMP,STEREO>
        cap=173f<VREF80,VREFGND,VREF50,VREFHIZ,INPUT,OUTPUT,HEADPHONE,PRESENCE,TRIGGER,IMPEDANCE>
        [15/00] color=black device=spkr conn=none conntype=1/8
        location=rear chassis=external special=none
        inamp: mute=0 size=39 steps=3 offset=0
        outamp: mute=1 size=0 steps=0 offset=0
        connections=0xc,0xd,0xe,0xf,0x26; selected=0xc
azalia0: black1b wcap=40018f<CONNLIST,UNSOL,AMPOV,OUTAMP,INAMP,STEREO>
        cap=173f<VREF80,VREFGND,VREF50,VREFHIZ,INPUT,OUTPUT,HEADPHONE,PRESENCE,TRIGGER,IMPEDANCE>
        [15/00] color=black device=spkr conn=none conntype=1/8
        location=rear chassis=external special=none
        inamp: mute=0 size=39 steps=3 offset=0
        outamp: mute=1 size=0 steps=0 offset=0
        connections=0xc,0xd,0xe,0xf,0x26; selected=0xc
azalia0: unknown1c wcap=400001<STEREO>
        cap=20<INPUT>
        [03/01] color=unknown device=cd conn=fixed conntype=atapi
        location=spec2 chassis=internal special=atapi
azalia0: unknown1d wcap=400000
        cap=20<INPUT>
        [03/15] color=unknown device=line conn=fixed conntype=atapi
        location=spec2 chassis=internal special=atapi
azalia0: unknown1e wcap=400300<DIGITAL,CONNLIST>
        cap=10<OUTPUT>
        [02/00] color=unknown device=SPDIF-out conn=fixed conntype=atapi
        location=spec2 chassis=internal special=atapi
        connections=0x6; selected=0x6
azalia0: black1f wcap=400200<DIGITAL>
        cap=20<INPUT>
        [15/00] color=black device=spkr conn=none conntype=1/8
        location=rear chassis=external special=none
azalia0: vendor20 wcap=f00040<PROC>
azalia0: volume21 wcap=600080<UNSOL>
        delta=0 steps=32
azalia0: mix22 wcap=20010f<CONNLIST,AMPOV,OUTAMP,INAMP,STEREO>
        inamp: mute=1 size=0 steps=0 offset=0
        outamp: mute=0 size=0 steps=0 offset=0
        connections=0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x14,0x15,0x16,0x17,0xb; selected=0x18
azalia0: mix23 wcap=20010f<CONNLIST,AMPOV,OUTAMP,INAMP,STEREO>
        inamp: mute=1 size=0 steps=0 offset=0
        outamp: mute=0 size=0 steps=0 offset=0
        connections=0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x14,0x15,0x16,0x17,0xb; selected=0x18
azalia0: mix24 wcap=20010f<CONNLIST,AMPOV,OUTAMP,INAMP,STEREO>
        inamp: mute=1 size=0 steps=0 offset=0
        outamp: mute=0 size=0 steps=0 offset=0
        connections=0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x14,0x15,0x16,0x17,0xb; selected=0x18
azalia0: dac25 wcap=11<FORMATOV,STEREO>
        encodings=1<PCM>
        PCM formats=e0560<24bit,20bit,16bit,192kHz,96kHz,48kHz,44.1kHz>
azalia0: mix26 wcap=20010f<CONNLIST,AMPOV,OUTAMP,INAMP,STEREO>
        inamp: mute=1 size=0 steps=0 offset=0
        outamp: mute=0 size=5 steps=31 offset=31
        connections=0x25,0xb; selected=0x25
azalia_generic_codec_add_convgroup: looking for analog DACs
        pin=14, assoc=1, seq=0: depth=2:02 depth=2:03 depth=2:04 depth=2:05 depth=2:25
azalia_generic_codec_add_convgroup: looking for digital DACs
        pin=1e, assoc=2, seq=0: depth=1:06
azalia_generic_codec_add_convgroup: looking for analog ADCs
        pin=18, assoc=3, seq=0: depth=2:07 depth=2:08 depth=2:09
azalia_generic_codec_add_convgroup: looking for digital ADCs
azalia_codec_init: dacgroup[0]: 02 03 04 05 25
azalia_codec_init: dacgroup[1]: 06
azalia_codec_init: adcgroup[0]: 07 08 09
azalia0: codec[1] vid 0x11c13055, subid 0x05711462, rev. 7.0, HDA version 1.0
azalia_codec_init: nidstart=1 #functions=1
azalia_codec_init: FTYPE result = 0x00000102
azalia0: codec[1]: No audio function groups
azalia0: codecs: Realtek ALC882, AT&T/Lucent/0x3055, using Realtek ALC882
audio0 at azalia0
ppb0 at pci0 dev 28 function 0 "Intel 82801GB PCIE" rev 0x02: apic 2 int 16 (irq 5)
pci1 at ppb0 bus 5
ppb1 at pci0 dev 28 function 1 "Intel 82801GB PCIE" rev 0x02: apic 2 int 17 (irq 11)
pci2 at ppb1 bus 4
re0 at pci2 dev 0 function 0 "Realtek 8168" rev 0x01: RTL8168 1 (0x3000), apic 2 int 17 (irq 11), address 00:16:17:4d:b7:f8
rgephy0 at re0 phy 7: RTL8169S/8110S PHY, rev. 2
ppb2 at pci0 dev 28 function 2 "Intel 82801GB PCIE" rev 0x02: apic 2 int 18 (irq 10)
pci3 at ppb2 bus 3
wpi0 at pci3 dev 0 function 0 "Intel PRO/Wireless 3945ABG" rev 0x02: apic 2 int 18 (irq 10), MoW2, address 00:13:02:02:14:45
uhci0 at pci0 dev 29 function 0 "Intel 82801GB USB" rev 0x02: apic 2 int 23 (irq 15)
uhci1 at pci0 dev 29 function 1 "Intel 82801GB USB" rev 0x02: apic 2 int 19 (irq 3)
uhci2 at pci0 dev 29 function 2 "Intel 82801GB USB" rev 0x02: apic 2 int 18 (irq 10)
uhci3 at pci0 dev 29 function 3 "Intel 82801GB USB" rev 0x02: apic 2 int 16 (irq 5)
ehci0 at pci0 dev 29 function 7 "Intel 82801GB USB" rev 0x02: apic 2 int 23 (irq 15)
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb3 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0xe2
pci4 at ppb3 bus 1
"O2 Micro Firewire" rev 0x02 at pci4 dev 4 function 0 not configured
sdhc0 at pci4 dev 4 function 2 "O2 Micro OZ711MP1 SDHC" rev 0x01: apic 2 int 16 (irq 5)
sdmmc0 at sdhc0
"O2 Micro OZ711MP1 XDHC" rev 0x01 at pci4 dev 4 function 3 not configured
ichpcib0 at pci0 dev 31 function 0 "Intel 82801GBM LPC" rev 0x02: PM disabled
pciide0 at pci0 dev 31 function 1 "Intel 82801GB IDE" rev 0x02: DMA, channel 0 configured to compatibility, channel 1 configured to compatibility
wd0 at pciide0 channel 0 drive 0: <WDC WD800VE-00HDT0>
wd0: 16-sector PIO, LBA, 76319MB, 156301488 sectors
atapiscsi0 at pciide0 channel 0 drive 1
scsibus0 at atapiscsi0: 2 targets, initiator 7
cd0 at scsibus0 targ 0 lun 0: <HL-DT-ST, DVD-RW GWA-4082N, CB03> ATAPI 5/cdrom removable
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5
cd0(pciide0:0:1): using PIO mode 4, Ultra-DMA mode 2
pciide0: channel 1 ignored (disabled)
ichiic0 at pci0 dev 31 function 3 "Intel 82801GB SMBus" rev 0x02: apic 2 int 19 (irq 3)
iic0 at ichiic0
spdmem0 at iic0 addr 0x52: 1GB DDR2 SDRAM non-parity PC2-5300CL5 SO-DIMM
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb2 at uhci1: USB revision 1.0
uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb3 at uhci2: USB revision 1.0
uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb4 at uhci3: USB revision 1.0
uhub4 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1
isa0 at ichpcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pmsi0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pmsi0 mux 0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: <PC speaker>
spkr0 at pcppi0
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
mtrr: Pentium Pro MTRR support
ubt0 at uhub4 port 2 "Cambridge Silicon Radio Bluetooth" rev 2.00/15.93 addr 2
uhidev0 at uhub1 port 2 configuration 1 interface 0 "Logitech USB Receiver" rev 2.00/57.01 addr 2
uhidev0: iclass 3/1
ums0 at uhidev0: 16 buttons, Z dir
wsmouse1 at ums0 mux 0
uhidev1 at uhub1 port 2 configuration 1 interface 1 "Logitech USB Receiver" rev 2.00/57.01 addr 2
uhidev1: iclass 3/0, 17 report ids
uhid0 at uhidev1 reportid 3: input=4, output=0, feature=0
uhid1 at uhidev1 reportid 16: input=6, output=6, feature=0
uhid2 at uhidev1 reportid 17: input=19, output=19, feature=0
softraid0 at root
root on wd0a swap on wd0b dump on wd0b

mixerctl -av:

record.adc_mute=off  [ off on ]
record.adc=120,120
record.adc2_mute=off  [ off on ]
record.adc2=120,120
record.adc3_mute=off  [ off on ]
record.adc3=120,120
inputs.mix_mic_mute=off  [ off on ]
inputs.mix_cd_mute=off  [ off on ]
inputs.mix_line_mute=off  [ off on ]
inputs.mix_hp_mute=off  [ off on ]
inputs.mix_mic=120,120
inputs.mix_cd=120,120
inputs.mix_line=120
inputs.mix_hp=120,120
outputs.mix2=120,120
inputs.mix2_dac_mute=off  [ off on ]
inputs.mix2_mix_mute=off  [ off on ]
outputs.mix3=120,120
inputs.mix3_dac2_mute=off  [ off on ]
inputs.mix3_mix_mute=off  [ off on ]
outputs.mix4=120,120
inputs.mix4_dac3_mute=off  [ off on ]
inputs.mix4_mix_mute=off  [ off on ]
outputs.mix5=120,120
inputs.mix5_dac4_mute=off  [ off on ]
inputs.mix5_mix_mute=off  [ off on ]
outputs.hp_source=mix2  [ mix2 mix3 mix4 mix5 mix9 ]
outputs.hp_mute=off  [ off on ]
inputs.hp=85,85
outputs.hp_dir=output  [ input output ]
outputs.hp_boost=off  [ off on ]
outputs.mic_source=mix2  [ mix2 mix3 mix4 mix5 mix9 ]
outputs.mic_mute=off  [ off on ]
inputs.mic=85,85
outputs.mic_dir=input  [ input output ]
outputs.mic_boost=off  [ off on ]
record.mix6_mic_mute=off  [ off on ]
record.mix6_cd_mute=off  [ off on ]
record.mix6_line_mute=off  [ off on ]
record.mix6_hp_mute=off  [ off on ]
record.mix6_mix_mute=off  [ off on ]
record.mix7_mic_mute=off  [ off on ]
record.mix7_cd_mute=off  [ off on ]
record.mix7_line_mute=off  [ off on ]
record.mix7_hp_mute=off  [ off on ]
record.mix7_mix_mute=off  [ off on ]
record.mix8_mic_mute=off  [ off on ]
record.mix8_cd_mute=off  [ off on ]
record.mix8_line_mute=off  [ off on ]
record.mix8_hp_mute=off  [ off on ]
record.mix8_mix_mute=off  [ off on ]
outputs.mix9=120,120
inputs.mix9_dac6_mute=off  [ off on ]
inputs.mix9_mix_mute=off  [ off on ]
outputs.hp_sense=unplugged  [ unplugged plugged ]
outputs.mic_sense=unplugged  [ unplugged plugged ]
inputs.usingdac=0203040525  [ 0203040525 06 ]
outputs.master=120,120
record.volume=120,120

No changes with the sound output.  External volume increase/decrese
controls still work, but not muting.

Cheers,

Zak


--
  I like the idea of 256 bits, though: 32 for the (Unicode) character leaves
  room for 224 Bucky bits, which ought to be enough for anyone.
                                -- Roland Hutchinson, in alt.folklore.computers

12