Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 257587
b: refs/heads/master
c: 3db1bbf
h: refs/heads/master
i:
  257585: 7b8c554
  257583: 58cbe1b
v: v3
  • Loading branch information
Mark Brown committed Jul 9, 2011
1 parent ec6455b commit 3ff8404
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e320bc42be746b8f006d163b6e340e5fb79ce7b2
refs/heads/master: 3db1bbfd4aa231e67d39fb451d4c6f0423a6ba11
14 changes: 11 additions & 3 deletions trunk/sound/soc/codecs/tlv320aic26.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,18 @@ static int aic26_hw_params(struct snd_pcm_substream *substream,
dev_dbg(&aic26->spi->dev, "bad format\n"); return -EINVAL;
}

/* Configure PLL */
/**
* Configure PLL
* fsref = (mclk * PLLM) / 2048
* where PLLM = J.DDDD (DDDD register ranges from 0 to 9999, decimal)
*/
pval = 1;
jval = (fsref == 44100) ? 7 : 8;
dval = (fsref == 44100) ? 5264 : 1920;
/* compute J portion of multiplier */
jval = fsref / (aic26->mclk / 2048);
/* compute fractional DDDD component of multiplier */
dval = fsref - (jval * (aic26->mclk / 2048));
dval = (10000 * dval) / (aic26->mclk / 2048);
dev_dbg(&aic26->spi->dev, "Setting PLLM to %d.%04d\n", jval, dval);
qval = 0;
reg = 0x8000 | qval << 11 | pval << 8 | jval << 2;
aic26_reg_write(codec, AIC26_REG_PLL_PROG1, reg);
Expand Down
9 changes: 8 additions & 1 deletion trunk/sound/soc/codecs/tlv320aic3x.c
Original file line number Diff line number Diff line change
Expand Up @@ -1122,12 +1122,19 @@ static int aic3x_set_power(struct snd_soc_codec *codec, int power)

