Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 157595
b: refs/heads/master
c: b84eab0
h: refs/heads/master
i:
  157593: 8498475
  157591: e4217bf
v: v3
  • Loading branch information
Janusz Krzysztofik authored and Mark Brown committed Jul 28, 2009
1 parent 267cbed commit 49568ff
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 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: 4ce2f2fe61002ab35c9333d52c95b5ff9e949f50
refs/heads/master: b84eab08a67913581515a1184f1deedf1d54dc5d
17 changes: 10 additions & 7 deletions trunk/sound/soc/codecs/cx20442.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ enum v253_vls {

static int cx20442_pm_to_v253_vls(u8 value)
{
switch(value & ~(1 << CX20442_AGC)) {
switch (value & ~(1 << CX20442_AGC)) {
case 0:
return V253_VLS_T;
case (1 << CX20442_SPKOUT):
Expand All @@ -152,7 +152,7 @@ static int cx20442_pm_to_v253_vls(u8 value)
}
static int cx20442_pm_to_v253_vsp(u8 value)
{
switch(value & ~(1 << CX20442_AGC)) {
switch (value & ~(1 << CX20442_AGC)) {
case (1 << CX20442_SPKOUT):
case (1 << CX20442_MIC):
case (1 << CX20442_SPKOUT) | (1 << CX20442_MIC):
Expand All @@ -171,6 +171,9 @@ static int cx20442_write(struct snd_soc_codec *codec, unsigned int reg,
if (reg >= codec->reg_cache_size)
return -EINVAL;

/* hw_write and control_data pointers required for talking to the modem
* are expected to be set by the machine driver's line discipline
* initialization code */
if (!codec->hw_write || !codec->control_data)
return -EIO;

Expand All @@ -182,7 +185,7 @@ static int cx20442_write(struct snd_soc_codec *codec, unsigned int reg,
return vls;

vsp = cx20442_pm_to_v253_vsp(value);
if (vsp < 0 )
if (vsp < 0)
return vsp;

if ((vls == V253_VLS_T) ||
Expand Down Expand Up @@ -232,7 +235,7 @@ static int cx20442_codec_probe(struct platform_device *pdev)
struct snd_soc_codec *codec;
int ret;

if(!cx20442_codec) {
if (!cx20442_codec) {
dev_err(&pdev->dev, "cx20442 not yet discovered\n");
return -ENODEV;
}
Expand Down Expand Up @@ -310,13 +313,13 @@ static int cx20442_register(struct cx20442_priv *cx20442)

ret = snd_soc_register_codec(codec);
if (ret != 0) {
//dev_err(&dev->dev, "Failed to register codec: %d\n", ret);
dev_err(&codec->dev, "Failed to register codec: %d\n", ret);
goto err;
}

ret = snd_soc_register_dai(&cx20442_dai);
if (ret != 0) {
//dev_err(&dev->dev, "Failed to register DAI: %d\n", ret);
dev_err(&codec->dev, "Failed to register DAI: %d\n", ret);
goto err_codec;
}

Expand Down Expand Up @@ -392,4 +395,4 @@ module_exit(cx20442_exit);
MODULE_DESCRIPTION("ASoC CX20442-11 voice modem codec driver");
MODULE_AUTHOR("Janusz Krzysztofik");
MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:cx20442-codec");
MODULE_ALIAS("platform:cx20442");

0 comments on commit 49568ff

Please sign in to comment.