DMIC & HS_MIC

今日重看录音问题,发现有两个缩写,DMIC和HS_MIC,还不认识我呢。此外还有一个AMIC,呵呵。

 

在网上找到两个文件,intelmid_ctrl.c和intelmid_v2_control.c,有使用这些参数的代码。

 

=================

static char *out_names_mrst[] = {"Headphones",
    "Internal speakers"};
static char *in_names_mrst[] = {"AMIC",
    "DMIC",
    "HS_MIC"};
static char *out_names_mfld[] = {"Headset ",
    "EarPiece  "};
static char *in_names_mfld[] = {"AMIC",
    "DMIC"};

 

=================

static int nc_set_selected_input_dev(u8 value)
{
 struct sc_reg_access sc_access[6];
 u8 num_val;
 int retval = 0;

 if (snd_pmic_ops_nc.card_status == SND_CARD_UN_INIT)
  retval = nc_init_card();
 if (retval)
  return retval;
 snd_pmic_ops_nc.input_dev_id = value;

 pr_debug("nc set selected input:%d/n", value);

 switch (value) {
 case AMIC:
  pr_debug("Selecting AMIC/n");
  sc_access[0].reg_addr = 0x107;
  sc_access[0].value = 0x40;
  sc_access[0].mask =  MASK6|MASK4|MASK3|MASK1|MASK0;
  sc_access[1].reg_addr = 0x10a;
  sc_access[1].value = 0x40;
  sc_access[1].mask = MASK6;
  sc_access[2].reg_addr = 0x109;
  sc_access[2].value = 0x00;
  sc_access[2].mask = MASK6;
  sc_access[3].reg_addr = 0x105;
  sc_access[3].value = 0x40;
  sc_access[3].mask = MASK6;
  num_val = 4;
  break;

 case HS_MIC:
  pr_debug("Selecting HS_MIC/n");
  sc_access[0].reg_addr = 0x107;
  sc_access[0].mask =  MASK6|MASK4|MASK3|MASK1|MASK0;
  sc_access[0].value = 0x10;
  sc_access[1].reg_addr = 0x109;
  sc_access[1].mask = MASK6;
  sc_access[1].value = 0x40;
  sc_access[2].reg_addr = 0x10a;
  sc_access[2].mask = MASK6;
  sc_access[2].value = 0x00;
  sc_access[3].reg_addr = 0x105;
  sc_access[3].value = 0x40;
  sc_access[3].mask = MASK6;
  num_val = 4;
  break;

 case DMIC:
  pr_debug("DMIC/n");
  sc_access[0].reg_addr = 0x107;
  sc_access[0].mask = MASK6|MASK4|MASK3|MASK1|MASK0;
  sc_access[0].value = 0x0B;
  sc_access[1].reg_addr = 0x105;
  sc_access[1].value = 0x80;
  sc_access[1].mask = MASK7|MASK6;
  sc_access[2].reg_addr = 0x10a;
  sc_access[2].value = 0x40;
  sc_access[2].mask = MASK6;
  sc_access[3].reg_addr = 0x109;
  sc_access[3].mask = MASK6;
  sc_access[3].value = 0x00;
  sc_access[4].reg_addr = 0x104;
  sc_access[4].value = 0x3C;
  sc_access[4].mask = 0xff;
  num_val = 5;
  break;
 default:
  return -EINVAL;
 }
 return sst_sc_reg_access(sc_access, PMIC_READ_MODIFY, num_val);
}

你可能感兴趣的:(DMIC & HS_MIC)