Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 270558
b: refs/heads/master
c: da1c6ea
h: refs/heads/master
v: v3
  • Loading branch information
Mark Brown committed Aug 31, 2011
1 parent 40df6d4 commit 18c02d9
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 10 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: d2dd0540c1dab1ebe4192e69d8dbfcf018ff02b2
refs/heads/master: da1c6ea6cf85544292c30295c70a89e8555358bc
4 changes: 2 additions & 2 deletions trunk/include/sound/soc.h
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ enum snd_soc_pcm_subclass {
};

int snd_soc_codec_set_sysclk(struct snd_soc_codec *codec, int clk_id,
unsigned int freq, int dir);
int source, unsigned int freq, int dir);
int snd_soc_codec_set_pll(struct snd_soc_codec *codec, int pll_id, int source,
unsigned int freq_in, unsigned int freq_out);

Expand Down Expand Up @@ -610,7 +610,7 @@ struct snd_soc_codec_driver {

/* codec wide operations */
int (*set_sysclk)(struct snd_soc_codec *codec,
int clk_id, unsigned int freq, int dir);
int clk_id, int source, unsigned int freq, int dir);
int (*set_pll)(struct snd_soc_codec *codec, int pll_id, int source,
unsigned int freq_in, unsigned int freq_out);

Expand Down
3 changes: 2 additions & 1 deletion trunk/sound/soc/codecs/adav80x.c
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,8 @@ static int adav80x_hw_params(struct snd_pcm_substream *substream,
}

static int adav80x_set_sysclk(struct snd_soc_codec *codec,
int clk_id, unsigned int freq, int dir)
int clk_id, int source,
unsigned int freq, int dir)
{
struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec);

Expand Down
4 changes: 2 additions & 2 deletions trunk/sound/soc/codecs/wm9081.c
Original file line number Diff line number Diff line change
Expand Up @@ -1120,8 +1120,8 @@ static int wm9081_digital_mute(struct snd_soc_dai *codec_dai, int mute)
return 0;
}

static int wm9081_set_sysclk(struct snd_soc_codec *codec,
int clk_id, unsigned int freq, int dir)
static int wm9081_set_sysclk(struct snd_soc_codec *codec, int clk_id,
int source, unsigned int freq, int dir)
{
struct wm9081_priv *wm9081 = snd_soc_codec_get_drvdata(codec);

Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/soc/samsung/speyside.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ static int speyside_wm9081_init(struct snd_soc_dapm_context *dapm)
snd_soc_dapm_nc_pin(dapm, "LINEOUT");

/* At any time the WM9081 is active it will have this clock */
return snd_soc_codec_set_sysclk(dapm->codec, WM9081_SYSCLK_MCLK,
return snd_soc_codec_set_sysclk(dapm->codec, WM9081_SYSCLK_MCLK, 0,
48000 * 256, 0);
}

Expand Down
8 changes: 5 additions & 3 deletions trunk/sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2670,7 +2670,7 @@ int snd_soc_dai_set_sysclk(struct snd_soc_dai *dai, int clk_id,
if (dai->driver && dai->driver->ops->set_sysclk)
return dai->driver->ops->set_sysclk(dai, clk_id, freq, dir);
else if (dai->codec && dai->codec->driver->set_sysclk)
return dai->codec->driver->set_sysclk(dai->codec, clk_id,
return dai->codec->driver->set_sysclk(dai->codec, clk_id, 0,
freq, dir);
else
return -EINVAL;
Expand All @@ -2681,16 +2681,18 @@ EXPORT_SYMBOL_GPL(snd_soc_dai_set_sysclk);
* snd_soc_codec_set_sysclk - configure CODEC system or master clock.
* @codec: CODEC
* @clk_id: DAI specific clock ID
* @source: Source for the clock
* @freq: new clock frequency in Hz
* @dir: new clock direction - input/output.
*
* Configures the CODEC master (MCLK) or system (SYSCLK) clocking.
*/
int snd_soc_codec_set_sysclk(struct snd_soc_codec *codec, int clk_id,
unsigned int freq, int dir)
int source, unsigned int freq, int dir)
{
if (codec->driver->set_sysclk)
return codec->driver->set_sysclk(codec, clk_id, freq, dir);
return codec->driver->set_sysclk(codec, clk_id, source,
freq, dir);
else
return -EINVAL;
}
Expand Down

0 comments on commit 18c02d9

Please sign in to comment.