headphones are attached.
- simple-audio-card,mic-det-gpio : Reference to GPIO that signals when
a microphone is attached.
++ +++- simple-audio-card,aux-devs : List of phandles pointing to auxiliary devices, such
++ +++ as amplifiers, to be added to the sound card.
Optional subnodes:
sub-nodes. This container may be
omitted when the card has only one
DAI link. See the examples and the
- section bellow.
+ section below.
Dai-link subnode properties and subnodes:
};
};
};
++ +++
++ +++Example 3 - route audio from IMX6 SSI2 through TLV320DAC3100 codec
++ +++through TPA6130A2 amplifier to headphones:
++ +++
++ +++&i2c0 {
++ +++ codec: tlv320dac3100@18 {
++ +++ compatible = "ti,tlv320dac3100";
++ +++ ...
++ +++ }
++ +++
++ +++ amp: tpa6130a2@60 {
++ +++ compatible = "ti,tpa6130a2";
++ +++ ...
++ +++ }
++ +++}
++ +++
++ +++sound {
++ +++ compatible = "simple-audio-card";
++ +++ ...
++ +++ simple-audio-card,widgets =
++ +++ "Headphone", "Headphone Jack";
++ +++ simple-audio-card,routing =
++ +++ "Headphone Jack", "HPLEFT",
++ +++ "Headphone Jack", "HPRIGHT",
++ +++ "LEFTIN", "HPL",
++ +++ "RIGHTIN", "HPR";
++ +++ simple-audio-card,aux-devs = <&>;
++ +++ simple-audio-card,cpu {
++ +++ sound-dai = <&ssi2>;
++ +++ };
++ +++ simple-audio-card,codec {
++ +++ sound-dai = <&codec>;
++ +++ clocks = ...
++ +++ };
++ +++};
0, 8,
0x7f, 1,
headphone_volume),
+ ++++ SOC_SINGLE("Headphone Playback Switch", SGTL5000_CHIP_ANA_CTRL,
+ ++++ 4, 1, 1),
SOC_SINGLE("Headphone Playback ZC Switch", SGTL5000_CHIP_ANA_CTRL,
5, 1, 0),
SGTL5000_LINE_OUT_VOL_RIGHT_SHIFT,
0x1f, 1,
lineout_volume),
+ ++++ SOC_SINGLE("Lineout Playback Switch", SGTL5000_CHIP_ANA_CTRL, 8, 1, 1),
};
/* mute the codec used by alsa core */
.remove = sgtl5000_remove,
.set_bias_level = sgtl5000_set_bias_level,
.suspend_bias_off = true,
---- .controls = sgtl5000_snd_controls,
---- .num_controls = ARRAY_SIZE(sgtl5000_snd_controls),
---- .dapm_widgets = sgtl5000_dapm_widgets,
---- .num_dapm_widgets = ARRAY_SIZE(sgtl5000_dapm_widgets),
---- .dapm_routes = sgtl5000_dapm_routes,
---- .num_dapm_routes = ARRAY_SIZE(sgtl5000_dapm_routes),
++++ .component_driver = {
++++ .controls = sgtl5000_snd_controls,
++++ .num_controls = ARRAY_SIZE(sgtl5000_snd_controls),
++++ .dapm_widgets = sgtl5000_dapm_widgets,
++++ .num_dapm_widgets = ARRAY_SIZE(sgtl5000_dapm_widgets),
++++ .dapm_routes = sgtl5000_dapm_routes,
++++ .num_dapm_routes = ARRAY_SIZE(sgtl5000_dapm_routes),
++++ },
};
static const struct regmap_config sgtl5000_regmap = {
static SOC_ENUM_SINGLE_DECL(stac9766_stereo_mic_enum,
AC97_STAC_STEREO_MIC, 2, stac9766_stereo_mic);
--- --static const DECLARE_TLV_DB_LINEAR(master_tlv, -4600, 0);
--- --static const DECLARE_TLV_DB_LINEAR(record_tlv, 0, 2250);
--- --static const DECLARE_TLV_DB_LINEAR(beep_tlv, -4500, 0);
--- --static const DECLARE_TLV_DB_LINEAR(mix_tlv, -3450, 1200);
+++ ++static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(master_tlv, -4650, 150, 0);
+++ ++static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(record_tlv, 0, 150, 0);
+++ ++static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(beep_tlv, -4500, 300, 0);
+++ ++static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(mix_tlv, -3450, 150, 0);
static const struct snd_kcontrol_new stac9766_snd_ac97_controls[] = {
SOC_DOUBLE_TLV("Speaker Volume", AC97_MASTER, 8, 0, 31, 1, master_tlv),
}
static struct snd_soc_codec_driver soc_codec_dev_stac9766 = {
---- .controls = stac9766_snd_ac97_controls,
---- .num_controls = ARRAY_SIZE(stac9766_snd_ac97_controls),
++++ .component_driver = {
++++ .controls = stac9766_snd_ac97_controls,
++++ .num_controls = ARRAY_SIZE(stac9766_snd_ac97_controls),
++++ },
.write = stac9766_ac97_write,
.read = stac9766_ac97_read,
.set_bias_level = stac9766_set_bias_level,