Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1b68c959 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* '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
parents 5a417946 aaae5272
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -6402,8 +6402,9 @@ S: Supported
F:	drivers/input/touchscreen/*wm97*
F:	include/linux/wm97xx.h

WOLFSON MICROELECTRONICS PMIC DRIVERS
WOLFSON MICROELECTRONICS DRIVERS
M:	Mark Brown <broonie@opensource.wolfsonmicro.com>
M:	Ian Lartey <ian@opensource.wolfsonmicro.com>
T:	git git://opensource.wolfsonmicro.com/linux-2.6-audioplus
W:	http://opensource.wolfsonmicro.com/node/8
S:	Supported
@@ -6418,8 +6419,8 @@ F: drivers/watchdog/wm83*_wdt.c
F:	include/linux/mfd/wm831x/
F:	include/linux/mfd/wm8350/
F:	include/linux/mfd/wm8400*
F:	sound/soc/codecs/wm8350.*
F:	sound/soc/codecs/wm8400.*
F:	include/sound/wm????.h
F:	sound/soc/codecs/wm*

X.25 NETWORK LAYER
M:	Andrew Hendry <andrew.hendry@gmail.com>
+0 −1
Original line number Diff line number Diff line
@@ -15,7 +15,6 @@
#include <linux/linkage.h>
#include <linux/slab.h>
#include <linux/fs.h>
#include <linux/smp_lock.h>
#include <linux/sound.h>
#include <linux/smp_lock.h>
#include <linux/soundcard.h>
+18 −8
Original line number Diff line number Diff line
@@ -1261,12 +1261,17 @@ void snd_hda_codec_setup_stream(struct hda_codec *codec, hda_nid_t nid,
}
EXPORT_SYMBOL_HDA(snd_hda_codec_setup_stream);

static void really_cleanup_stream(struct hda_codec *codec,
				  struct hda_cvt_setup *q);

/**
 * snd_hda_codec_cleanup_stream - clean up the codec for closing
 * __snd_hda_codec_cleanup_stream - clean up the codec for closing
 * @codec: the CODEC to clean up
 * @nid: the NID to clean up
 * @do_now: really clean up the stream instead of clearing the active flag
 */
void snd_hda_codec_cleanup_stream(struct hda_codec *codec, hda_nid_t nid)
void __snd_hda_codec_cleanup_stream(struct hda_codec *codec, hda_nid_t nid,
				    int do_now)
{
	struct hda_cvt_setup *p;

@@ -1274,14 +1279,19 @@ void snd_hda_codec_cleanup_stream(struct hda_codec *codec, hda_nid_t nid)
		return;

	snd_printdd("hda_codec_cleanup_stream: NID=0x%x\n", nid);
	/* here we just clear the active flag; actual clean-ups will be done
	 * in purify_inactive_streams()
	 */
	p = get_hda_cvt_setup(codec, nid);
	if (p)
	if (p) {
		/* here we just clear the active flag when do_now isn't set;
		 * actual clean-ups will be done later in
		 * purify_inactive_streams() called from snd_hda_codec_prpapre()
		 */
		if (do_now)
			really_cleanup_stream(codec, p);
		else
			p->active = 0;
	}
EXPORT_SYMBOL_HDA(snd_hda_codec_cleanup_stream);
}
EXPORT_SYMBOL_HDA(__snd_hda_codec_cleanup_stream);

static void really_cleanup_stream(struct hda_codec *codec,
				  struct hda_cvt_setup *q)
+4 −1
Original line number Diff line number Diff line
@@ -963,7 +963,10 @@ void snd_hda_codec_cleanup(struct hda_codec *codec,
void snd_hda_codec_setup_stream(struct hda_codec *codec, hda_nid_t nid,
				u32 stream_tag,
				int channel_id, int format);
void snd_hda_codec_cleanup_stream(struct hda_codec *codec, hda_nid_t nid);
void __snd_hda_codec_cleanup_stream(struct hda_codec *codec, hda_nid_t nid,
				    int do_now);
#define snd_hda_codec_cleanup_stream(codec, nid) \
	__snd_hda_codec_cleanup_stream(codec, nid, 0)
unsigned int snd_hda_calc_stream_format(unsigned int rate,
					unsigned int channels,
					unsigned int format,
+49 −0
Original line number Diff line number Diff line
@@ -596,4 +596,53 @@ void snd_hda_eld_proc_free(struct hda_codec *codec, struct hdmi_eld *eld)
}
EXPORT_SYMBOL_HDA(snd_hda_eld_proc_free);

/* update PCM info based on ELD */
void hdmi_eld_update_pcm_info(struct hdmi_eld *eld, struct hda_pcm_stream *pcm,
			      struct hda_pcm_stream *codec_pars)
{
	int i;

	pcm->rates = 0;
	pcm->formats = 0;
	pcm->maxbps = 0;
	pcm->channels_min = -1;
	pcm->channels_max = 0;
	for (i = 0; i < eld->sad_count; i++) {
		struct cea_sad *a = &eld->sad[i];
		pcm->rates |= a->rates;
		if (a->channels < pcm->channels_min)
			pcm->channels_min = a->channels;
		if (a->channels > pcm->channels_max)
			pcm->channels_max = a->channels;
		if (a->format == AUDIO_CODING_TYPE_LPCM) {
			if (a->sample_bits & AC_SUPPCM_BITS_16) {
				pcm->formats |= SNDRV_PCM_FMTBIT_S16_LE;
				if (pcm->maxbps < 16)
					pcm->maxbps = 16;
			}
			if (a->sample_bits & AC_SUPPCM_BITS_20) {
				pcm->formats |= SNDRV_PCM_FMTBIT_S32_LE;
				if (pcm->maxbps < 20)
					pcm->maxbps = 20;
			}
			if (a->sample_bits & AC_SUPPCM_BITS_24) {
				pcm->formats |= SNDRV_PCM_FMTBIT_S32_LE;
				if (pcm->maxbps < 24)
					pcm->maxbps = 24;
			}
		}
	}

	if (!codec_pars)
		return;

	/* restrict the parameters by the values the codec provides */
	pcm->rates &= codec_pars->rates;
	pcm->formats &= codec_pars->formats;
	pcm->channels_min = max(pcm->channels_min, codec_pars->channels_min);
	pcm->channels_max = min(pcm->channels_max, codec_pars->channels_max);
	pcm->maxbps = min(pcm->maxbps, codec_pars->maxbps);
}
EXPORT_SYMBOL_HDA(hdmi_eld_update_pcm_info);

#endif /* CONFIG_PROC_FS */
Loading