diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-25 11:32:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-25 11:32:05 -0400 |
commit | 33081adf8b89d5a716d7e1c60171768d39795b39 (patch) | |
tree | 275de58bbbb5f7ddffcdc087844cfc7fbe4315be /drivers | |
parent | c55960499f810357a29659b32d6ea594abee9237 (diff) | |
parent | 506ecbca71d07fa327dd986be1682e90885678ee (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (365 commits)
ALSA: hda - Disable sticky PCM stream assignment for AD codecs
ALSA: usb - Creative USB X-Fi volume knob support
ALSA: ca0106: Use card specific dac id for mute controls.
ALSA: ca0106: Allow different sound cards to use different SPI channel mappings.
ALSA: ca0106: Create a nice spot for mapping channels to dacs.
ALSA: ca0106: Move enabling of front dac out of hardcoded setup sequence.
ALSA: ca0106: Pull out dac powering routine into separate function.
ALSA: ca0106 - add Sound Blaster 5.1vx info.
ASoC: tlv320dac33: Use usleep_range for delays
ALSA: usb-audio: add Novation Launchpad support
ALSA: hda - Add workarounds for CT-IBG controllers
ALSA: hda - Fix wrong TLV mute bit for STAC/IDT codecs
ASoC: tpa6130a2: Error handling for broken chip
ASoC: max98088: Staticise m98088_eq_band
ASoC: soc-core: Fix codec->name memory leak
ALSA: hda - Apply ideapad quirk to Acer laptops with Cxt5066
ALSA: hda - Add some workarounds for Creative IBG
ALSA: hda - Fix wrong SPDIF NID assignment for CA0110
ALSA: hda - Fix codec rename rules for ALC662-compatible codecs
ALSA: hda - Add alc_init_jacks() call to other codecs
...
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/input/misc/twl4030-vibra.c | 4 | ||||
-rw-r--r-- | drivers/mfd/twl-core.c | 6 | ||||
-rw-r--r-- | drivers/mfd/twl4030-codec.c | 8 | ||||
-rw-r--r-- | drivers/staging/xgifb/TODO | 2 | ||||
-rw-r--r-- | drivers/video/Kconfig | 3 | ||||
-rw-r--r-- | drivers/video/sh_mobile_hdmi.c | 84 |
6 files changed, 96 insertions, 11 deletions
diff --git a/drivers/input/misc/twl4030-vibra.c b/drivers/input/misc/twl4030-vibra.c index 4f9b2afc24e8..014dd4ad0d4f 100644 --- a/drivers/input/misc/twl4030-vibra.c +++ b/drivers/input/misc/twl4030-vibra.c | |||
@@ -271,7 +271,7 @@ static struct platform_driver twl4030_vibra_driver = { | |||
271 | .probe = twl4030_vibra_probe, | 271 | .probe = twl4030_vibra_probe, |
272 | .remove = __devexit_p(twl4030_vibra_remove), | 272 | .remove = __devexit_p(twl4030_vibra_remove), |
273 | .driver = { | 273 | .driver = { |
274 | .name = "twl4030_codec_vibra", | 274 | .name = "twl4030-vibra", |
275 | .owner = THIS_MODULE, | 275 | .owner = THIS_MODULE, |
276 | #ifdef CONFIG_PM | 276 | #ifdef CONFIG_PM |
277 | .pm = &twl4030_vibra_pm_ops, | 277 | .pm = &twl4030_vibra_pm_ops, |
@@ -291,7 +291,7 @@ static void __exit twl4030_vibra_exit(void) | |||
291 | } | 291 | } |
292 | module_exit(twl4030_vibra_exit); | 292 | module_exit(twl4030_vibra_exit); |
293 | 293 | ||
294 | MODULE_ALIAS("platform:twl4030_codec_vibra"); | 294 | MODULE_ALIAS("platform:twl4030-vibra"); |
295 | 295 | ||
296 | MODULE_DESCRIPTION("TWL4030 Vibra driver"); | 296 | MODULE_DESCRIPTION("TWL4030 Vibra driver"); |
297 | MODULE_LICENSE("GPL"); | 297 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c index 720e099e506d..5d0fb60a4c14 100644 --- a/drivers/mfd/twl-core.c +++ b/drivers/mfd/twl-core.c | |||
@@ -698,17 +698,17 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features) | |||
698 | 698 | ||
699 | if (twl_has_codec() && pdata->codec && twl_class_is_4030()) { | 699 | if (twl_has_codec() && pdata->codec && twl_class_is_4030()) { |
700 | sub_chip_id = twl_map[TWL_MODULE_AUDIO_VOICE].sid; | 700 | sub_chip_id = twl_map[TWL_MODULE_AUDIO_VOICE].sid; |
701 | child = add_child(sub_chip_id, "twl4030_codec", | 701 | child = add_child(sub_chip_id, "twl4030-audio", |
702 | pdata->codec, sizeof(*pdata->codec), | 702 | pdata->codec, sizeof(*pdata->codec), |
703 | false, 0, 0); | 703 | false, 0, 0); |
704 | if (IS_ERR(child)) | 704 | if (IS_ERR(child)) |
705 | return PTR_ERR(child); | 705 | return PTR_ERR(child); |
706 | } | 706 | } |
707 | 707 | ||
708 | /* Phoenix*/ | 708 | /* Phoenix codec driver is probed directly atm */ |
709 | if (twl_has_codec() && pdata->codec && twl_class_is_6030()) { | 709 | if (twl_has_codec() && pdata->codec && twl_class_is_6030()) { |
710 | sub_chip_id = twl_map[TWL_MODULE_AUDIO_VOICE].sid; | 710 | sub_chip_id = twl_map[TWL_MODULE_AUDIO_VOICE].sid; |
711 | child = add_child(sub_chip_id, "twl6040_codec", | 711 | child = add_child(sub_chip_id, "twl6040-codec", |
712 | pdata->codec, sizeof(*pdata->codec), | 712 | pdata->codec, sizeof(*pdata->codec), |
713 | false, 0, 0); | 713 | false, 0, 0); |
714 | if (IS_ERR(child)) | 714 | if (IS_ERR(child)) |
diff --git a/drivers/mfd/twl4030-codec.c b/drivers/mfd/twl4030-codec.c index add6f67d8032..9a4b196d6deb 100644 --- a/drivers/mfd/twl4030-codec.c +++ b/drivers/mfd/twl4030-codec.c | |||
@@ -207,14 +207,14 @@ static int __devinit twl4030_codec_probe(struct platform_device *pdev) | |||
207 | 207 | ||
208 | if (pdata->audio) { | 208 | if (pdata->audio) { |
209 | cell = &codec->cells[childs]; | 209 | cell = &codec->cells[childs]; |
210 | cell->name = "twl4030_codec_audio"; | 210 | cell->name = "twl4030-codec"; |
211 | cell->platform_data = pdata->audio; | 211 | cell->platform_data = pdata->audio; |
212 | cell->data_size = sizeof(*pdata->audio); | 212 | cell->data_size = sizeof(*pdata->audio); |
213 | childs++; | 213 | childs++; |
214 | } | 214 | } |
215 | if (pdata->vibra) { | 215 | if (pdata->vibra) { |
216 | cell = &codec->cells[childs]; | 216 | cell = &codec->cells[childs]; |
217 | cell->name = "twl4030_codec_vibra"; | 217 | cell->name = "twl4030-vibra"; |
218 | cell->platform_data = pdata->vibra; | 218 | cell->platform_data = pdata->vibra; |
219 | cell->data_size = sizeof(*pdata->vibra); | 219 | cell->data_size = sizeof(*pdata->vibra); |
220 | childs++; | 220 | childs++; |
@@ -249,14 +249,14 @@ static int __devexit twl4030_codec_remove(struct platform_device *pdev) | |||
249 | return 0; | 249 | return 0; |
250 | } | 250 | } |
251 | 251 | ||
252 | MODULE_ALIAS("platform:twl4030_codec"); | 252 | MODULE_ALIAS("platform:twl4030-audio"); |
253 | 253 | ||
254 | static struct platform_driver twl4030_codec_driver = { | 254 | static struct platform_driver twl4030_codec_driver = { |
255 | .probe = twl4030_codec_probe, | 255 | .probe = twl4030_codec_probe, |
256 | .remove = __devexit_p(twl4030_codec_remove), | 256 | .remove = __devexit_p(twl4030_codec_remove), |
257 | .driver = { | 257 | .driver = { |
258 | .owner = THIS_MODULE, | 258 | .owner = THIS_MODULE, |
259 | .name = "twl4030_codec", | 259 | .name = "twl4030-audio", |
260 | }, | 260 | }, |
261 | }; | 261 | }; |
262 | 262 | ||
diff --git a/drivers/staging/xgifb/TODO b/drivers/staging/xgifb/TODO index 7d71019b84c2..c85ff5e9e700 100644 --- a/drivers/staging/xgifb/TODO +++ b/drivers/staging/xgifb/TODO | |||
@@ -12,4 +12,4 @@ TODO: | |||
12 | - get rid of non-linux related stuff | 12 | - get rid of non-linux related stuff |
13 | 13 | ||
14 | Please send patches to: | 14 | Please send patches to: |
15 | Arnaud Patard <apatard@mandriva.com> | 15 | Arnaud Patard <arnaud.patard@rtp-net.org> |
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index dc06ff134559..596ef6b922bf 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig | |||
@@ -1919,6 +1919,9 @@ config FB_SH_MOBILE_HDMI | |||
1919 | tristate "SuperH Mobile HDMI controller support" | 1919 | tristate "SuperH Mobile HDMI controller support" |
1920 | depends on FB_SH_MOBILE_LCDC | 1920 | depends on FB_SH_MOBILE_LCDC |
1921 | select FB_MODE_HELPERS | 1921 | select FB_MODE_HELPERS |
1922 | select SOUND | ||
1923 | select SND | ||
1924 | select SND_SOC | ||
1922 | ---help--- | 1925 | ---help--- |
1923 | Driver for the on-chip SH-Mobile HDMI controller. | 1926 | Driver for the on-chip SH-Mobile HDMI controller. |
1924 | 1927 | ||
diff --git a/drivers/video/sh_mobile_hdmi.c b/drivers/video/sh_mobile_hdmi.c index 2fde08cc66bf..ef989d94511c 100644 --- a/drivers/video/sh_mobile_hdmi.c +++ b/drivers/video/sh_mobile_hdmi.c | |||
@@ -22,6 +22,8 @@ | |||
22 | #include <linux/slab.h> | 22 | #include <linux/slab.h> |
23 | #include <linux/types.h> | 23 | #include <linux/types.h> |
24 | #include <linux/workqueue.h> | 24 | #include <linux/workqueue.h> |
25 | #include <sound/soc-dapm.h> | ||
26 | #include <sound/initval.h> | ||
25 | 27 | ||
26 | #include <video/sh_mobile_hdmi.h> | 28 | #include <video/sh_mobile_hdmi.h> |
27 | #include <video/sh_mobile_lcdc.h> | 29 | #include <video/sh_mobile_lcdc.h> |
@@ -222,6 +224,58 @@ static u8 hdmi_read(struct sh_hdmi *hdmi, u8 reg) | |||
222 | return ioread8(hdmi->base + reg); | 224 | return ioread8(hdmi->base + reg); |
223 | } | 225 | } |
224 | 226 | ||
227 | /* | ||
228 | * HDMI sound | ||
229 | */ | ||
230 | static unsigned int sh_hdmi_snd_read(struct snd_soc_codec *codec, | ||
231 | unsigned int reg) | ||
232 | { | ||
233 | struct sh_hdmi *hdmi = snd_soc_codec_get_drvdata(codec); | ||
234 | |||
235 | return hdmi_read(hdmi, reg); | ||
236 | } | ||
237 | |||
238 | static int sh_hdmi_snd_write(struct snd_soc_codec *codec, | ||
239 | unsigned int reg, | ||
240 | unsigned int value) | ||
241 | { | ||
242 | struct sh_hdmi *hdmi = snd_soc_codec_get_drvdata(codec); | ||
243 | |||
244 | hdmi_write(hdmi, value, reg); | ||
245 | return 0; | ||
246 | } | ||
247 | |||
248 | static struct snd_soc_dai_driver sh_hdmi_dai = { | ||
249 | .name = "sh_mobile_hdmi-hifi", | ||
250 | .playback = { | ||
251 | .stream_name = "Playback", | ||
252 | .channels_min = 2, | ||
253 | .channels_max = 8, | ||
254 | .rates = SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | | ||
255 | SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_88200 | | ||
256 | SNDRV_PCM_RATE_96000 | SNDRV_PCM_RATE_176400 | | ||
257 | SNDRV_PCM_RATE_192000, | ||
258 | .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE, | ||
259 | }, | ||
260 | }; | ||
261 | |||
262 | static int sh_hdmi_snd_probe(struct snd_soc_codec *codec) | ||
263 | { | ||
264 | dev_info(codec->dev, "SH Mobile HDMI Audio Codec"); | ||
265 | |||
266 | return 0; | ||
267 | } | ||
268 | |||
269 | static struct snd_soc_codec_driver soc_codec_dev_sh_hdmi = { | ||
270 | .probe = sh_hdmi_snd_probe, | ||
271 | .read = sh_hdmi_snd_read, | ||
272 | .write = sh_hdmi_snd_write, | ||
273 | }; | ||
274 | |||
275 | /* | ||
276 | * HDMI video | ||
277 | */ | ||
278 | |||
225 | /* External video parameter settings */ | 279 | /* External video parameter settings */ |
226 | static void hdmi_external_video_param(struct sh_hdmi *hdmi) | 280 | static void hdmi_external_video_param(struct sh_hdmi *hdmi) |
227 | { | 281 | { |
@@ -318,6 +372,9 @@ static void sh_hdmi_video_config(struct sh_hdmi *hdmi) | |||
318 | */ | 372 | */ |
319 | static void sh_hdmi_audio_config(struct sh_hdmi *hdmi) | 373 | static void sh_hdmi_audio_config(struct sh_hdmi *hdmi) |
320 | { | 374 | { |
375 | u8 data; | ||
376 | struct sh_mobile_hdmi_info *pdata = hdmi->dev->platform_data; | ||
377 | |||
321 | /* | 378 | /* |
322 | * [7:4] L/R data swap control | 379 | * [7:4] L/R data swap control |
323 | * [3:0] appropriate N[19:16] | 380 | * [3:0] appropriate N[19:16] |
@@ -335,7 +392,23 @@ static void sh_hdmi_audio_config(struct sh_hdmi *hdmi) | |||
335 | * [6:5] set required down sampling rate if required | 392 | * [6:5] set required down sampling rate if required |
336 | * [4:3] set required audio source | 393 | * [4:3] set required audio source |
337 | */ | 394 | */ |
338 | hdmi_write(hdmi, 0x00, HDMI_AUDIO_SETTING_1); | 395 | switch (pdata->flags & HDMI_SND_SRC_MASK) { |
396 | default: | ||
397 | /* fall through */ | ||
398 | case HDMI_SND_SRC_I2S: | ||
399 | data = 0x0 << 3; | ||
400 | break; | ||
401 | case HDMI_SND_SRC_SPDIF: | ||
402 | data = 0x1 << 3; | ||
403 | break; | ||
404 | case HDMI_SND_SRC_DSD: | ||
405 | data = 0x2 << 3; | ||
406 | break; | ||
407 | case HDMI_SND_SRC_HBR: | ||
408 | data = 0x3 << 3; | ||
409 | break; | ||
410 | } | ||
411 | hdmi_write(hdmi, data, HDMI_AUDIO_SETTING_1); | ||
339 | 412 | ||
340 | /* [3:0] set sending channel number for channel status */ | 413 | /* [3:0] set sending channel number for channel status */ |
341 | hdmi_write(hdmi, 0x40, HDMI_AUDIO_SETTING_2); | 414 | hdmi_write(hdmi, 0x40, HDMI_AUDIO_SETTING_2); |
@@ -891,6 +964,11 @@ static int __init sh_hdmi_probe(struct platform_device *pdev) | |||
891 | return -ENOMEM; | 964 | return -ENOMEM; |
892 | } | 965 | } |
893 | 966 | ||
967 | ret = snd_soc_register_codec(&pdev->dev, | ||
968 | &soc_codec_dev_sh_hdmi, &sh_hdmi_dai, 1); | ||
969 | if (ret < 0) | ||
970 | goto esndreg; | ||
971 | |||
894 | hdmi->dev = &pdev->dev; | 972 | hdmi->dev = &pdev->dev; |
895 | 973 | ||
896 | hdmi->hdmi_clk = clk_get(&pdev->dev, "ick"); | 974 | hdmi->hdmi_clk = clk_get(&pdev->dev, "ick"); |
@@ -976,6 +1054,8 @@ eclkenable: | |||
976 | erate: | 1054 | erate: |
977 | clk_put(hdmi->hdmi_clk); | 1055 | clk_put(hdmi->hdmi_clk); |
978 | egetclk: | 1056 | egetclk: |
1057 | snd_soc_unregister_codec(&pdev->dev); | ||
1058 | esndreg: | ||
979 | kfree(hdmi); | 1059 | kfree(hdmi); |
980 | 1060 | ||
981 | return ret; | 1061 | return ret; |
@@ -988,6 +1068,8 @@ static int __exit sh_hdmi_remove(struct platform_device *pdev) | |||
988 | struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 1068 | struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
989 | int irq = platform_get_irq(pdev, 0); | 1069 | int irq = platform_get_irq(pdev, 0); |
990 | 1070 | ||
1071 | snd_soc_unregister_codec(&pdev->dev); | ||
1072 | |||
991 | pdata->lcd_chan->board_cfg.display_on = NULL; | 1073 | pdata->lcd_chan->board_cfg.display_on = NULL; |
992 | pdata->lcd_chan->board_cfg.display_off = NULL; | 1074 | pdata->lcd_chan->board_cfg.display_off = NULL; |
993 | pdata->lcd_chan->board_cfg.board_data = NULL; | 1075 | pdata->lcd_chan->board_cfg.board_data = NULL; |