sound fixes for 3.14-rc4
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. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAABAgAGBQJTBb1bAAoJEGwxgFQ9KSmkL3YP/1Hvn+knvM2cf8Zjbjr5+HWI WAcI5vjBaju4ZtbK/OOYYdzgS2M+srv1gnLQq1DA408YsWWrLh8EIMWGQVZdn2i5 ETymLAXrXo5pLgBtdlqh0GB0TezczAsf3xr8A/s3hPFLqaaPzAMWTUqGwkepodD4 BR6dqafX8ruNMASTDIMkSQnHPIY2eREQJkK6wF9wmZSXDChgR9hGuDmDp1mSRyOG ExjZ7+1xr0tMDosjI97E84js4JfFW083qnyh6InD/FJVOoofXB73v1AHEMINMorX 9TRpuDiRvF7eN50VIlrA7vhpLyBHW+J/e7mNk9yz1G0G4F0B1q+DWDLNGQVTIKrD qfmfjU+1MrqFdxSMJ/RKxLW+axUmLAVF3lBfP5jWsfBHg2KpMlIHwFpOQV8L6u36 WJCyPEjJgquoDxpzCDFpqV/Vy7+UhTbeDf+ZrWeB2FmB0M1T9eCQnDNf3Y1LreNz oFt12Qbin98m1yBH+woq5B+8gZx9ZpSlVuclemIJyi68HsPQuUTc4Vv8uFUHAVCg ggf1TDEAOljVG+LvYuH0dMWC48/QcmG29A5eUcNP3OLVJ0PEH0hUwh8ECYvOr7IU eCoyNPMk8g3CMo32nhtdwfRifMpmnaMX6oHMwNx2vp7H5KvZWUIwcS7PeNPC+6qe nbgu9IY4B4upz5b3YK2N =96St -----END PGP SIGNATURE----- Merge tag 'sound-3.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/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
This commit is contained in:
commit
0413320900
|
@ -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,
|
||||
},
|
||||
};
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -83,6 +83,7 @@ enum {
|
|||
STAC_DELL_M6_BOTH,
|
||||
STAC_DELL_EQ,
|
||||
STAC_ALIENWARE_M17X,
|
||||
STAC_92HD89XX_HP_FRONT_JACK,
|
||||
STAC_92HD73XX_MODELS
|
||||
};
|
||||
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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,
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -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 */
|
||||
};
|
||||
|
||||
|
|
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -58,7 +57,7 @@ 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
|
||||
|
@ -66,7 +65,7 @@ config SND_BF5XX_SOC_AD1836
|
|||
|
||||
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
|
||||
|
|
|
@ -1523,8 +1523,15 @@ 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);
|
||||
|
@ -1532,7 +1539,7 @@ 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,
|
||||
|
|
|
@ -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;
|
||||
|
@ -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.
|
||||
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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),
|
||||
},
|
||||
};
|
||||
|
|
|
@ -263,7 +263,9 @@ static int davinci_mcasp_set_dai_fmt(struct snd_soc_dai *cpu_dai,
|
|||
unsigned int fmt)
|
||||
{
|
||||
struct davinci_mcasp *mcasp = snd_soc_dai_get_drvdata(cpu_dai);
|
||||
int ret = 0;
|
||||
|
||||
pm_runtime_get_sync(mcasp->dev);
|
||||
switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
|
||||
case SND_SOC_DAIFMT_DSP_B:
|
||||
case SND_SOC_DAIFMT_AC97:
|
||||
|
@ -317,7 +319,8 @@ static int davinci_mcasp_set_dai_fmt(struct snd_soc_dai *cpu_dai,
|
|||
break;
|
||||
|
||||
default:
|
||||
return -EINVAL;
|
||||
ret = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
switch (fmt & SND_SOC_DAIFMT_INV_MASK) {
|
||||
|
@ -354,10 +357,12 @@ static int davinci_mcasp_set_dai_fmt(struct snd_soc_dai *cpu_dai,
|
|||
break;
|
||||
|
||||
default:
|
||||
return -EINVAL;
|
||||
ret = -EINVAL;
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
out:
|
||||
pm_runtime_put_sync(mcasp->dev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int davinci_mcasp_set_clkdiv(struct snd_soc_dai *dai, int div_id, int div)
|
||||
|
@ -448,7 +453,7 @@ static int davinci_config_channel_size(struct davinci_mcasp *mcasp,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int davinci_hw_common_param(struct davinci_mcasp *mcasp, int stream,
|
||||
static int mcasp_common_hw_param(struct davinci_mcasp *mcasp, int stream,
|
||||
int channels)
|
||||
{
|
||||
int i;
|
||||
|
@ -524,12 +529,18 @@ static int davinci_hw_common_param(struct davinci_mcasp *mcasp, int stream,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void davinci_hw_param(struct davinci_mcasp *mcasp, int stream)
|
||||
static int mcasp_i2s_hw_param(struct davinci_mcasp *mcasp, int stream)
|
||||
{
|
||||
int i, active_slots;
|
||||
u32 mask = 0;
|
||||
u32 busel = 0;
|
||||
|
||||
if ((mcasp->tdm_slots < 2) || (mcasp->tdm_slots > 32)) {
|
||||
dev_err(mcasp->dev, "tdm slot %d not supported\n",
|
||||
mcasp->tdm_slots);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
active_slots = (mcasp->tdm_slots > 31) ? 32 : mcasp->tdm_slots;
|
||||
for (i = 0; i < active_slots; i++)
|
||||
mask |= (1 << i);
|
||||
|
@ -539,35 +550,21 @@ static void davinci_hw_param(struct davinci_mcasp *mcasp, int stream)
|
|||
if (!mcasp->dat_port)
|
||||
busel = TXSEL;
|
||||
|
||||
if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
|
||||
/* bit stream is MSB first with no delay */
|
||||
/* DSP_B mode */
|
||||
mcasp_set_reg(mcasp, DAVINCI_MCASP_TXTDM_REG, mask);
|
||||
mcasp_set_bits(mcasp, DAVINCI_MCASP_TXFMT_REG, busel | TXORD);
|
||||
mcasp_set_reg(mcasp, DAVINCI_MCASP_TXTDM_REG, mask);
|
||||
mcasp_set_bits(mcasp, DAVINCI_MCASP_TXFMT_REG, busel | TXORD);
|
||||
mcasp_mod_bits(mcasp, DAVINCI_MCASP_TXFMCTL_REG,
|
||||
FSXMOD(mcasp->tdm_slots), FSXMOD(0x1FF));
|
||||
|
||||
if ((mcasp->tdm_slots >= 2) && (mcasp->tdm_slots <= 32))
|
||||
mcasp_mod_bits(mcasp, DAVINCI_MCASP_TXFMCTL_REG,
|
||||
FSXMOD(mcasp->tdm_slots), FSXMOD(0x1FF));
|
||||
else
|
||||
printk(KERN_ERR "playback tdm slot %d not supported\n",
|
||||
mcasp->tdm_slots);
|
||||
} else {
|
||||
/* bit stream is MSB first with no delay */
|
||||
/* DSP_B mode */
|
||||
mcasp_set_bits(mcasp, DAVINCI_MCASP_RXFMT_REG, busel | RXORD);
|
||||
mcasp_set_reg(mcasp, DAVINCI_MCASP_RXTDM_REG, mask);
|
||||
mcasp_set_reg(mcasp, DAVINCI_MCASP_RXTDM_REG, mask);
|
||||
mcasp_set_bits(mcasp, DAVINCI_MCASP_RXFMT_REG, busel | RXORD);
|
||||
mcasp_mod_bits(mcasp, DAVINCI_MCASP_RXFMCTL_REG,
|
||||
FSRMOD(mcasp->tdm_slots), FSRMOD(0x1FF));
|
||||
|
||||
if ((mcasp->tdm_slots >= 2) && (mcasp->tdm_slots <= 32))
|
||||
mcasp_mod_bits(mcasp, DAVINCI_MCASP_RXFMCTL_REG,
|
||||
FSRMOD(mcasp->tdm_slots), FSRMOD(0x1FF));
|
||||
else
|
||||
printk(KERN_ERR "capture tdm slot %d not supported\n",
|
||||
mcasp->tdm_slots);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* S/PDIF */
|
||||
static void davinci_hw_dit_param(struct davinci_mcasp *mcasp)
|
||||
static int mcasp_dit_hw_param(struct davinci_mcasp *mcasp)
|
||||
{
|
||||
/* Set the TX format : 24 bit right rotation, 32 bit slot, Pad 0
|
||||
and LSB first */
|
||||
|
@ -589,6 +586,8 @@ static void davinci_hw_dit_param(struct davinci_mcasp *mcasp)
|
|||
|
||||
/* Enable the DIT */
|
||||
mcasp_set_bits(mcasp, DAVINCI_MCASP_TXDITCTL_REG, DITEN);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int davinci_mcasp_hw_params(struct snd_pcm_substream *substream,
|
||||
|
@ -605,13 +604,14 @@ static int davinci_mcasp_hw_params(struct snd_pcm_substream *substream,
|
|||
u8 slots = mcasp->tdm_slots;
|
||||
u8 active_serializers;
|
||||
int channels;
|
||||
int ret;
|
||||
struct snd_interval *pcm_channels = hw_param_interval(params,
|
||||
SNDRV_PCM_HW_PARAM_CHANNELS);
|
||||
channels = pcm_channels->min;
|
||||
|
||||
active_serializers = (channels + slots - 1) / slots;
|
||||
|
||||
if (davinci_hw_common_param(mcasp, substream->stream, channels) == -EINVAL)
|
||||
if (mcasp_common_hw_param(mcasp, substream->stream, channels) == -EINVAL)
|
||||
return -EINVAL;
|
||||
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
|
||||
fifo_level = mcasp->txnumevt * active_serializers;
|
||||
|
@ -619,9 +619,12 @@ static int davinci_mcasp_hw_params(struct snd_pcm_substream *substream,
|
|||
fifo_level = mcasp->rxnumevt * active_serializers;
|
||||
|
||||
if (mcasp->op_mode == DAVINCI_MCASP_DIT_MODE)
|
||||
davinci_hw_dit_param(mcasp);
|
||||
ret = mcasp_dit_hw_param(mcasp);
|
||||
else
|
||||
davinci_hw_param(mcasp, substream->stream);
|
||||
ret = mcasp_i2s_hw_param(mcasp, substream->stream);
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
switch (params_format(params)) {
|
||||
case SNDRV_PCM_FORMAT_U8:
|
||||
|
@ -678,19 +681,9 @@ static int davinci_mcasp_trigger(struct snd_pcm_substream *substream,
|
|||
case SNDRV_PCM_TRIGGER_RESUME:
|
||||
case SNDRV_PCM_TRIGGER_START:
|
||||
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
|
||||
ret = pm_runtime_get_sync(mcasp->dev);
|
||||
if (IS_ERR_VALUE(ret))
|
||||
dev_err(mcasp->dev, "pm_runtime_get_sync() failed\n");
|
||||
davinci_mcasp_start(mcasp, substream->stream);
|
||||
break;
|
||||
|
||||
case SNDRV_PCM_TRIGGER_SUSPEND:
|
||||
davinci_mcasp_stop(mcasp, substream->stream);
|
||||
ret = pm_runtime_put_sync(mcasp->dev);
|
||||
if (IS_ERR_VALUE(ret))
|
||||
dev_err(mcasp->dev, "pm_runtime_put_sync() failed\n");
|
||||
break;
|
||||
|
||||
case SNDRV_PCM_TRIGGER_STOP:
|
||||
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
|
||||
davinci_mcasp_stop(mcasp, substream->stream);
|
||||
|
|
|
@ -326,7 +326,7 @@ static int fsl_esai_set_dai_tdm_slot(struct snd_soc_dai *dai, u32 tx_mask,
|
|||
regmap_update_bits(esai_priv->regmap, REG_ESAI_TSMA,
|
||||
ESAI_xSMA_xS_MASK, ESAI_xSMA_xS(tx_mask));
|
||||
regmap_update_bits(esai_priv->regmap, REG_ESAI_TSMB,
|
||||
ESAI_xSMA_xS_MASK, ESAI_xSMB_xS(tx_mask));
|
||||
ESAI_xSMB_xS_MASK, ESAI_xSMB_xS(tx_mask));
|
||||
|
||||
regmap_update_bits(esai_priv->regmap, REG_ESAI_RCCR,
|
||||
ESAI_xCCR_xDC_MASK, ESAI_xCCR_xDC(slots));
|
||||
|
@ -334,7 +334,7 @@ static int fsl_esai_set_dai_tdm_slot(struct snd_soc_dai *dai, u32 tx_mask,
|
|||
regmap_update_bits(esai_priv->regmap, REG_ESAI_RSMA,
|
||||
ESAI_xSMA_xS_MASK, ESAI_xSMA_xS(rx_mask));
|
||||
regmap_update_bits(esai_priv->regmap, REG_ESAI_RSMB,
|
||||
ESAI_xSMA_xS_MASK, ESAI_xSMB_xS(rx_mask));
|
||||
ESAI_xSMB_xS_MASK, ESAI_xSMB_xS(rx_mask));
|
||||
|
||||
esai_priv->slot_width = slot_width;
|
||||
|
||||
|
|
|
@ -322,7 +322,7 @@
|
|||
#define ESAI_xSMB_xS_SHIFT 0
|
||||
#define ESAI_xSMB_xS_WIDTH 16
|
||||
#define ESAI_xSMB_xS_MASK (((1 << ESAI_xSMB_xS_WIDTH) - 1) << ESAI_xSMB_xS_SHIFT)
|
||||
#define ESAI_xSMB_xS(v) (((v) >> ESAI_xSMA_xS_WIDTH) & ESAI_xSMA_xS_MASK)
|
||||
#define ESAI_xSMB_xS(v) (((v) >> ESAI_xSMA_xS_WIDTH) & ESAI_xSMB_xS_MASK)
|
||||
|
||||
/* Port C Direction Register -- REG_ESAI_PRRC 0xF8 */
|
||||
#define ESAI_PRRC_PDC_SHIFT 0
|
||||
|
|
|
@ -160,7 +160,6 @@ static struct platform_driver imx_mc13783_audio_driver = {
|
|||
.driver = {
|
||||
.name = "imx_mc13783",
|
||||
.owner = THIS_MODULE,
|
||||
.pm = &snd_soc_pm_ops,
|
||||
},
|
||||
.probe = imx_mc13783_probe,
|
||||
.remove = imx_mc13783_remove
|
||||
|
|
|
@ -33,8 +33,7 @@ struct imx_sgtl5000_data {
|
|||
|
||||
static int imx_sgtl5000_dai_init(struct snd_soc_pcm_runtime *rtd)
|
||||
{
|
||||
struct imx_sgtl5000_data *data = container_of(rtd->card,
|
||||
struct imx_sgtl5000_data, card);
|
||||
struct imx_sgtl5000_data *data = snd_soc_card_get_drvdata(rtd->card);
|
||||
struct device *dev = rtd->card->dev;
|
||||
int ret;
|
||||
|
||||
|
@ -159,13 +158,15 @@ static int imx_sgtl5000_probe(struct platform_device *pdev)
|
|||
data->card.dapm_widgets = imx_sgtl5000_dapm_widgets;
|
||||
data->card.num_dapm_widgets = ARRAY_SIZE(imx_sgtl5000_dapm_widgets);
|
||||
|
||||
platform_set_drvdata(pdev, &data->card);
|
||||
snd_soc_card_set_drvdata(&data->card, data);
|
||||
|
||||
ret = devm_snd_soc_register_card(&pdev->dev, &data->card);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
platform_set_drvdata(pdev, data);
|
||||
of_node_put(ssi_np);
|
||||
of_node_put(codec_np);
|
||||
|
||||
|
@ -184,7 +185,8 @@ fail:
|
|||
|
||||
static int imx_sgtl5000_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct imx_sgtl5000_data *data = platform_get_drvdata(pdev);
|
||||
struct snd_soc_card *card = platform_get_drvdata(pdev);
|
||||
struct imx_sgtl5000_data *data = snd_soc_card_get_drvdata(card);
|
||||
|
||||
clk_put(data->codec_clk);
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ static int imx_wm8962_set_bias_level(struct snd_soc_card *card,
|
|||
{
|
||||
struct snd_soc_dai *codec_dai = card->rtd[0].codec_dai;
|
||||
struct imx_priv *priv = &card_priv;
|
||||
struct imx_wm8962_data *data = platform_get_drvdata(priv->pdev);
|
||||
struct imx_wm8962_data *data = snd_soc_card_get_drvdata(card);
|
||||
struct device *dev = &priv->pdev->dev;
|
||||
unsigned int pll_out;
|
||||
int ret;
|
||||
|
@ -137,7 +137,7 @@ static int imx_wm8962_late_probe(struct snd_soc_card *card)
|
|||
{
|
||||
struct snd_soc_dai *codec_dai = card->rtd[0].codec_dai;
|
||||
struct imx_priv *priv = &card_priv;
|
||||
struct imx_wm8962_data *data = platform_get_drvdata(priv->pdev);
|
||||
struct imx_wm8962_data *data = snd_soc_card_get_drvdata(card);
|
||||
struct device *dev = &priv->pdev->dev;
|
||||
int ret;
|
||||
|
||||
|
@ -264,13 +264,15 @@ static int imx_wm8962_probe(struct platform_device *pdev)
|
|||
data->card.late_probe = imx_wm8962_late_probe;
|
||||
data->card.set_bias_level = imx_wm8962_set_bias_level;
|
||||
|
||||
platform_set_drvdata(pdev, &data->card);
|
||||
snd_soc_card_set_drvdata(&data->card, data);
|
||||
|
||||
ret = devm_snd_soc_register_card(&pdev->dev, &data->card);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret);
|
||||
goto clk_fail;
|
||||
}
|
||||
|
||||
platform_set_drvdata(pdev, data);
|
||||
of_node_put(ssi_np);
|
||||
of_node_put(codec_np);
|
||||
|
||||
|
@ -289,7 +291,8 @@ fail:
|
|||
|
||||
static int imx_wm8962_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct imx_wm8962_data *data = platform_get_drvdata(pdev);
|
||||
struct snd_soc_card *card = platform_get_drvdata(pdev);
|
||||
struct imx_wm8962_data *data = snd_soc_card_get_drvdata(card);
|
||||
|
||||
if (!IS_ERR(data->codec_clk))
|
||||
clk_disable_unprepare(data->codec_clk);
|
||||
|
|
|
@ -59,7 +59,7 @@ config SND_SOC_SAMSUNG_JIVE_WM8750
|
|||
select SND_SOC_WM8750
|
||||
select SND_S3C2412_SOC_I2S
|
||||
help
|
||||
Sat Y if you want to add support for SoC audio on the Jive.
|
||||
Say Y if you want to add support for SoC audio on the Jive.
|
||||
|
||||
config SND_SOC_SAMSUNG_SMDK_WM8580
|
||||
tristate "SoC I2S Audio support for WM8580 on SMDK"
|
||||
|
@ -145,11 +145,11 @@ config SND_SOC_SAMSUNG_RX1950_UDA1380
|
|||
|
||||
config SND_SOC_SAMSUNG_SMDK_WM9713
|
||||
tristate "SoC AC97 Audio support for SMDK with WM9713"
|
||||
depends on SND_SOC_SAMSUNG && (MACH_SMDK6410 || MACH_SMDKC100 || MACH_SMDKV210 || MACH_SMDKC110 || MACH_SMDKV310 || MACH_SMDKC210)
|
||||
depends on SND_SOC_SAMSUNG && (MACH_SMDK6410 || MACH_SMDKC100 || MACH_SMDKV210 || MACH_SMDKC110)
|
||||
select SND_SOC_WM9713
|
||||
select SND_SAMSUNG_AC97
|
||||
help
|
||||
Sat Y if you want to add support for SoC audio on the SMDK.
|
||||
Say Y if you want to add support for SoC audio on the SMDK.
|
||||
|
||||
config SND_SOC_SMARTQ
|
||||
tristate "SoC I2S Audio support for SmartQ board"
|
||||
|
|
|
@ -183,14 +183,16 @@ static int txx9aclc_ac97_dev_probe(struct platform_device *pdev)
|
|||
irq = platform_get_irq(pdev, 0);
|
||||
if (irq < 0)
|
||||
return irq;
|
||||
|
||||
drvdata = devm_kzalloc(&pdev->dev, sizeof(*drvdata), GFP_KERNEL);
|
||||
if (!drvdata)
|
||||
return -ENOMEM;
|
||||
|
||||
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
drvdata->base = devm_ioremap_resource(&pdev->dev, r);
|
||||
if (IS_ERR(drvdata->base))
|
||||
return PTR_ERR(drvdata->base);
|
||||
|
||||
drvdata = devm_kzalloc(&pdev->dev, sizeof(*drvdata), GFP_KERNEL);
|
||||
if (!drvdata)
|
||||
return -ENOMEM;
|
||||
platform_set_drvdata(pdev, drvdata);
|
||||
drvdata->physbase = r->start;
|
||||
if (sizeof(drvdata->physbase) > sizeof(r->start) &&
|
||||
|
|
|
@ -328,6 +328,11 @@ static struct usbmix_name_map gamecom780_map[] = {
|
|||
{}
|
||||
};
|
||||
|
||||
static const struct usbmix_name_map kef_x300a_map[] = {
|
||||
{ 10, NULL }, /* firmware locks up (?) when we try to access this FU */
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
/*
|
||||
* Control map entries
|
||||
*/
|
||||
|
@ -419,6 +424,10 @@ static struct usbmix_ctl_map usbmix_ctl_maps[] = {
|
|||
.id = USB_ID(0x200c, 0x1018),
|
||||
.map = ebox44_map,
|
||||
},
|
||||
{
|
||||
.id = USB_ID(0x27ac, 0x1000),
|
||||
.map = kef_x300a_map,
|
||||
},
|
||||
{ 0 } /* terminator */
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue