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

Commit 1e8d4e8b 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: (32 commits)
  ALSA: hda: Conexant: Allow different output types to share DAC
  ASoC: Correct element count for WM8996 sidetone HPF
  ASoC: Tegra: wm8903 machine driver: Drop Ventana support
  ASoC: Add samsung maintainer
  ASoC: Add Springbank I/O card to Speyside Kconfig
  ALSA: hda/conexant - Enable ADC-switching for auto-mic mode, too
  ALSA: hda - Fix double-headphone/speaker paths for Cxt auto-parser
  ALSA: hda - Update jack-sense info even when no automute is set
  ALSA: hda - Fix output-path initialization for Realtek auto-parser
  sound/soc/fsl/mpc8610_hpcd.c: add missing of_node_put
  sound/soc/fsl/p1022_ds.c: add missing of_node_put
  sound/soc/ep93xx/ep93xx-i2s.c: add missing kfree
  sound/soc/kirkwood/kirkwood-i2s.c: add missing kfree
  ASoC: soc-core: use GFP_KERNEL flag for kmalloc in snd_soc_cnew
  sound/soc/fsl/fsl_dma.c: add missing of_node_put
  ASoC: Clear completions from late WM8996 FLL lock IRQs
  ASoC: Clear any outstanding WM8962 FLL lock completions before waiting
  ASoC: Ensure we only run Speyside WM8962 bias level callbacks once
  ASoC: Fix configuration of WM8996 input enables
  ASoC: WM8996 record paths need AIFCLK
  ...
parents 671ee7f0 26b9b559
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -5532,6 +5532,7 @@ F: include/media/*7146*

SAMSUNG AUDIO (ASoC) DRIVERS
M:	Jassi Brar <jassisinghbrar@gmail.com>
M:	Sangbeom Kim <sbkim73@samsung.com>
L:	alsa-devel@alsa-project.org (moderated for non-subscribers)
S:	Supported
F:	sound/soc/samsung
+36 −21
Original line number Diff line number Diff line
@@ -3348,6 +3348,8 @@ static hda_nid_t get_unassigned_dac(struct hda_codec *codec, hda_nid_t pin,

#define MAX_AUTO_DACS	5

#define DAC_SLAVE_FLAG	0x8000	/* filled dac is a slave */

