Skip to content

Commit

Permalink
Merge branch 'topic/asoc' into for-linus
Browse files Browse the repository at this point in the history
  • Loading branch information
Takashi Iwai committed Mar 23, 2011
2 parents 5a88264 + 333802e commit ce24f58
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 4 deletions.
7 changes: 7 additions & 0 deletions arch/arm/mach-s3c2440/mach-mini2440.c
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,11 @@ static struct i2c_board_info mini2440_i2c_devs[] __initdata = {
},
};

static struct platform_device uda1340_codec = {
.name = "uda134x-codec",
.id = -1,
};

static struct platform_device *mini2440_devices[] __initdata = {
&s3c_device_ohci,
&s3c_device_wdt,
Expand All @@ -521,7 +526,9 @@ static struct platform_device *mini2440_devices[] __initdata = {
&s3c_device_nand,
&s3c_device_sdi,
&s3c_device_iis,
&uda1340_codec,
&mini2440_audio,
&samsung_asoc_dma,
};

static void __init mini2440_map_io(void)
Expand Down
14 changes: 14 additions & 0 deletions sound/soc/codecs/sgtl5000.c
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,7 @@ static int sgtl5000_pcm_hw_params(struct snd_pcm_substream *substream,
return 0;
}

#ifdef CONFIG_REGULATOR
static int ldo_regulator_is_enabled(struct regulator_dev *dev)
{
struct ldo_regulator *ldo = rdev_get_drvdata(dev);
Expand Down Expand Up @@ -901,6 +902,19 @@ static int ldo_regulator_remove(struct snd_soc_codec *codec)

return 0;
}
#else
static int ldo_regulator_register(struct snd_soc_codec *codec,
struct regulator_init_data *init_data,
int voltage)
{
return -EINVAL;
}

static int ldo_regulator_remove(struct snd_soc_codec *codec)
{
return 0;
}
#endif

/*
* set dac bias
Expand Down
3 changes: 2 additions & 1 deletion sound/soc/codecs/uda134x.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,8 @@ static struct snd_soc_dai_driver uda134x_dai = {
static int uda134x_soc_probe(struct snd_soc_codec *codec)
{
struct uda134x_priv *uda134x;
struct uda134x_platform_data *pd = dev_get_drvdata(codec->card->dev);
struct uda134x_platform_data *pd = codec->card->dev->platform_data;

int ret;

printk(KERN_INFO "UDA134X SoC Audio Codec\n");
Expand Down
3 changes: 2 additions & 1 deletion sound/soc/samsung/s3c24xx_uda134x.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ static struct snd_soc_ops s3c24xx_uda134x_ops = {
static struct snd_soc_dai_link s3c24xx_uda134x_dai_link = {
.name = "UDA134X",
.stream_name = "UDA134X",
.codec_name = "uda134x-hifi",
.codec_name = "uda134x-codec",
.codec_dai_name = "uda134x-hifi",
.cpu_dai_name = "s3c24xx-iis",
.ops = &s3c24xx_uda134x_ops,
Expand Down Expand Up @@ -314,6 +314,7 @@ static int s3c24xx_uda134x_probe(struct platform_device *pdev)

platform_set_drvdata(s3c24xx_uda134x_snd_device,
&snd_soc_s3c24xx_uda134x);
platform_device_add_data(s3c24xx_uda134x_snd_device, &s3c24xx_uda134x, sizeof(s3c24xx_uda134x));
ret = platform_device_add(s3c24xx_uda134x_snd_device);
if (ret) {
printk(KERN_ERR "S3C24XX_UDA134X SoC Audio: Unable to add\n");
Expand Down
2 changes: 0 additions & 2 deletions sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,6 @@ static ssize_t codec_reg_write_file(struct file *file,
while (*start == ' ')
start++;
reg = simple_strtoul(start, &start, 16);
if ((reg >= codec->driver->reg_cache_size) || (reg % step))
return -EINVAL;
while (*start == ' ')
start++;
if (strict_strtoul(start, 16, &value))
Expand Down

0 comments on commit ce24f58

Please sign in to comment.