Updated from Linux LTS 3.10.21 to 3.10.22
This commit is contained in:
@@ -111,6 +111,7 @@ static int bf5xx_i2s_hw_params(struct snd_pcm_substream *substream,
|
||||
bf5xx_i2s->tcr2 |= 7;
|
||||
bf5xx_i2s->rcr2 |= 7;
|
||||
sport_handle->wdsize = 1;
|
||||
break;
|
||||
case SNDRV_PCM_FORMAT_S16_LE:
|
||||
bf5xx_i2s->tcr2 |= 15;
|
||||
bf5xx_i2s->rcr2 |= 15;
|
||||
|
||||
@@ -257,7 +257,7 @@ static int ak4642_dai_startup(struct snd_pcm_substream *substream,
|
||||
* This operation came from example code of
|
||||
* "ASAHI KASEI AK4642" (japanese) manual p94.
|
||||
*/
|
||||
snd_soc_write(codec, SG_SL1, PMMP | MGAIN0);
|
||||
snd_soc_update_bits(codec, SG_SL1, PMMP | MGAIN0, PMMP | MGAIN0);
|
||||
snd_soc_write(codec, TIMER, ZTM(0x3) | WTM(0x3));
|
||||
snd_soc_write(codec, ALC_CTL1, ALC | LMTH0);
|
||||
snd_soc_update_bits(codec, PW_MGMT1, PMADL, PMADL);
|
||||
|
||||
@@ -1454,6 +1454,8 @@ static void arizona_enable_fll(struct arizona_fll *fll,
|
||||
/* Clear any pending completions */
|
||||
try_wait_for_completion(&fll->ok);
|
||||
|
||||
regmap_update_bits(arizona->regmap, fll->base + 1,
|
||||
ARIZONA_FLL1_FREERUN, 0);
|
||||
regmap_update_bits(arizona->regmap, fll->base + 1,
|
||||
ARIZONA_FLL1_ENA, ARIZONA_FLL1_ENA);
|
||||
if (fll->ref_src >= 0 && fll->sync_src >= 0 &&
|
||||
@@ -1473,6 +1475,8 @@ static void arizona_disable_fll(struct arizona_fll *fll)
|
||||
struct arizona *arizona = fll->arizona;
|
||||
bool change;
|
||||
|
||||
regmap_update_bits(arizona->regmap, fll->base + 1,
|
||||
ARIZONA_FLL1_FREERUN, ARIZONA_FLL1_FREERUN);
|
||||
regmap_update_bits_check(arizona->regmap, fll->base + 1,
|
||||
ARIZONA_FLL1_ENA, 0, &change);
|
||||
regmap_update_bits(arizona->regmap, fll->base + 0x11,
|
||||
|
||||
@@ -179,7 +179,7 @@
|
||||
#define CS42L52_MICB_CTL 0x11
|
||||
#define CS42L52_MIC_CTL_MIC_SEL_MASK 0xBF
|
||||
#define CS42L52_MIC_CTL_MIC_SEL_SHIFT 6
|
||||
#define CS42L52_MIC_CTL_TYPE_MASK 0xDF
|
||||
#define CS42L52_MIC_CTL_TYPE_MASK 0x20
|
||||
#define CS42L52_MIC_CTL_TYPE_SHIFT 5
|
||||
|
||||
|
||||
|
||||
@@ -37,6 +37,47 @@ struct wm5110_priv {
|
||||
struct arizona_fll fll[2];
|
||||
};
|
||||
|
||||
static const struct reg_default wm5110_sysclk_revd_patch[] = {
|
||||
{ 0x3093, 0x1001 },
|
||||
{ 0x30E3, 0x1301 },
|
||||
{ 0x3133, 0x1201 },
|
||||
{ 0x3183, 0x1501 },
|
||||
{ 0x31D3, 0x1401 },
|
||||
};
|
||||
|
||||
static int wm5110_sysclk_ev(struct snd_soc_dapm_widget *w,
|
||||
struct snd_kcontrol *kcontrol, int event)
|
||||
{
|
||||
struct snd_soc_codec *codec = w->codec;
|
||||
struct arizona *arizona = dev_get_drvdata(codec->dev->parent);
|
||||
struct regmap *regmap = codec->control_data;
|
||||
const struct reg_default *patch = NULL;
|
||||
int i, patch_size;
|
||||
|
||||
switch (arizona->rev) {
|
||||
case 3:
|
||||
patch = wm5110_sysclk_revd_patch;
|
||||
patch_size = ARRAY_SIZE(wm5110_sysclk_revd_patch);
|
||||
break;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
switch (event) {
|
||||
case SND_SOC_DAPM_POST_PMU:
|
||||
if (patch)
|
||||
for (i = 0; i < patch_size; i++)
|
||||
regmap_write(regmap, patch[i].reg,
|
||||
patch[i].def);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static DECLARE_TLV_DB_SCALE(ana_tlv, 0, 100, 0);
|
||||
static DECLARE_TLV_DB_SCALE(eq_tlv, -1200, 100, 0);
|
||||
static DECLARE_TLV_DB_SCALE(digital_tlv, -6400, 50, 0);
|
||||
@@ -386,7 +427,7 @@ static const struct snd_kcontrol_new wm5110_aec_loopback_mux =
|
||||
|
||||
static const struct snd_soc_dapm_widget wm5110_dapm_widgets[] = {
|
||||
SND_SOC_DAPM_SUPPLY("SYSCLK", ARIZONA_SYSTEM_CLOCK_1, ARIZONA_SYSCLK_ENA_SHIFT,
|
||||
0, NULL, 0),
|
||||
0, wm5110_sysclk_ev, SND_SOC_DAPM_POST_PMU),
|
||||
SND_SOC_DAPM_SUPPLY("ASYNCCLK", ARIZONA_ASYNC_CLOCK_1,
|
||||
ARIZONA_ASYNC_CLK_ENA_SHIFT, 0, NULL, 0),
|
||||
SND_SOC_DAPM_SUPPLY("OPCLK", ARIZONA_OUTPUT_SYSTEM_CLOCK,
|
||||
|
||||
@@ -3686,6 +3686,8 @@ static int wm8962_i2c_probe(struct i2c_client *i2c,
|
||||
if (ret < 0)
|
||||
goto err_enable;
|
||||
|
||||
regcache_cache_only(wm8962->regmap, true);
|
||||
|
||||
/* The drivers should power up as needed */
|
||||
regulator_bulk_disable(ARRAY_SIZE(wm8962->supplies), wm8962->supplies);
|
||||
|
||||
|
||||
@@ -42,7 +42,8 @@ struct imx_pcm_runtime_data {
|
||||
struct hrtimer hrt;
|
||||
int poll_time_ns;
|
||||
struct snd_pcm_substream *substream;
|
||||
atomic_t running;
|
||||
atomic_t playing;
|
||||
atomic_t capturing;
|
||||
};
|
||||
|
||||
static enum hrtimer_restart snd_hrtimer_callback(struct hrtimer *hrt)
|
||||
@@ -54,7 +55,7 @@ static enum hrtimer_restart snd_hrtimer_callback(struct hrtimer *hrt)
|
||||
struct pt_regs regs;
|
||||
unsigned long delta;
|
||||
|
||||
if (!atomic_read(&iprtd->running))
|
||||
if (!atomic_read(&iprtd->playing) && !atomic_read(&iprtd->capturing))
|
||||
return HRTIMER_NORESTART;
|
||||
|
||||
get_fiq_regs(®s);
|
||||
@@ -122,7 +123,6 @@ static int snd_imx_pcm_prepare(struct snd_pcm_substream *substream)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int fiq_enable;
|
||||
static int imx_pcm_fiq;
|
||||
|
||||
static int snd_imx_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
|
||||
@@ -134,23 +134,27 @@ static int snd_imx_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
|
||||
case SNDRV_PCM_TRIGGER_START:
|
||||
case SNDRV_PCM_TRIGGER_RESUME:
|
||||
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
|
||||
atomic_set(&iprtd->running, 1);
|
||||
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
|
||||
atomic_set(&iprtd->playing, 1);
|
||||
else
|
||||
atomic_set(&iprtd->capturing, 1);
|
||||
hrtimer_start(&iprtd->hrt, ns_to_ktime(iprtd->poll_time_ns),
|
||||
HRTIMER_MODE_REL);
|
||||
if (++fiq_enable == 1)
|
||||
enable_fiq(imx_pcm_fiq);
|
||||
|
||||
enable_fiq(imx_pcm_fiq);
|
||||
break;
|
||||
|
||||
case SNDRV_PCM_TRIGGER_STOP:
|
||||
case SNDRV_PCM_TRIGGER_SUSPEND:
|
||||
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
|
||||
atomic_set(&iprtd->running, 0);
|
||||
|
||||
if (--fiq_enable == 0)
|
||||
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
|
||||
atomic_set(&iprtd->playing, 0);
|
||||
else
|
||||
atomic_set(&iprtd->capturing, 0);
|
||||
if (!atomic_read(&iprtd->playing) &&
|
||||
!atomic_read(&iprtd->capturing))
|
||||
disable_fiq(imx_pcm_fiq);
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -198,7 +202,8 @@ static int snd_imx_open(struct snd_pcm_substream *substream)
|
||||
|
||||
iprtd->substream = substream;
|
||||
|
||||
atomic_set(&iprtd->running, 0);
|
||||
atomic_set(&iprtd->playing, 0);
|
||||
atomic_set(&iprtd->capturing, 0);
|
||||
hrtimer_init(&iprtd->hrt, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
iprtd->hrt.function = snd_hrtimer_callback;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user