aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-08-15 14:22:00 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-15 14:22:00 -0400
commit1b68c9596ce17a1e06918ed65fc3d19b92b04aab (patch)
treed7588c281a92fb30604ddc23f88f748be028921d
parent5a4179460cb50d939a2ae713cf88fcbff75f2c1c (diff)
parentaaae5272118bcce90d11629f15bc01ea8e545e6d (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: ALSA: sound/usb/format: silence uninitialized variable warnings MAINTAINERS: Add Ian Lartey as comaintaner for Wolfson devices MAINTAINERS: Make Wolfson entry also cover CODEC drivers ASoC: Only tweak WM8994 chip configuration on devices up to rev D ASoC: Optimise DSP performance for WM8994 ALSA: hda - Fix dynamic ADC change working again ALSA: hda - Restrict PCM parameters per ELD information over HDMI sound: oss: sh_dac_audio.c removed duplicated #include
-rw-r--r--MAINTAINERS7
-rw-r--r--sound/oss/sh_dac_audio.c1
-rw-r--r--sound/pci/hda/hda_codec.c26
-rw-r--r--sound/pci/hda/hda_codec.h5
-rw-r--r--sound/pci/hda/hda_eld.c49
-rw-r--r--sound/pci/hda/hda_local.h2
-rw-r--r--sound/pci/hda/patch_cirrus.c2
-rw-r--r--sound/pci/hda/patch_conexant.c2
-rw-r--r--sound/pci/hda/patch_hdmi.c42
-rw-r--r--sound/pci/hda/patch_intelhdmi.c1
-rw-r--r--sound/pci/hda/patch_nvhdmi.c4
-rw-r--r--sound/pci/hda/patch_realtek.c2
-rw-r--r--sound/soc/codecs/wm8994.c23
-rw-r--r--sound/usb/format.c8
14 files changed, 147 insertions, 27 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index 99b6f8203a50..b5b8baa1d70e 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -6402,8 +6402,9 @@ S: Supported
6402F: drivers/input/touchscreen/*wm97* 6402F: drivers/input/touchscreen/*wm97*
6403F: include/linux/wm97xx.h 6403F: include/linux/wm97xx.h
6404 6404
6405WOLFSON MICROELECTRONICS PMIC DRIVERS 6405WOLFSON MICROELECTRONICS DRIVERS
6406M: Mark Brown <broonie@opensource.wolfsonmicro.com> 6406M: Mark Brown <broonie@opensource.wolfsonmicro.com>
6407M: Ian Lartey <ian@opensource.wolfsonmicro.com>
6407T: git git://opensource.wolfsonmicro.com/linux-2.6-audioplus 6408T: git git://opensource.wolfsonmicro.com/linux-2.6-audioplus
6408W: http://opensource.wolfsonmicro.com/node/8 6409W: http://opensource.wolfsonmicro.com/node/8
6409S: Supported 6410S: Supported
@@ -6418,8 +6419,8 @@ F: drivers/watchdog/wm83*_wdt.c
6418F: include/linux/mfd/wm831x/ 6419F: include/linux/mfd/wm831x/
6419F: include/linux/mfd/wm8350/ 6420F: include/linux/mfd/wm8350/
6420F: include/linux/mfd/wm8400* 6421F: include/linux/mfd/wm8400*
6421F: sound/soc/codecs/wm8350.* 6422F: include/sound/wm????.h
6422F: sound/soc/codecs/wm8400.* 6423F: sound/soc/codecs/wm*
6423 6424
6424X.25 NETWORK LAYER 6425X.25 NETWORK LAYER
6425M: Andrew Hendry <andrew.hendry@gmail.com> 6426M: Andrew Hendry <andrew.hendry@gmail.com>
diff --git a/sound/oss/sh_dac_audio.c b/sound/oss/sh_dac_audio.c
index fdb58eb83d4e..479e3025a8a3 100644
--- a/sound/oss/sh_dac_audio.c
+++ b/sound/oss/sh_dac_audio.c
@@ -15,7 +15,6 @@
15#include <linux/linkage.h> 15#include <linux/linkage.h>
16#include <linux/slab.h> 16#include <linux/slab.h>
17#include <linux/fs.h> 17#include <linux/fs.h>
18#include <linux/smp_lock.h>
19#include <linux/sound.h> 18#include <linux/sound.h>
20#include <linux/smp_lock.h> 19#include <linux/smp_lock.h>
21#include <linux/soundcard.h> 20#include <linux/soundcard.h>
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 720a81d711e3..dd8fb86c842b 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -1261,12 +1261,17 @@ void snd_hda_codec_setup_stream(struct hda_codec *codec, hda_nid_t nid,
1261} 1261}
1262EXPORT_SYMBOL_HDA(snd_hda_codec_setup_stream); 1262EXPORT_SYMBOL_HDA(snd_hda_codec_setup_stream);
1263 1263
1264static void really_cleanup_stream(struct hda_codec *codec,
1265 struct hda_cvt_setup *q);
1266
1264/** 1267/**
1265 * snd_hda_codec_cleanup_stream - clean up the codec for closing 1268 * __snd_hda_codec_cleanup_stream - clean up the codec for closing
1266 * @codec: the CODEC to clean up 1269 * @codec: the CODEC to clean up
1267 * @nid: the NID to clean up 1270 * @nid: the NID to clean up
1271 * @do_now: really clean up the stream instead of clearing the active flag
1268 */ 1272 */
1269void snd_hda_codec_cleanup_stream(struct hda_codec *codec, hda_nid_t nid) 1273void __snd_hda_codec_cleanup_stream(struct hda_codec *codec, hda_nid_t nid,
1274 int do_now)
1270{ 1275{
1271 struct hda_cvt_setup *p; 1276 struct hda_cvt_setup *p;
1272 1277
@@ -1274,14 +1279,19 @@ void snd_hda_codec_cleanup_stream(struct hda_codec *codec, hda_nid_t nid)
1274 return; 1279 return;
1275 1280
1276 snd_printdd("hda_codec_cleanup_stream: NID=0x%x\n", nid); 1281 snd_printdd("hda_codec_cleanup_stream: NID=0x%x\n", nid);
1277 /* here we just clear the active flag; actual clean-ups will be done
1278 * in purify_inactive_streams()
1279 */
1280 p = get_hda_cvt_setup(codec, nid); 1282 p = get_hda_cvt_setup(codec, nid);
1281 if (p) 1283 if (p) {
1282 p->active = 0; 1284 /* here we just clear the active flag when do_now isn't set;
1285 * actual clean-ups will be done later in
1286 * purify_inactive_streams() called from snd_hda_codec_prpapre()
1287 */
1288 if (do_now)
1289 really_cleanup_stream(codec, p);
1290 else
1291 p->active = 0;
1292 }
1283} 1293}
1284EXPORT_SYMBOL_HDA(snd_hda_codec_cleanup_stream); 1294EXPORT_SYMBOL_HDA(__snd_hda_codec_cleanup_stream);
1285 1295
1286static void really_cleanup_stream(struct hda_codec *codec, 1296static void really_cleanup_stream(struct hda_codec *codec,
1287 struct hda_cvt_setup *q) 1297 struct hda_cvt_setup *q)
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
index 3f7a479881e5..4303353feda9 100644
--- a/sound/pci/hda/hda_codec.h
+++ b/sound/pci/hda/hda_codec.h
@@ -963,7 +963,10 @@ void snd_hda_codec_cleanup(struct hda_codec *codec,
963void snd_hda_codec_setup_stream(struct hda_codec *codec, hda_nid_t nid, 963void snd_hda_codec_setup_stream(struct hda_codec *codec, hda_nid_t nid,
964 u32 stream_tag, 964 u32 stream_tag,
965 int channel_id, int format); 965 int channel_id, int format);
966void snd_hda_codec_cleanup_stream(struct hda_codec *codec, hda_nid_t nid); 966void __snd_hda_codec_cleanup_stream(struct hda_codec *codec, hda_nid_t nid,
967 int do_now);
968#define snd_hda_codec_cleanup_stream(codec, nid) \
969 __snd_hda_codec_cleanup_stream(codec, nid, 0)
967unsigned int snd_hda_calc_stream_format(unsigned int rate, 970unsigned int snd_hda_calc_stream_format(unsigned int rate,
968 unsigned int channels, 971 unsigned int channels,
969 unsigned int format, 972 unsigned int format,
diff --git a/sound/pci/hda/hda_eld.c b/sound/pci/hda/hda_eld.c
index d8da18a9e98b..803b298f7411 100644
--- a/sound/pci/hda/hda_eld.c
+++ b/sound/pci/hda/hda_eld.c
@@ -596,4 +596,53 @@ void snd_hda_eld_proc_free(struct hda_codec *codec, struct hdmi_eld *eld)
596} 596}
597EXPORT_SYMBOL_HDA(snd_hda_eld_proc_free); 597EXPORT_SYMBOL_HDA(snd_hda_eld_proc_free);
598 598
599/* update PCM info based on ELD */
600void hdmi_eld_update_pcm_info(struct hdmi_eld *eld, struct hda_pcm_stream *pcm,
601 struct hda_pcm_stream *codec_pars)
602{
603 int i;
604
605 pcm->rates = 0;
606 pcm->formats = 0;
607 pcm->maxbps = 0;
608 pcm->channels_min = -1;
609 pcm->channels_max = 0;
610 for (i = 0; i < eld->sad_count; i++) {
611 struct cea_sad *a = &eld->sad[i];
612 pcm->rates |= a->rates;
613 if (a->channels < pcm->channels_min)
614 pcm->channels_min = a->channels;
615 if (a->channels > pcm->channels_max)
616 pcm->channels_max = a->channels;
617 if (a->format == AUDIO_CODING_TYPE_LPCM) {
618 if (a->sample_bits & AC_SUPPCM_BITS_16) {
619 pcm->formats |= SNDRV_PCM_FMTBIT_S16_LE;
620 if (pcm->maxbps < 16)
621 pcm->maxbps = 16;
622 }
623 if (a->sample_bits & AC_SUPPCM_BITS_20) {
624 pcm->formats |= SNDRV_PCM_FMTBIT_S32_LE;
625 if (pcm->maxbps < 20)
626 pcm->maxbps = 20;
627 }
628 if (a->sample_bits & AC_SUPPCM_BITS_24) {
629 pcm->formats |= SNDRV_PCM_FMTBIT_S32_LE;
630 if (pcm->maxbps < 24)
631 pcm->maxbps = 24;
632 }
633 }
634 }
635
636 if (!codec_pars)
637 return;
638
639 /* restrict the parameters by the values the codec provides */
640 pcm->rates &= codec_pars->rates;
641 pcm->formats &= codec_pars->formats;
642 pcm->channels_min = max(pcm->channels_min, codec_pars->channels_min);
643 pcm->channels_max = min(pcm->channels_max, codec_pars->channels_max);
644 pcm->maxbps = min(pcm->maxbps, codec_pars->maxbps);
645}
646EXPORT_SYMBOL_HDA(hdmi_eld_update_pcm_info);
647
599#endif /* CONFIG_PROC_FS */ 648#endif /* CONFIG_PROC_FS */
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h
index 7a97f126f6f7..28ab4aead48f 100644
--- a/