static int mc13783_probe(struct snd_soc_component *component) { struct mc13783_priv *priv = snd_soc_component_get_drvdata(component); snd_soc_component_init_regmap(component, dev_get_regmap(component->dev->parent, NULL)); /* these are the reset values */ mc13xxx_reg_write(priv->mc13xxx, MC13783_AUDIO_RX0, 0x25893); mc13xxx_reg_write(priv->mc13xxx, MC13783_AUDIO_RX1, 0x00d35A); mc13xxx_reg_write(priv->mc13xxx, MC13783_AUDIO_TX, 0x420000); mc13xxx_reg_write(priv->mc13xxx, MC13783_SSI_NETWORK, 0x013060); mc13xxx_reg_write(priv->mc13xxx, MC13783_AUDIO_CODEC, 0x180027); mc13xxx_reg_write(priv->mc13xxx, MC13783_AUDIO_DAC, 0x0e0004); if (priv->adc_ssi_port == MC13783_SSI1_PORT) mc13xxx_reg_rmw(priv->mc13xxx, MC13783_AUDIO_CODEC, AUDIO_SSI_SEL, 0); else mc13xxx_reg_rmw(priv->mc13xxx, MC13783_AUDIO_CODEC, AUDIO_SSI_SEL, AUDIO_SSI_SEL); if (priv->dac_ssi_port == MC13783_SSI1_PORT) mc13xxx_reg_rmw(priv->mc13xxx, MC13783_AUDIO_DAC, AUDIO_SSI_SEL, 0); else mc13xxx_reg_rmw(priv->mc13xxx, MC13783_AUDIO_DAC, AUDIO_SSI_SEL, AUDIO_SSI_SEL); return 0; }
static int si476x_probe(struct snd_soc_component *component) { snd_soc_component_init_regmap(component, dev_get_regmap(component->dev->parent, NULL)); return 0; }
static int wm9712_soc_probe(struct snd_soc_component *component) { struct wm9712_priv *wm9712 = snd_soc_component_get_drvdata(component); struct regmap *regmap; int ret; if (wm9712->mfd_pdata) { wm9712->ac97 = wm9712->mfd_pdata->ac97; regmap = wm9712->mfd_pdata->regmap; } else { #ifdef CONFIG_SND_SOC_AC97_BUS wm9712->ac97 = snd_soc_new_ac97_component(component, WM9712_VENDOR_ID, WM9712_VENDOR_ID_MASK); if (IS_ERR(wm9712->ac97)) { ret = PTR_ERR(wm9712->ac97); dev_err(component->dev, "Failed to register AC97 codec: %d\n", ret); return ret; } regmap = regmap_init_ac97(wm9712->ac97, &wm9712_regmap_config); if (IS_ERR(regmap)) { snd_soc_free_ac97_component(wm9712->ac97); return PTR_ERR(regmap); } #endif } snd_soc_component_init_regmap(component, regmap); /* set alc mux to none */ snd_soc_component_update_bits(component, AC97_VIDEO, 0x3000, 0x3000); return 0; }
static int cq93vc_probe(struct snd_soc_component *component) { struct davinci_vc *davinci_vc = component->dev->platform_data; snd_soc_component_init_regmap(component, davinci_vc->regmap); return 0; }
static int mt6351_codec_probe(struct snd_soc_component *cmpnt) { struct mt6351_priv *priv = snd_soc_component_get_drvdata(cmpnt); snd_soc_component_init_regmap(cmpnt, priv->regmap); mt6351_codec_init_reg(cmpnt); return 0; }
static int ad1980_soc_probe(struct snd_soc_component *component) { struct snd_ac97 *ac97; struct regmap *regmap; int ret; u16 vendor_id2; u16 ext_status; ac97 = snd_soc_new_ac97_component(component, 0, 0); if (IS_ERR(ac97)) { ret = PTR_ERR(ac97); dev_err(component->dev, "Failed to register AC97 component: %d\n", ret); return ret; } regmap = regmap_init_ac97(ac97, &ad1980_regmap_config); if (IS_ERR(regmap)) { ret = PTR_ERR(regmap); goto err_free_ac97; } snd_soc_component_init_regmap(component, regmap); snd_soc_component_set_drvdata(component, ac97); ret = ad1980_reset(component, 0); if (ret < 0) goto reset_err; vendor_id2 = snd_soc_component_read32(component, AC97_VENDOR_ID2); if (vendor_id2 == 0x5374) { dev_warn(component->dev, "Found AD1981 - only 2/2 IN/OUT Channels supported\n"); } /* unmute captures and playbacks volume */ snd_soc_component_write(component, AC97_MASTER, 0x0000); snd_soc_component_write(component, AC97_PCM, 0x0000); snd_soc_component_write(component, AC97_REC_GAIN, 0x0000); snd_soc_component_write(component, AC97_CENTER_LFE_MASTER, 0x0000); snd_soc_component_write(component, AC97_SURROUND_MASTER, 0x0000); /*power on LFE/CENTER/Surround DACs*/ ext_status = snd_soc_component_read32(component, AC97_EXTENDED_STATUS); snd_soc_component_write(component, AC97_EXTENDED_STATUS, ext_status&~0x3800); return 0; reset_err: snd_soc_component_exit_regmap(component); err_free_ac97: snd_soc_free_ac97_component(ac97); return ret; }