Skip to content

Commit

Permalink
Merge tag 'sound-3.14-rc4' of git://git.kernel.org/pub/scm/linux/kern…
Browse files Browse the repository at this point in the history
…el/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "This time we got a slightly higher volume than previous times, but all
  device-specific good fixes.  Noticeable changes are fixes in davinci,
  and the removal of open-codes in HD-audio ca0132 driver.  The rest are
  all small fixes and/or quirks"

* tag 'sound-3.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda - Enable front audio jacks on one HP desktop model
  ALSA: hda/ca0132 - Fix recording from mode id 0x8
  ALSA: hda/ca0132 - setup/cleanup streams
  ALSA: hda - add headset mic detect quirks for two Dell laptops
  ALSA: usb-audio: work around KEF X300A firmware bug
  ASoC: max98090: make REVISION_ID readable
  ASoC: txx9aclc_ac97: Fix kernel crash on probe
  ASoC: max98090: sync regcache on entering STANDBY
  ASoC: blackfin: Fix machine driver Kconfig dependencies
  ASoC: da9055: Fix device registration of PMIC and CODEC devices
  ASoC: fsl-esai: fix ESAI TDM slot setting
  ASoC: fsl: fix pm support of machine drivers
  ASoC: rt5640: Add ACPI ID for Intel Baytrail
  ASoC: davinci-evm: Add pm callbacks to platform driver
  ASoC: davinci-mcasp: Consolidate pm_runtime_get/put() use in the driver
  ASoC: davinci-mcasp: Configure xxTDM, xxFMT and xxFMCT registers synchronously
  ASoC: davinci-mcasp: Harmonize the sub hw_params function names
  ASoC: samsung: Fix trivial typo
  ASoC: samsung: Remove invalid dependencies
  ASoC: wm8993: drop regulator_bulk_free of devm_ allocated data
  • Loading branch information
Linus Torvalds committed Feb 21, 2014
2 parents d158fc7 + 1de7ca5 commit 0413320
Show file tree
Hide file tree
Showing 19 changed files with 130 additions and 145 deletions.
12 changes: 10 additions & 2 deletions drivers/mfd/da9055-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,25 @@ static int da9055_i2c_remove(struct i2c_client *i2c)
return 0;
}

/*
* DO NOT change the device Ids. The naming is intentionally specific as both
* the PMIC and CODEC parts of this chip are instantiated separately as I2C
* devices (both have configurable I2C addresses, and are to all intents and
* purposes separate). As a result there are specific DA9055 ids for PMIC
* and CODEC, which must be different to operate together.
*/
static struct i2c_device_id da9055_i2c_id[] = {
{"da9055", 0},
{"da9055-pmic", 0},
{ }
};
MODULE_DEVICE_TABLE(i2c, da9055_i2c_id);

static struct i2c_driver da9055_i2c_driver = {
.probe = da9055_i2c_probe,
.remove = da9055_i2c_remove,
.id_table = da9055_i2c_id,
.driver = {
.name = "da9055",
.name = "da9055-pmic",
.owner = THIS_MODULE,
},
};
Expand Down
68 changes: 7 additions & 61 deletions sound/pci/hda/patch_ca0132.c
Original file line number Diff line number Diff line change
Expand Up @@ -2661,60 +2661,6 @@ static bool dspload_wait_loaded(struct hda_codec *codec)
return false;
}

/*
* PCM stuffs
*/
static void ca0132_setup_stream(struct hda_codec *codec, hda_nid_t nid,
u32 stream_tag,
int channel_id, int format)
{
unsigned int oldval, newval;

if (!nid)
return;

snd_printdd(
"ca0132_setup_stream: NID=0x%x, stream=0x%x, "
"channel=%d, format=0x%x\n",
nid, stream_tag, channel_id, format);

/* update the format-id if changed */
oldval = snd_hda_codec_read(codec, nid, 0,
AC_VERB_GET_STREAM_FORMAT,
0);
if (oldval != format) {
msleep(20);
snd_hda_codec_write(codec, nid, 0,
AC_VERB_SET_STREAM_FORMAT,
format);
}

oldval = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_CONV, 0);
newval = (stream_tag << 4) | channel_id;
if (oldval != newval) {
snd_hda_codec_write(codec, nid, 0,
AC_VERB_SET_CHANNEL_STREAMID,
newval);
}
}

static void ca0132_cleanup_stream(struct hda_codec *codec, hda_nid_t nid)
{
unsigned int val;

if (!nid)
return;

snd_printdd(KERN_INFO "ca0132_cleanup_stream: NID=0x%x\n", nid);

val = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_CONV, 0);
if (!val)
return;

snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_STREAM_FORMAT, 0);
snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_CHANNEL_STREAMID, 0);
}

