Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 92255
b: refs/heads/master
c: 42f3030
h: refs/heads/master
i:
  92253: 778deac
  92251: 484b7cb
  92247: 0f62c9e
  92239: e30186a
  92223: 9846129
v: v3
  • Loading branch information
Mark Brown authored and Takashi Iwai committed Apr 24, 2008
1 parent 659866c commit ba846a1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 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: d454aee9be72472ee18b5397fda2c673f40a1e69
refs/heads/master: 42f3030f0cac474fc3232c8028b97f54b985718c
27 changes: 13 additions & 14 deletions trunk/sound/soc/codecs/wm8750.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ static int wm8750_write(struct snd_soc_codec *codec, unsigned int reg,
data[0] = (reg << 1) | ((value >> 8) & 0x0001);
data[1] = value & 0x00ff;

wm8750_write_reg_cache (codec, reg, value);
wm8750_write_reg_cache(codec, reg, value);
if (codec->hw_write(codec->control_data, data, 2) == 2)
return 0;
else
Expand Down Expand Up @@ -257,7 +257,8 @@ static int wm8750_add_controls(struct snd_soc_codec *codec)

for (i = 0; i < ARRAY_SIZE(wm8750_snd_controls); i++) {
err = snd_ctl_add(codec->card,
snd_soc_cnew(&wm8750_snd_controls[i],codec, NULL));
snd_soc_cnew(&wm8750_snd_controls[i],
codec, NULL));
if (err < 0)
return err;
}
Expand Down Expand Up @@ -478,15 +479,13 @@ static int wm8750_add_widgets(struct snd_soc_codec *codec)
{
int i;

for(i = 0; i < ARRAY_SIZE(wm8750_dapm_widgets); i++) {
for (i = 0; i < ARRAY_SIZE(wm8750_dapm_widgets); i++)
snd_soc_dapm_new_control(codec, &wm8750_dapm_widgets[i]);
}

/* set up audio path audio_mapnects */
for(i = 0; audio_map[i][0] != NULL; i++) {
for (i = 0; audio_map[i][0] != NULL; i++)
snd_soc_dapm_connect_input(codec, audio_map[i][0],
audio_map[i][1], audio_map[i][2]);
}

snd_soc_dapm_new_widgets(codec);
return 0;
Expand Down Expand Up @@ -714,8 +713,8 @@ static int wm8750_dapm_event(struct snd_soc_codec *codec, int event)
}

#define WM8750_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |\
SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_44100 | \
SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000)
SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_44100 | \
SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000)

#define WM8750_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\
SNDRV_PCM_FMTBIT_S24_LE)
Expand Down Expand Up @@ -784,7 +783,8 @@ static int wm8750_resume(struct platform_device *pdev)
if (codec->suspend_dapm_state == SNDRV_CTL_POWER_D0) {
wm8750_dapm_event(codec, SNDRV_CTL_POWER_D2);
codec->dapm_state = SNDRV_CTL_POWER_D0;
schedule_delayed_work(&codec->delayed_work, msecs_to_jiffies(1000));
schedule_delayed_work(&codec->delayed_work,
msecs_to_jiffies(1000));
}

return 0;
Expand Down Expand Up @@ -864,7 +864,7 @@ static int wm8750_init(struct snd_soc_device *socdev)
around */
static struct snd_soc_device *wm8750_socdev;

#if defined (CONFIG_I2C) || defined (CONFIG_I2C_MODULE)
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)

/*
* WM8731 2 wire address is determined by GPIO5
Expand Down Expand Up @@ -979,8 +979,8 @@ static int wm8750_probe(struct platform_device *pdev)
INIT_LIST_HEAD(&codec->dapm_paths);
wm8750_socdev = socdev;
INIT_DELAYED_WORK(&codec->delayed_work, wm8750_work);
#if defined (CONFIG_I2C) || defined (CONFIG_I2C_MODULE)

#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
if (setup->i2c_address) {
normal_i2c[0] = setup->i2c_address;
codec->hw_write = (hw_write_t)i2c_master_send;
Expand Down Expand Up @@ -1025,7 +1025,7 @@ static int wm8750_remove(struct platform_device *pdev)
run_delayed_work(&codec->delayed_work);
snd_soc_free_pcms(socdev);
snd_soc_dapm_free(socdev);
#if defined (CONFIG_I2C) || defined (CONFIG_I2C_MODULE)
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
i2c_del_driver(&wm8750_i2c_driver);
#endif
kfree(codec->private_data);
Expand All @@ -1040,7 +1040,6 @@ struct snd_soc_codec_device soc_codec_dev_wm8750 = {
.suspend = wm8750_suspend,
.resume = wm8750_resume,
};

EXPORT_SYMBOL_GPL(soc_codec_dev_wm8750);

MODULE_DESCRIPTION("ASoC WM8750 driver");
Expand Down

0 comments on commit ba846a1

Please sign in to comment.