/* Sync reg_cache with the hardware */
codec->cache_only = 0;
for (i = 0; i < ARRAY_SIZE(aic3x_reg); i++)
for (i = AIC3X_SAMPLE_RATE_SEL_REG; i < ARRAY_SIZE(aic3x_reg); i++)
snd_soc_write(codec, i, cache[i]);
if (aic3x->model == AIC3X_MODEL_3007)
aic3x_init_3007(codec);
codec->cache_sync = 0;
} else {
/*
* Do soft reset to this codec instance in order to clear
* possible VDD leakage currents in case the supply regulators
* remain on
*/
snd_soc_write(codec, AIC3X_RESET, SOFT_RESET);
codec->cache_sync = 1;
aic3x->power = 0;
/* HW writes are needless when bias is off */
codec->cache_only = 1;
Expand Down
16 changes: 8 additions & 8 deletions trunk/sound/soc/sh/fsi-ak4642.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ static int fsi_ak4642_remove(struct platform_device *pdev)

static struct fsi_ak4642_data fsi_a_ak4642 = {
.name = "AK4642",
.card = "FSIA (AK4642)",
.card = "FSIA-AK4642",
.cpu_dai = "fsia-dai",
.codec = "ak4642-codec.0-0012",
.platform = "sh_fsi.0",
Expand All @@ -106,7 +106,7 @@ static struct fsi_ak4642_data fsi_a_ak4642 = {

static struct fsi_ak4642_data fsi_b_ak4642 = {
.name = "AK4642",
.card = "FSIB (AK4642)",
.card = "FSIB-AK4642",
.cpu_dai = "fsib-dai",
.codec = "ak4642-codec.0-0012",
.platform = "sh_fsi.0",
Expand All @@ -115,7 +115,7 @@ static struct fsi_ak4642_data fsi_b_ak4642 = {

static struct fsi_ak4642_data fsi_a_ak4643 = {
.name = "AK4643",
.card = "FSIA (AK4643)",
.card = "FSIA-AK4643",
.cpu_dai = "fsia-dai",
.codec = "ak4642-codec.0-0013",
.platform = "sh_fsi.0",
Expand All @@ -124,7 +124,7 @@ static struct fsi_ak4642_data fsi_a_ak4643 = {

static struct fsi_ak4642_data fsi_b_ak4643 = {
.name = "AK4643",
.card = "FSIB (AK4643)",
.card = "FSIB-AK4643",
.cpu_dai = "fsib-dai",
.codec = "ak4642-codec.0-0013",
.platform = "sh_fsi.0",
Expand All @@ -133,7 +133,7 @@ static struct fsi_ak4642_data fsi_b_ak4643 = {

static struct fsi_ak4642_data fsi2_a_ak4642 = {
.name = "AK4642",
.card = "FSI2A (AK4642)",
.card = "FSI2A-AK4642",
.cpu_dai = "fsia-dai",
.codec = "ak4642-codec.0-0012",
.platform = "sh_fsi2",
Expand All @@ -142,7 +142,7 @@ static struct fsi_ak4642_data fsi2_a_ak4642 = {

static struct fsi_ak4642_data fsi2_b_ak4642 = {
.name = "AK4642",
.card = "FSI2B (AK4642)",
.card = "FSI2B-AK4642",
.cpu_dai = "fsib-dai",
.codec = "ak4642-codec.0-0012",
.platform = "sh_fsi2",
Expand All @@ -151,7 +151,7 @@ static struct fsi_ak4642_data fsi2_b_ak4642 = {

static struct fsi_ak4642_data fsi2_a_ak4643 = {
.name = "AK4643",
.card = "FSI2A (AK4643)",
.card = "FSI2A-AK4643",
.cpu_dai = "fsia-dai",
.codec = "ak4642-codec.0-0013",
.platform = "sh_fsi2",
Expand All @@ -160,7 +160,7 @@ static struct fsi_ak4642_data fsi2_a_ak4643 = {

static struct fsi_ak4642_data fsi2_b_ak4643 = {
.name = "AK4643",
.card = "FSI2B (AK4643)",
.card = "FSI2B-AK4643",
.cpu_dai = "fsib-dai",
.codec = "ak4642-codec.0-0013",
.platform = "sh_fsi2",
Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/soc/sh/fsi-da7210.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ static struct snd_soc_dai_link fsi_da7210_dai = {
};

static struct snd_soc_card fsi_soc_card = {
.name = "FSI (DA7210)",
.name = "FSI-DA7210",
.dai_link = &fsi_da7210_dai,
.num_links = 1,
};
Expand Down
4 changes: 2 additions & 2 deletions trunk/sound/soc/sh/fsi-hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ static int fsi_hdmi_remove(struct platform_device *pdev)

static struct fsi_hdmi_data fsi2_a_hdmi = {
.cpu_dai = "fsia-dai",
.card = "FSI2A (SH MOBILE HDMI)",
.card = "FSI2A-HDMI",
.id = FSI_PORT_A,
};

static struct fsi_hdmi_data fsi2_b_hdmi = {
.cpu_dai = "fsib-dai",
.card = "FSI2B (SH MOBILE HDMI)",
.card = "FSI2B-HDMI",
.id = FSI_PORT_B,
};

Expand Down
5 changes: 3 additions & 2 deletions trunk/sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1433,8 +1433,9 @@ static void snd_soc_instantiate_card(struct snd_soc_card *card)
"%s", card->name);
snprintf(card->snd_card->longname, sizeof(card->snd_card->longname),
"%s", card->long_name ? card->long_name : card->name);
snprintf(card->snd_card->driver, sizeof(card->snd_card->driver),
"%s", card->driver_name ? card->driver_name : card->name);
if (card->driver_name)
strlcpy(card->snd_card->driver, card->driver_name,
sizeof(card->snd_card->driver));

if (card->late_probe) {
ret = card->late_probe(card);
Expand Down

0 comments on commit 3ff8404

Please sign in to comment.