/*
* PCM callbacks
*/
Expand All @@ -2726,7 +2672,7 @@ static int ca0132_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
{
struct ca0132_spec *spec = codec->spec;

ca0132_setup_stream(codec, spec->dacs[0], stream_tag, 0, format);
snd_hda_codec_setup_stream(codec, spec->dacs[0], stream_tag, 0, format);

return 0;
}
Expand All @@ -2745,7 +2691,7 @@ static int ca0132_playback_pcm_cleanup(struct hda_pcm_stream *hinfo,
if (spec->effects_switch[PLAY_ENHANCEMENT - EFFECT_START_NID])
msleep(50);

ca0132_cleanup_stream(codec, spec->dacs[0]);
snd_hda_codec_cleanup_stream(codec, spec->dacs[0]);

return 0;
}
Expand Down Expand Up @@ -2822,10 +2768,8 @@ static int ca0132_capture_pcm_prepare(struct hda_pcm_stream *hinfo,
unsigned int format,
struct snd_pcm_substream *substream)
{
struct ca0132_spec *spec = codec->spec;

ca0132_setup_stream(codec, spec->adcs[substream->number],
stream_tag, 0, format);
snd_hda_codec_setup_stream(codec, hinfo->nid,
stream_tag, 0, format);

return 0;
}
Expand All @@ -2839,7 +2783,7 @@ static int ca0132_capture_pcm_cleanup(struct hda_pcm_stream *hinfo,
if (spec->dsp_state == DSP_DOWNLOADING)
return 0;

ca0132_cleanup_stream(codec, hinfo->nid);
snd_hda_codec_cleanup_stream(codec, hinfo->nid);
return 0;
}

Expand Down Expand Up @@ -4742,6 +4686,8 @@ static int patch_ca0132(struct hda_codec *codec)
return err;

codec->patch_ops = ca0132_patch_ops;
codec->pcm_format_first = 1;
codec->no_sticky_stream = 1;

return 0;
}
Expand Down
2 changes: 2 additions & 0 deletions sound/pci/hda/patch_realtek.c
Original file line number Diff line number Diff line change
Expand Up @@ -4308,7 +4308,9 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x1028, 0x0651, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1028, 0x0652, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1028, 0x0653, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1028, 0x0657, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1028, 0x0658, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1028, 0x065f, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1028, 0x0662, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1028, 0x15cc, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1028, 0x15cd, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE),
Expand Down
13 changes: 13 additions & 0 deletions sound/pci/hda/patch_sigmatel.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ enum {
STAC_DELL_M6_BOTH,
STAC_DELL_EQ,
STAC_ALIENWARE_M17X,
STAC_92HD89XX_HP_FRONT_JACK,
STAC_92HD73XX_MODELS
};

Expand Down Expand Up @@ -1795,6 +1796,12 @@ static const struct hda_pintbl intel_dg45id_pin_configs[] = {
{}
};

static const struct hda_pintbl stac92hd89xx_hp_front_jack_pin_configs[] = {
{ 0x0a, 0x02214030 },
{ 0x0b, 0x02A19010 },
{}
};

static void stac92hd73xx_fixup_ref(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{
Expand Down Expand Up @@ -1913,6 +1920,10 @@ static const struct hda_fixup stac92hd73xx_fixups[] = {
[STAC_92HD73XX_NO_JD] = {
.type = HDA_FIXUP_FUNC,
.v.func = stac92hd73xx_fixup_no_jd,
},
[STAC_92HD89XX_HP_FRONT_JACK] = {
.type = HDA_FIXUP_PINS,
.v.pins = stac92hd89xx_hp_front_jack_pin_configs,
}
};

Expand Down Expand Up @@ -1973,6 +1984,8 @@ static const struct snd_pci_quirk stac92hd73xx_fixup_tbl[] = {
"Alienware M17x", STAC_ALIENWARE_M17X),
SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0490,
"Alienware M17x R3", STAC_DELL_EQ),
SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x2b17,
"unknown HP", STAC_92HD89XX_HP_FRONT_JACK),
{} /* terminator */
};

Expand Down
11 changes: 5 additions & 6 deletions sound/soc/blackfin/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ config SND_BF5XX_I2S

config SND_BF5XX_SOC_SSM2602
tristate "SoC SSM2602 Audio Codec Add-On Card support"
depends on SND_BF5XX_I2S && (SPI_MASTER || I2C)
depends on SND_BF5XX_I2S && SND_SOC_I2C_AND_SPI
select SND_BF5XX_SOC_I2S if !BF60x
select SND_BF6XX_SOC_I2S if BF60x
select SND_SOC_SSM2602
Expand All @@ -21,10 +21,9 @@ config SND_BF5XX_SOC_SSM2602

config SND_SOC_BFIN_EVAL_ADAU1701
tristate "Support for the EVAL-ADAU1701MINIZ board on Blackfin eval boards"
depends on SND_BF5XX_I2S
depends on SND_BF5XX_I2S && I2C
select SND_BF5XX_SOC_I2S
select SND_SOC_ADAU1701
select I2C
help
Say Y if you want to add support for the Analog Devices EVAL-ADAU1701MINIZ
board connected to one of the Blackfin evaluation boards like the
Expand All @@ -45,7 +44,7 @@ config SND_SOC_BFIN_EVAL_ADAU1373

