5463 pin = (audiohd_pin_t *)widget->priv;
5464 if (pin->device == DTYPE_SPEAKER) {
5465 audiohd_disable_pin(statep,
5466 path->codec->index,
5467 pin->wid);
5468 }
5469 }
5470 }
5471 }
5472 }
5473 /*
5474 * audiohd_select_mic()
5475 *
5476 * Description:
5477 * This function is used for the recording path which has a selector
5478 * as the sumwidget. We select the external MIC if it is plugged into the
5479 * MIC jack, otherwise the internal integrated MIC is selected.
5480 */
5481 static void
5482 audiohd_select_mic(audiohd_state_t *statep, uint8_t index,
5483 uint8_t id, int select)
5484 {
5485 hda_codec_t *codec;
5486 audiohd_path_t *path;
5487 audiohd_widget_t *widget, *sumwgt = NULL;
5488 audiohd_pin_t *pin;
5489 int i, j;
5490 wid_t wid;
5491
5492 codec = statep->codec[index];
5493 if (codec == NULL)
5494 return;
5495
5496 for (i = 0; i < statep->pathnum; i++) {
5497 path = statep->path[i];
5498 if (path->codec != codec || path->path_type != RECORD)
5499 continue;
5500 sumwgt = codec->widget[path->sum_wid];
5501
5502 for (j = 0; j < path->pin_nums; j++) {
5503 wid = path->pin_wid[j];
|
5463 pin = (audiohd_pin_t *)widget->priv;
5464 if (pin->device == DTYPE_SPEAKER) {
5465 audiohd_disable_pin(statep,
5466 path->codec->index,
5467 pin->wid);
5468 }
5469 }
5470 }
5471 }
5472 }
5473 /*
5474 * audiohd_select_mic()
5475 *
5476 * Description:
5477 * This function is used for the recording path which has a selector
5478 * as the sumwidget. We select the external MIC if it is plugged into the
5479 * MIC jack, otherwise the internal integrated MIC is selected.
5480 */
5481 static void
5482 audiohd_select_mic(audiohd_state_t *statep, uint8_t index,
5483 uint8_t id, int select)
5484 {
5485 hda_codec_t *codec;
5486 audiohd_path_t *path;
5487 audiohd_widget_t *widget, *sumwgt = NULL;
5488 audiohd_pin_t *pin;
5489 int i, j;
5490 wid_t wid;
5491
5492 codec = statep->codec[index];
5493 if (codec == NULL)
5494 return;
5495
5496 for (i = 0; i < statep->pathnum; i++) {
5497 path = statep->path[i];
5498 if (path->codec != codec || path->path_type != RECORD)
5499 continue;
5500 sumwgt = codec->widget[path->sum_wid];
5501
5502 for (j = 0; j < path->pin_nums; j++) {
5503 wid = path->pin_wid[j];
|