diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-01-05 18:59:56 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-01-05 18:59:56 -0500 |
commit | f843b0fcc70094d87fea8c7004937388c316ea7a (patch) | |
tree | 00f76db04a4127a62fe1afe6d863d96d96e05226 /sound | |
parent | c5974b835a909ff15c3b7e6cf6789b5eb919f419 (diff) | |
parent | ecbec242961ec66e900b5649ded1e40f5d5edc41 (diff) |
Merge branch 'for-2.6.33' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6
* 'for-2.6.33' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6:
ASoC: fixup oops in generic AC97 codec glue
ASoC: fix params_rate() macro use in several codecs
ASoC: fsi-ak4642: Remove ak4642_add_i2c_device
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/ac97.c | 6 | ||||
-rw-r--r-- | sound/soc/codecs/wm8510.c | 14 | ||||
-rw-r--r-- | sound/soc/codecs/wm8940.c | 14 | ||||
-rw-r--r-- | sound/soc/codecs/wm8974.c | 14 | ||||
-rw-r--r-- | sound/soc/sh/fsi-ak4642.c | 30 |
5 files changed, 27 insertions, 51 deletions
diff --git a/sound/soc/codecs/ac97.c b/sound/soc/codecs/ac97.c index 69bd0acc81c8..a1bbe16b7f96 100644 --- a/sound/soc/codecs/ac97.c +++ b/sound/soc/codecs/ac97.c | |||
@@ -102,6 +102,12 @@ static int ac97_soc_probe(struct platform_device *pdev) | |||
102 | INIT_LIST_HEAD(&codec->dapm_widgets); | 102 | INIT_LIST_HEAD(&codec->dapm_widgets); |
103 | INIT_LIST_HEAD(&codec->dapm_paths); | 103 | INIT_LIST_HEAD(&codec->dapm_paths); |
104 | 104 | ||
105 | ret = snd_soc_new_ac97_codec(codec, &soc_ac97_ops, 0); | ||
106 | if (ret < 0) { | ||
107 | printk(KERN_ERR "ASoC: failed to init gen ac97 glue\n"); | ||
108 | goto err; | ||
109 | } | ||
110 | |||
105 | /* register pcms */ | 111 | /* register pcms */ |
106 | ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1); | 112 | ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1); |
107 | if (ret < 0) | 113 | if (ret < 0) |
diff --git a/sound/soc/codecs/wm8510.c b/sound/soc/codecs/wm8510.c index 265e68c75df8..af8cb6995a1f 100644 --- a/sound/soc/codecs/wm8510.c +++ b/sound/soc/codecs/wm8510.c | |||
@@ -424,23 +424,23 @@ static int wm8510_pcm_hw_params(struct snd_pcm_substream *substream, | |||
424 | 424 | ||
425 | /* filter coefficient */ | 425 | /* filter coefficient */ |
426 | switch (params_rate(params)) { | 426 | switch (params_rate(params)) { |
427 | case SNDRV_PCM_RATE_8000: | 427 | case 8000: |
428 | adn |= 0x5 << 1; | 428 | adn |= 0x5 << 1; |
429 | break; | 429 | break; |
430 | case SNDRV_PCM_RATE_11025: | 430 | case 11025: |
431 | adn |= 0x4 << 1; | 431 | adn |= 0x4 << 1; |
432 | break; | 432 | break; |
433 | case SNDRV_PCM_RATE_16000: | 433 | case 16000: |
434 | adn |= 0x3 << 1; | 434 | adn |= 0x3 << 1; |
435 | break; | 435 | break; |
436 | case SNDRV_PCM_RATE_22050: | 436 | case 22050: |
437 | adn |= 0x2 << 1; | 437 | adn |= 0x2 << 1; |
438 | break; | 438 | break; |
439 | case SNDRV_PCM_RATE_32000: | 439 | case 32000: |
440 | adn |= 0x1 << 1; | 440 | adn |= 0x1 << 1; |
441 | break; | 441 | break; |
442 | case SNDRV_PCM_RATE_44100: | 442 | case 44100: |
443 | case SNDRV_PCM_RATE_48000: | 443 | case 48000: |
444 | break; | 444 | break; |
445 | } | 445 | } |
446 | 446 | ||
diff --git a/sound/soc/codecs/wm8940.c b/sound/soc/codecs/wm8940.c index 3d850b97037a..31e39ffd1d8e 100644 --- a/sound/soc/codecs/wm8940.c +++ b/sound/soc/codecs/wm8940.c | |||
@@ -378,23 +378,23 @@ static int wm8940_i2s_hw_params(struct snd_pcm_substream *substream, | |||
378 | iface |= (1 << 9); | 378 | iface |= (1 << 9); |
379 | 379 | ||
380 | switch (params_rate(params)) { | 380 | switch (params_rate(params)) { |
381 | case SNDRV_PCM_RATE_8000: | 381 | case 8000: |
382 | addcntrl |= (0x5 << 1); | 382 | addcntrl |= (0x5 << 1); |
383 | break; | 383 | break; |
384 | case SNDRV_PCM_RATE_11025: | 384 | case 11025: |
385 | addcntrl |= (0x4 << 1); | 385 | addcntrl |= (0x4 << 1); |
386 | break; | 386 | break; |
387 | case SNDRV_PCM_RATE_16000: | 387 | case 16000: |
388 | addcntrl |= (0x3 << 1); | 388 | addcntrl |= (0x3 << 1); |
389 | break; | 389 | break; |
390 | case SNDRV_PCM_RATE_22050: | 390 | case 22050: |
391 | addcntrl |= (0x2 << 1); | 391 | addcntrl |= (0x2 << 1); |
392 | break; | 392 | break; |
393 | case SNDRV_PCM_RATE_32000: | 393 | case 32000: |
394 | addcntrl |= (0x1 << 1); | 394 | addcntrl |= (0x1 << 1); |
395 | break; | 395 | break; |
396 | case SNDRV_PCM_RATE_44100: | 396 | case 44100: |
397 | case SNDRV_PCM_RATE_48000: | 397 | case 48000: |
398 | break; | 398 | break; |
399 | } | 399 | } |
400 | ret = snd_soc_write(codec, WM8940_ADDCNTRL, addcntrl); | 400 | ret = snd_soc_write(codec, WM8940_ADDCNTRL, addcntrl); |
diff --git a/sound/soc/codecs/wm8974.c b/sound/soc/codecs/wm8974.c index a808675388fc..8812751da8c9 100644 --- a/sound/soc/codecs/wm8974.c +++ b/sound/soc/codecs/wm8974.c | |||
@@ -482,23 +482,23 @@ static int wm8974_pcm_hw_params(struct snd_pcm_substream *substream, | |||
482 | 482 | ||
483 | /* filter coefficient */ | 483 | /* filter coefficient */ |
484 | switch (params_rate(params)) { | 484 | switch (params_rate(params)) { |
485 | case SNDRV_PCM_RATE_8000: | 485 | case 8000: |
486 | adn |= 0x5 << 1; | 486 | adn |= 0x5 << 1; |
487 | break; | 487 | break; |
488 | case SNDRV_PCM_RATE_11025: | 488 | case 11025: |
489 | adn |= 0x4 << 1; | 489 | adn |= 0x4 << 1; |
490 | break; | 490 | break; |
491 | case SNDRV_PCM_RATE_16000: | 491 | case 16000: |
492 | adn |= 0x3 << 1; | 492 | adn |= 0x3 << 1; |
493 | break; | 493 | break; |
494 | case SNDRV_PCM_RATE_22050: | 494 | case 22050: |
495 | adn |= 0x2 << 1; | 495 | adn |= 0x2 << 1; |
496 | break; | 496 | break; |
497 | case SNDRV_PCM_RATE_32000: | 497 | case 32000: |
498 | adn |= 0x1 << 1; | 498 | adn |= 0x1 << 1; |
499 | break; | 499 | break; |
500 | case SNDRV_PCM_RATE_44100: | 500 | case 44100: |
501 | case SNDRV_PCM_RATE_48000: | 501 | case 48000: |
502 | break; | 502 | break; |
503 | } | 503 | } |
504 | 504 | ||
diff --git a/sound/soc/sh/fsi-ak4642.c b/sound/soc/sh/fsi-ak4642.c index c7af09729c6e..5263ab18f827 100644 --- a/sound/soc/sh/fsi-ak4642.c +++ b/sound/soc/sh/fsi-ak4642.c | |||
@@ -42,42 +42,12 @@ static struct snd_soc_device fsi_snd_devdata = { | |||
42 | .codec_dev = &soc_codec_dev_ak4642, | 42 | .codec_dev = &soc_codec_dev_ak4642, |
43 | }; | 43 | }; |
44 | 44 | ||
45 | #define AK4642_BUS 0 | ||
46 | #define AK4642_ADR 0x12 | ||
47 | static int ak4642_add_i2c_device(void) | ||
48 | { | ||
49 | struct i2c_board_info info; | ||
50 | struct i2c_adapter *adapter; | ||
51 | struct i2c_client *client; | ||
52 | |||
53 | memset(&info, 0, sizeof(struct i2c_board_info)); | ||
54 | info.addr = AK4642_ADR; | ||
55 | strlcpy(info.type, "ak4642", I2C_NAME_SIZE); | ||
56 | |||
57 | adapter = i2c_get_adapter(AK4642_BUS); | ||
58 | if (!adapter) { | ||
59 | printk(KERN_DEBUG "can't get i2c adapter\n"); | ||
60 | return -ENODEV; | ||
61 | } | ||
62 | |||
63 | client = i2c_new_device(adapter, &info); | ||
64 | i2c_put_adapter(adapter); | ||
65 | if (!client) { | ||
66 | printk(KERN_DEBUG "can't add i2c device\n"); | ||
67 | return -ENODEV; | ||
68 | } | ||
69 | |||
70 | return 0; | ||
71 | } | ||
72 | |||
73 | static struct platform_device *fsi_snd_device; | 45 | static struct platform_device *fsi_snd_device; |
74 | 46 | ||
75 | static int __init fsi_ak4642_init(void) | 47 | static int __init fsi_ak4642_init(void) |
76 | { | 48 | { |
77 | int ret = -ENOMEM; | 49 | int ret = -ENOMEM; |
78 | 50 | ||
79 | ak4642_add_i2c_device(); | ||
80 | |||
81 | fsi_snd_device = platform_device_alloc("soc-audio", -1); | 51 | fsi_snd_device = platform_device_alloc("soc-audio", -1); |
82 | if (!fsi_snd_device) | 52 | if (!fsi_snd_device) |
83 | goto out; | 53 | goto out; |