Lines Matching defs:component
341 struct snd_soc_component *component = codec_dai->component;
342 u16 iface = snd_soc_component_read(component, WM8940_IFACE) & 0xFE67;
343 u16 clk = snd_soc_component_read(component, WM8940_CLOCK) & 0x1fe;
354 snd_soc_component_write(component, WM8940_CLOCK, clk);
387 snd_soc_component_write(component, WM8940_IFACE, iface);
397 struct snd_soc_component *component = dai->component;
398 struct wm8940_priv *priv = snd_soc_component_get_drvdata(component);
399 u16 iface = snd_soc_component_read(component, WM8940_IFACE) & 0xFD9F;
400 u16 addcntrl = snd_soc_component_read(component, WM8940_ADDCNTRL) & 0xFFF1;
401 u16 companding = snd_soc_component_read(component,
435 ret = snd_soc_component_write(component, WM8940_ADDCNTRL, addcntrl);
455 ret = snd_soc_component_write(component, WM8940_COMPANDINGCTL, companding);
458 ret = snd_soc_component_write(component, WM8940_IFACE, iface);
466 struct snd_soc_component *component = dai->component;
467 u16 mute_reg = snd_soc_component_read(component, WM8940_DAC) & 0xffbf;
472 return snd_soc_component_write(component, WM8940_DAC, mute_reg);
475 static int wm8940_set_bias_level(struct snd_soc_component *component,
478 struct wm8940_priv *wm8940 = snd_soc_component_get_drvdata(component);
480 u16 pwr_reg = snd_soc_component_read(component, WM8940_POWER1) & 0x1F0;
488 val = snd_soc_component_read(component, WM8940_OUTPUTCTL);
489 ret = snd_soc_component_write(component, WM8940_OUTPUTCTL, val | 0x2);
493 ret = snd_soc_component_write(component, WM8940_POWER1, pwr_reg | 0x1);
498 ret = snd_soc_component_write(component, WM8940_POWER1, pwr_reg | 0x1);
501 if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF) {
504 dev_err(component->dev, "Failed to sync cache: %d\n", ret);
512 ret = snd_soc_component_write(component, WM8940_POWER1, pwr_reg | 0x2);
515 ret = snd_soc_component_write(component, WM8940_POWER1, pwr_reg);
585 struct snd_soc_component *component = codec_dai->component;
589 reg = snd_soc_component_read(component, WM8940_POWER1);
590 snd_soc_component_write(component, WM8940_POWER1, reg & 0x1df);
594 reg = snd_soc_component_read(component, WM8940_CLOCK);
595 snd_soc_component_write(component, WM8940_CLOCK, reg & 0x0ff);
597 snd_soc_component_write(component, WM8940_PLLN, (1 << 7));
604 snd_soc_component_write(component, WM8940_PLLN,
606 else /* No factional component */
607 snd_soc_component_write(component, WM8940_PLLN,
609 snd_soc_component_write(component, WM8940_PLLK1, pll_div.k >> 18);
610 snd_soc_component_write(component, WM8940_PLLK2, (pll_div.k >> 9) & 0x1ff);
611 snd_soc_component_write(component, WM8940_PLLK3, pll_div.k & 0x1ff);
613 reg = snd_soc_component_read(component, WM8940_POWER1);
614 snd_soc_component_write(component, WM8940_POWER1, reg | 0x020);
617 reg = snd_soc_component_read(component, WM8940_CLOCK);
618 snd_soc_component_write(component, WM8940_CLOCK, reg | 0x100);
626 struct snd_soc_component *component = codec_dai->component;
632 reg = snd_soc_component_read(component, WM8940_CLOCK) & 0xFFE3;
633 ret = snd_soc_component_write(component, WM8940_CLOCK, reg | (div << 2));
636 reg = snd_soc_component_read(component, WM8940_CLOCK) & 0xFF1F;
637 ret = snd_soc_component_write(component, WM8940_CLOCK, reg | (div << 5));
640 reg = snd_soc_component_read(component, WM8940_GPIO) & 0xFFCF;
641 ret = snd_soc_component_write(component, WM8940_GPIO, reg | (div << 4));
681 struct snd_soc_component *codec = dai->component;
708 struct snd_soc_component *codec = dai->component;
757 static int wm8940_probe(struct snd_soc_component *component)
759 struct wm8940_setup_data *pdata = component->dev->platform_data;
768 reg = snd_soc_component_read(component, WM8940_SOFTRESET);
770 dev_err(component->dev, "Wrong wm8940 chip ID: 0x%x\n", reg);
774 ret = wm8940_reset(component);
776 dev_err(component->dev, "Failed to issue reset\n");
780 snd_soc_component_force_bias_level(component, SND_SOC_BIAS_STANDBY);
782 ret = snd_soc_component_write(component, WM8940_POWER1, 0x180);
787 reg = snd_soc_component_read(component, WM8940_OUTPUTCTL);
788 ret = snd_soc_component_write(component, WM8940_OUTPUTCTL, reg | pdata->vroi);