Merge remote-tracking branches 'asoc/topic/samsung', 'asoc/topic/sgtl5000', 'asoc/topic/simple', 'asoc/topic/sirf' and 'asoc/topic/ssm4567' into asoc-next
This commit is contained in:
@@ -99,6 +99,13 @@ enum sgtl5000_micbias_resistor {
|
||||
SGTL5000_MICBIAS_8K = 8,
|
||||
};
|
||||
|
||||
enum {
|
||||
I2S_LRCLK_STRENGTH_DISABLE,
|
||||
I2S_LRCLK_STRENGTH_LOW,
|
||||
I2S_LRCLK_STRENGTH_MEDIUM,
|
||||
I2S_LRCLK_STRENGTH_HIGH,
|
||||
};
|
||||
|
||||
/* sgtl5000 private structure in codec */
|
||||
struct sgtl5000_priv {
|
||||
int sysclk; /* sysclk rate */
|
||||
@@ -111,6 +118,7 @@ struct sgtl5000_priv {
|
||||
int revision;
|
||||
u8 micbias_resistor;
|
||||
u8 micbias_voltage;
|
||||
u8 lrclk_strength;
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -1089,6 +1097,7 @@ static int sgtl5000_enable_regulators(struct i2c_client *client)
|
||||
static int sgtl5000_probe(struct snd_soc_codec *codec)
|
||||
{
|
||||
int ret;
|
||||
u16 reg;
|
||||
struct sgtl5000_priv *sgtl5000 = snd_soc_codec_get_drvdata(codec);
|
||||
|
||||
/* power up sgtl5000 */
|
||||
@@ -1118,7 +1127,8 @@ static int sgtl5000_probe(struct snd_soc_codec *codec)
|
||||
SGTL5000_DAC_MUTE_RIGHT |
|
||||
SGTL5000_DAC_MUTE_LEFT);
|
||||
|
||||
snd_soc_write(codec, SGTL5000_CHIP_PAD_STRENGTH, 0x015f);
|
||||
reg = ((sgtl5000->lrclk_strength) << SGTL5000_PAD_I2S_LRCLK_SHIFT | 0x5f);
|
||||
snd_soc_write(codec, SGTL5000_CHIP_PAD_STRENGTH, reg);
|
||||
|
||||
snd_soc_write(codec, SGTL5000_CHIP_ANA_CTRL,
|
||||
SGTL5000_HP_ZCD_EN |
|
||||
@@ -1347,6 +1357,13 @@ static int sgtl5000_i2c_probe(struct i2c_client *client,
|
||||
}
|
||||
}
|
||||
|
||||
sgtl5000->lrclk_strength = I2S_LRCLK_STRENGTH_LOW;
|
||||
if (!of_property_read_u32(np, "lrclk-strength", &value)) {
|
||||
if (value > I2S_LRCLK_STRENGTH_HIGH)
|
||||
value = I2S_LRCLK_STRENGTH_LOW;
|
||||
sgtl5000->lrclk_strength = value;
|
||||
}
|
||||
|
||||
/* Ensure sgtl5000 will start with sane register values */
|
||||
sgtl5000_fill_defaults(client);
|
||||
|
||||
|
||||
@@ -485,6 +485,14 @@ static const struct i2c_device_id ssm4567_i2c_ids[] = {
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, ssm4567_i2c_ids);
|
||||
|
||||
#ifdef CONFIG_OF
|
||||
static const struct of_device_id ssm4567_of_match[] = {
|
||||
{ .compatible = "adi,ssm4567", },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, ssm4567_of_match);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ACPI
|
||||
|
||||
static const struct acpi_device_id ssm4567_acpi_match[] = {
|
||||
@@ -498,6 +506,7 @@ MODULE_DEVICE_TABLE(acpi, ssm4567_acpi_match);
|
||||
static struct i2c_driver ssm4567_driver = {
|
||||
.driver = {
|
||||
.name = "ssm4567",
|
||||
.of_match_table = of_match_ptr(ssm4567_of_match),
|
||||
.acpi_match_table = ACPI_PTR(ssm4567_acpi_match),
|
||||
},
|
||||
.probe = ssm4567_i2c_probe,
|
||||
|
||||
Reference in New Issue
Block a user