diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-30 22:03:41 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-30 22:03:41 -0400 |
commit | 6df419e45d71b8d9a0de8e92a1212bbea460f0e0 (patch) | |
tree | c0902a96353391400818fe8b7adf11493b56935a /drivers/media/video/em28xx/em28xx-core.c | |
parent | 27c1ee3f929555b71fa39ec0d81a7e7185de1b16 (diff) | |
parent | c893e7c64e36087dceb4662917976a81d1754fc0 (diff) |
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media updates from Mauro Carvalho Chehab:
"This is the first part of the media patches for v3.6.
This patch series contain:
- new DVB frontend: rtl2832
- new video drivers: adv7393
- some unused files got removed
- a selection API cleanup between V4L2 and V4L2 subdev API's
- a major redesign at v4l-ioctl2, in order to clean it up
- several driver fixes and improvements."
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (174 commits)
v4l: Export v4l2-common.h in include/linux/Kbuild
media: Revert "[media] Terratec Cinergy S2 USB HD Rev.2"
[media] media: Use pr_info not homegrown pr_reg macro
[media] Terratec Cinergy S2 USB HD Rev.2
[media] v4l: Correct conflicting V4L2 subdev selection API documentation
[media] Feature removal: V4L2 selections API target and flag definitions
[media] v4l: Unify selection flags documentation
[media] v4l: Unify selection flags
[media] v4l: Common documentation for selection targets
[media] v4l: Unify selection targets across V4L2 and V4L2 subdev interfaces
[media] v4l: Remove "_ACTUAL" from subdev selection API target definition names
[media] V4L: Remove "_ACTIVE" from the selection target name definitions
[media] media: dvb-usb: print mac address via native %pM
[media] s5p-tv: Use module_i2c_driver in sii9234_drv.c file
[media] media: gpio-ir-recv: add allowed_protos for platform data
[media] s5p-jpeg: Use module_platform_driver in jpeg-core.c file
[media] saa7134: fix spelling of detach in label
[media] cx88-blackbird: replace ioctl by unlocked_ioctl
[media] cx88: don't use current_norm
[media] cx88: fix a number of v4l2-compliance violations
...
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-core.c')
-rw-r--r-- | drivers/media/video/em28xx/em28xx-core.c | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/drivers/media/video/em28xx/em28xx-core.c b/drivers/media/video/em28xx/em28xx-core.c index 5717bdee8f1b..de2cb20ad2cc 100644 --- a/drivers/media/video/em28xx/em28xx-core.c +++ b/drivers/media/video/em28xx/em28xx-core.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/slab.h> | 27 | #include <linux/slab.h> |
28 | #include <linux/usb.h> | 28 | #include <linux/usb.h> |
29 | #include <linux/vmalloc.h> | 29 | #include <linux/vmalloc.h> |
30 | #include <sound/ac97_codec.h> | ||
30 | #include <media/v4l2-common.h> | 31 | #include <media/v4l2-common.h> |
31 | 32 | ||
32 | #include "em28xx.h" | 33 | #include "em28xx.h" |
@@ -326,13 +327,13 @@ struct em28xx_vol_itable { | |||
326 | }; | 327 | }; |
327 | 328 | ||
328 | static struct em28xx_vol_itable inputs[] = { | 329 | static struct em28xx_vol_itable inputs[] = { |
329 | { EM28XX_AMUX_VIDEO, AC97_VIDEO_VOL }, | 330 | { EM28XX_AMUX_VIDEO, AC97_VIDEO }, |
330 | { EM28XX_AMUX_LINE_IN, AC97_LINEIN_VOL }, | 331 | { EM28XX_AMUX_LINE_IN, AC97_LINE }, |
331 | { EM28XX_AMUX_PHONE, AC97_PHONE_VOL }, | 332 | { EM28XX_AMUX_PHONE, AC97_PHONE }, |
332 | { EM28XX_AMUX_MIC, AC97_MIC_VOL }, | 333 | { EM28XX_AMUX_MIC, AC97_MIC }, |
333 | { EM28XX_AMUX_CD, AC97_CD_VOL }, | 334 | { EM28XX_AMUX_CD, AC97_CD }, |
334 | { EM28XX_AMUX_AUX, AC97_AUX_VOL }, | 335 | { EM28XX_AMUX_AUX, AC97_AUX }, |
335 | { EM28XX_AMUX_PCM_OUT, AC97_PCM_OUT_VOL }, | 336 | { EM28XX_AMUX_PCM_OUT, AC97_PCM }, |
336 | }; | 337 | }; |
337 | 338 | ||
338 | static int set_ac97_input(struct em28xx *dev) | 339 | static int set_ac97_input(struct em28xx *dev) |
@@ -415,11 +416,11 @@ struct em28xx_vol_otable { | |||
415 | }; | 416 | }; |
416 | 417 | ||
417 | static const struct em28xx_vol_otable outputs[] = { | 418 | static const struct em28xx_vol_otable outputs[] = { |
418 | { EM28XX_AOUT_MASTER, AC97_MASTER_VOL }, | 419 | { EM28XX_AOUT_MASTER, AC97_MASTER }, |
419 | { EM28XX_AOUT_LINE, AC97_LINE_LEVEL_VOL }, | 420 | { EM28XX_AOUT_LINE, AC97_HEADPHONE }, |
420 | { EM28XX_AOUT_MONO, AC97_MASTER_MONO_VOL }, | 421 | { EM28XX_AOUT_MONO, AC97_MASTER_MONO }, |
421 | { EM28XX_AOUT_LFE, AC97_LFE_MASTER_VOL }, | 422 | { EM28XX_AOUT_LFE, AC97_CENTER_LFE_MASTER }, |
422 | { EM28XX_AOUT_SURR, AC97_SURR_MASTER_VOL }, | 423 | { EM28XX_AOUT_SURR, AC97_SURROUND_MASTER }, |
423 | }; | 424 | }; |
424 | 425 | ||
425 | int em28xx_audio_analog_set(struct em28xx *dev) | 426 | int em28xx_audio_analog_set(struct em28xx *dev) |
@@ -459,9 +460,9 @@ int em28xx_audio_analog_set(struct em28xx *dev) | |||
459 | if (dev->audio_mode.ac97 != EM28XX_NO_AC97) { | 460 | if (dev->audio_mode.ac97 != EM28XX_NO_AC97) { |
460 | int vol; | 461 | int vol; |
461 | 462 | ||
462 | em28xx_write_ac97(dev, AC97_POWER_DOWN_CTRL, 0x4200); | 463 | em28xx_write_ac97(dev, AC97_POWERDOWN, 0x4200); |
463 | em28xx_write_ac97(dev, AC97_EXT_AUD_CTRL, 0x0031); | 464 | em28xx_write_ac97(dev, AC97_EXTENDED_STATUS, 0x0031); |
464 | em28xx_write_ac97(dev, AC97_PCM_IN_SRATE, 0xbb80); | 465 | em28xx_write_ac97(dev, AC97_PCM_LR_ADC_RATE, 0xbb80); |
465 | 466 | ||
466 | /* LSB: left channel - both channels with the same level */ | 467 | /* LSB: left channel - both channels with the same level */ |
467 | vol = (0x1f - dev->volume) | ((0x1f - dev->volume) << 8); | 468 | vol = (0x1f - dev->volume) | ((0x1f - dev->volume) << 8); |
@@ -487,7 +488,7 @@ int em28xx_audio_analog_set(struct em28xx *dev) | |||
487 | channels */ | 488 | channels */ |
488 | sel |= (sel << 8); | 489 | sel |= (sel << 8); |
489 | 490 | ||
490 | em28xx_write_ac97(dev, AC97_RECORD_SELECT, sel); | 491 | em28xx_write_ac97(dev, AC97_REC_SEL, sel); |
491 | } | 492 | } |
492 | } | 493 | } |
493 | 494 | ||