config SND_SOC_BFIN_EVAL_ADAV80X
tristate "Support for the EVAL-ADAV80X boards on Blackfin eval boards"
depends on SND_BF5XX_I2S && (SPI_MASTER || I2C)
depends on SND_BF5XX_I2S && SND_SOC_I2C_AND_SPI
select SND_BF5XX_SOC_I2S
select SND_SOC_ADAV80X
help
Expand All @@ -58,15 +57,15 @@ config SND_SOC_BFIN_EVAL_ADAV80X

config SND_BF5XX_SOC_AD1836
tristate "SoC AD1836 Audio support for BF5xx"
depends on SND_BF5XX_I2S
depends on SND_BF5XX_I2S && SPI_MASTER
select SND_BF5XX_SOC_I2S
select SND_SOC_AD1836
help
Say Y if you want to add support for SoC audio on BF5xx STAMP/EZKIT.

config SND_BF5XX_SOC_AD193X
tristate "SoC AD193X Audio support for Blackfin"
depends on SND_BF5XX_I2S
depends on SND_BF5XX_I2S && SND_SOC_I2C_AND_SPI
select SND_BF5XX_SOC_I2S
select SND_SOC_AD193X
help
Expand Down
11 changes: 9 additions & 2 deletions sound/soc/codecs/da9055.c
Original file line number Diff line number Diff line change
Expand Up @@ -1523,16 +1523,23 @@ static int da9055_remove(struct i2c_client *client)
return 0;
}

/*
* DO NOT change the device Ids. The naming is intentionally specific as both
* the CODEC and PMIC parts of this chip are instantiated separately as I2C
* devices (both have configurable I2C addresses, and are to all intents and
* purposes separate). As a result there are specific DA9055 Ids for CODEC
* and PMIC, which must be different to operate together.
*/
static const struct i2c_device_id da9055_i2c_id[] = {
{ "da9055", 0 },
{ "da9055-codec", 0 },
{ }
};
MODULE_DEVICE_TABLE(i2c, da9055_i2c_id);

/* I2C codec control layer */
static struct i2c_driver da9055_i2c_driver = {
.driver = {
.name = "da9055",
.name = "da9055-codec",
.owner = THIS_MODULE,
},
.probe = da9055_i2c_probe,
Expand Down
21 changes: 11 additions & 10 deletions sound/soc/codecs/max98090.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ static bool max98090_readable_register(struct device *dev, unsigned int reg)
case M98090_REG_RECORD_TDM_SLOT:
case M98090_REG_SAMPLE_RATE:
case M98090_REG_DMIC34_BIQUAD_BASE ... M98090_REG_DMIC34_BIQUAD_BASE + 0x0E:
case M98090_REG_REVISION_ID:
return true;
default:
return false;
Expand Down Expand Up @@ -1769,16 +1770,6 @@ static int max98090_set_bias_level(struct snd_soc_codec *codec,

switch (level) {
case SND_SOC_BIAS_ON:
if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) {
ret = regcache_sync(max98090->regmap);

if (ret != 0) {
dev_err(codec->dev,
"Failed to sync cache: %d\n", ret);
return ret;
}
}

if (max98090->jack_state == M98090_JACK_STATE_HEADSET) {
/*
* Set to normal bias level.
Expand All @@ -1792,6 +1783,16 @@ static int max98090_set_bias_level(struct snd_soc_codec *codec,
break;

case SND_SOC_BIAS_STANDBY:
if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) {
ret = regcache_sync(max98090->regmap);
if (ret != 0) {
dev_err(codec->dev,
"Failed to sync cache: %d\n", ret);
return ret;
}
}
break;

case SND_SOC_BIAS_OFF:
/* Set internal pull-up to lowest power mode */
snd_soc_update_bits(codec, M98090_REG_JACK_DETECT,
Expand Down
1 change: 1 addition & 0 deletions sound/soc/codecs/rt5640.c
Original file line number Diff line number Diff line change
Expand Up @@ -2093,6 +2093,7 @@ MODULE_DEVICE_TABLE(i2c, rt5640_i2c_id);
#ifdef CONFIG_ACPI
static struct acpi_device_id rt5640_acpi_match[] = {
{ "INT33CA", 0 },
{ "10EC5640", 0 },
{ },
};
MODULE_DEVICE_TABLE(acpi, rt5640_acpi_match);
Expand Down
1 change: 0 additions & 1 deletion sound/soc/codecs/wm8993.c
Original file line number Diff line number Diff line change
Expand Up @@ -1562,7 +1562,6 @@ static int wm8993_remove(struct snd_soc_codec *codec)
struct wm8993_priv *wm8993 = snd_soc_codec_get_drvdata(codec);

wm8993_set_bias_level(codec, SND_SOC_BIAS_OFF);
regulator_bulk_free(ARRAY_SIZE(wm8993->supplies), wm8993->supplies);
return 0;
}

Expand Down
1 change: 1 addition & 0 deletions sound/soc/davinci/davinci-evm.c
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ static struct platform_driver davinci_evm_driver = {
.driver = {
.name = "davinci_evm",
.owner = THIS_MODULE,
.pm = &snd_soc_pm_ops,
.of_match_table = of_match_ptr(davinci_evm_dt_ids),
},
};
Expand Down
Loading

0 comments on commit 0413320

Please sign in to comment.