/* fill analog DAC list from the widget tree */
static int fill_cx_auto_dacs(struct hda_codec *codec, hda_nid_t *dacs)
{
@@ -3370,16 +3372,26 @@ static int fill_cx_auto_dacs(struct hda_codec *codec, hda_nid_t *dacs)
/* fill pin_dac_pair list from the pin and dac list */
static int fill_dacs_for_pins(struct hda_codec *codec, hda_nid_t *pins,
			      int num_pins, hda_nid_t *dacs, int *rest,
			      struct pin_dac_pair *filled, int type)
			      struct pin_dac_pair *filled, int nums, 
			      int type)
{
	int i, nums;
	int i, start = nums;

	nums = 0;
	for (i = 0; i < num_pins; i++) {
	for (i = 0; i < num_pins; i++, nums++) {
		filled[nums].pin = pins[i];
		filled[nums].type = type;
		filled[nums].dac = get_unassigned_dac(codec, pins[i], dacs, rest);
		nums++;
		if (filled[nums].dac) 
			continue;
		if (filled[start].dac && get_connection_index(codec, pins[i], filled[start].dac) >= 0) {
			filled[nums].dac = filled[start].dac | DAC_SLAVE_FLAG;
			continue;
		}
		if (filled[0].dac && get_connection_index(codec, pins[i], filled[0].dac) >= 0) {
			filled[nums].dac = filled[0].dac | DAC_SLAVE_FLAG;
			continue;
		}
		snd_printdd("Failed to find a DAC for pin 0x%x", pins[i]);
	}
	return nums;
}
@@ -3395,19 +3407,19 @@ static void cx_auto_parse_output(struct hda_codec *codec)
	rest = fill_cx_auto_dacs(codec, dacs);
	/* parse all analog output pins */
	nums = fill_dacs_for_pins(codec, cfg->line_out_pins, cfg->line_outs,
				  dacs, &rest, spec->dac_info,
			  dacs, &rest, spec->dac_info, 0,
			  AUTO_PIN_LINE_OUT);
	nums += fill_dacs_for_pins(codec, cfg->hp_pins, cfg->hp_outs,
				  dacs, &rest, spec->dac_info + nums,
	nums = fill_dacs_for_pins(codec, cfg->hp_pins, cfg->hp_outs,
			  dacs, &rest, spec->dac_info, nums,
			  AUTO_PIN_HP_OUT);
	nums += fill_dacs_for_pins(codec, cfg->speaker_pins, cfg->speaker_outs,
				  dacs, &rest, spec->dac_info + nums,
	nums = fill_dacs_for_pins(codec, cfg->speaker_pins, cfg->speaker_outs,
			  dacs, &rest, spec->dac_info, nums,
			  AUTO_PIN_SPEAKER_OUT);
	spec->dac_info_filled = nums;
	/* fill multiout struct */
	for (i = 0; i < nums; i++) {
		hda_nid_t dac = spec->dac_info[i].dac;
		if (!dac)
		if (!dac || (dac & DAC_SLAVE_FLAG))
			continue;
		switch (spec->dac_info[i].type) {
		case AUTO_PIN_LINE_OUT:
@@ -3862,7 +3874,7 @@ static void cx_auto_parse_input(struct hda_codec *codec)
	}
	if (imux->num_items >= 2 && cfg->num_inputs == imux->num_items)
		cx_auto_check_auto_mic(codec);
	if (imux->num_items > 1 && !spec->auto_mic) {
	if (imux->num_items > 1) {
		for (i = 1; i < imux->num_items; i++) {
			if (spec->imux_info[i].adc != spec->imux_info[0].adc) {
				spec->adc_switching = 1;
@@ -4035,6 +4047,8 @@ static void cx_auto_init_output(struct hda_codec *codec)
		nid = spec->dac_info[i].dac;
		if (!nid)
			nid = spec->multiout.dac_nids[0];
		else if (nid & DAC_SLAVE_FLAG)
			nid &= ~DAC_SLAVE_FLAG;
		select_connection(codec, spec->dac_info[i].pin, nid);
	}
	if (spec->auto_mute) {
@@ -4167,9 +4181,11 @@ static int try_add_pb_volume(struct hda_codec *codec, hda_nid_t dac,
			     hda_nid_t pin, const char *name, int idx)
{
	unsigned int caps;
	if (dac && !(dac & DAC_SLAVE_FLAG)) {
		caps = query_amp_caps(codec, dac, HDA_OUTPUT);
		if (caps & AC_AMPCAP_NUM_STEPS)
			return cx_auto_add_pb_volume(codec, dac, name, idx);
	}
	caps = query_amp_caps(codec, pin, HDA_OUTPUT);
	if (caps & AC_AMPCAP_NUM_STEPS)
		return cx_auto_add_pb_volume(codec, pin, name, idx);
@@ -4191,8 +4207,7 @@ static int cx_auto_build_output_controls(struct hda_codec *codec)
	for (i = 0; i < spec->dac_info_filled; i++) {
		const char *label;
		int idx, type;
		if (!spec->dac_info[i].dac)
			continue;
		hda_nid_t dac = spec->dac_info[i].dac;
		type = spec->dac_info[i].type;
		if (type == AUTO_PIN_LINE_OUT)
			type = spec->autocfg.line_out_type;
@@ -4211,7 +4226,7 @@ static int cx_auto_build_output_controls(struct hda_codec *codec)
			idx = num_spk++;
			break;
		}
		err = try_add_pb_volume(codec, spec->dac_info[i].dac,
		err = try_add_pb_volume(codec, dac,
					spec->dac_info[i].pin,
					label, idx);
		if (err < 0)
+17 −11
Original line number Diff line number Diff line
@@ -565,11 +565,11 @@ static void alc_hp_automute(struct hda_codec *codec)
{
	struct alc_spec *spec = codec->spec;

	if (!spec->automute)
		return;
	spec->jack_present =
		detect_jacks(codec, ARRAY_SIZE(spec->autocfg.hp_pins),
			     spec->autocfg.hp_pins);
	if (!spec->automute)
		return;
	update_speakers(codec);
}

@@ -578,11 +578,11 @@ static void alc_line_automute(struct hda_codec *codec)
{
	struct alc_spec *spec = codec->spec;

	if (!spec->automute || !spec->detect_line)
		return;
	spec->line_jack_present =
		detect_jacks(codec, ARRAY_SIZE(spec->autocfg.line_out_pins),
			     spec->autocfg.line_out_pins);
	if (!spec->automute || !spec->detect_line)
		return;
	update_speakers(codec);
}

@@ -3083,16 +3083,22 @@ static void alc_auto_init_multi_out(struct hda_codec *codec)
static void alc_auto_init_extra_out(struct hda_codec *codec)
{
	struct alc_spec *spec = codec->spec;
	hda_nid_t pin;
	hda_nid_t pin, dac;

	pin = spec->autocfg.hp_pins[0];
	if (pin)
		alc_auto_set_output_and_unmute(codec, pin, PIN_HP,
						  spec->multiout.hp_nid);
	if (pin) {
		dac = spec->multiout.hp_nid;
		if (!dac)
			dac = spec->multiout.dac_nids[0];
		alc_auto_set_output_and_unmute(codec, pin, PIN_HP, dac);
	}
	pin = spec->autocfg.speaker_pins[0];
	if (pin)
		alc_auto_set_output_and_unmute(codec, pin, PIN_OUT,
					spec->multiout.extra_out_nid[0]);
	if (pin) {
		dac = spec->multiout.extra_out_nid[0];
		if (!dac)
			dac = spec->multiout.dac_nids[0];
		alc_auto_set_output_and_unmute(codec, pin, PIN_OUT, dac);
	}
}

/*
+1 −1
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@ static int bf5xx_ad193x_hw_params(struct snd_pcm_substream *substream,

	switch (params_rate(params)) {
	case 48000:
		clk = 12288000;
		clk = 24576000;
		break;
	}

+2 −9
Original line number Diff line number Diff line
@@ -27,11 +27,6 @@ struct ad193x_priv {
	int sysclk;
};

/* ad193x register cache & default register settings */
static const u8 ad193x_reg[AD193X_NUM_REGS] = {
	0, 0, 0, 0, 0, 0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0, 0, 0,
};

/*
 * AD193X volume/mute/de-emphasis etc. controls
 */
@@ -307,7 +302,8 @@ static int ad193x_hw_params(struct snd_pcm_substream *substream,
	snd_soc_write(codec, AD193X_PLL_CLK_CTRL0, reg);

	reg = snd_soc_read(codec, AD193X_DAC_CTRL2);
	reg = (reg & (~AD193X_DAC_WORD_LEN_MASK)) | word_len;
	reg = (reg & (~AD193X_DAC_WORD_LEN_MASK))
		| (word_len << AD193X_DAC_WORD_LEN_SHFT);
	snd_soc_write(codec, AD193X_DAC_CTRL2, reg);

	reg = snd_soc_read(codec, AD193X_ADC_CTRL1);
@@ -389,9 +385,6 @@ static int ad193x_probe(struct snd_soc_codec *codec)

static struct snd_soc_codec_driver soc_codec_dev_ad193x = {
	.probe = 	ad193x_probe,
	.reg_cache_default = ad193x_reg,
	.reg_cache_size = AD193X_NUM_REGS,
	.reg_word_size = sizeof(u16),
};

#if defined(CONFIG_SPI_MASTER)
Loading