Skip to content

Commit

Permalink
Merge tag 'sound-3.8' of git://git.kernel.org/pub/scm/linux/kernel/gi…
Browse files Browse the repository at this point in the history
…t/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "This update contains overall only driver-specific fixes.  Slightly
  large LOC are seen in usb-audio driver for a couple of new device
  quirks and cs42l71 ASoC driver for enhanced features.  The others are
  a few small (regression) fixes HD-audio, and yet other small / trival
  ASoC fixes."

* tag 'sound-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: usb-audio: Support for Digidesign Mbox 2 USB sound card:
  ALSA: HDA: Fix sound resume hang
  ALSA: hda - bug fix for invalid connection list of Haswell HDMI codec pins
  ALSA: hda - Fix the wrong pincaps set in ALC861VD dallas/hp fixup
  ALSA: hda - Set codec->single_adc_amp flag for Realtek codecs
  ASoC: atmel-ssc: change disable to disable in dts node
  ASoC: Prevent pop_wait overwrite
  ALSA: usb-audio: ignore-quirk for HP Wireless Audio
  ALSA: hda - Always turn on pins for HDMI/DP
  ALSA: hda - Fix pin configuration of HP Pavilion dv7
  ASoC: core: Fix splitting of log messages
  ASoC: cs42l73: Change VSPIN/VSPOUT to VSPINOUT
  ASoC: cs42l73: Add DAPM events for power down.
  ASoC: cs42l73: Add DMIC's as DAPM inputs.
  ASoC: sigmadsp: Fix endianness conversion issue
  ASoC: tpa6130a2: Use devm_* APIs
  • Loading branch information
torvalds committed Dec 20, 2012
2 parents 85d5b70 + cb99864 commit 03c850e
Show file tree
Hide file tree
Showing 19 changed files with 371 additions and 82 deletions.
4 changes: 2 additions & 2 deletions arch/arm/boot/dts/at91sam9263.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -368,14 +368,14 @@
compatible = "atmel,at91rm9200-ssc";
reg = <0xfff98000 0x4000>;
interrupts = <16 4 5>;
status = "disable";
status = "disabled";
};

ssc1: ssc@fff9c000 {
compatible = "atmel,at91rm9200-ssc";
reg = <0xfff9c000 0x4000>;
interrupts = <17 4 5>;
status = "disable";
status = "disabled";
};

macb0: ethernet@fffbc000 {
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/boot/dts/at91sam9g45.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -425,14 +425,14 @@
compatible = "atmel,at91sam9g45-ssc";
reg = <0xfff9c000 0x4000>;
interrupts = <16 4 5>;
status = "disable";
status = "disabled";
};

ssc1: ssc@fffa0000 {
compatible = "atmel,at91sam9g45-ssc";
reg = <0xfffa0000 0x4000>;
interrupts = <17 4 5>;
status = "disable";
status = "disabled";
};

adc0: adc@fffb0000 {
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/at91sam9x5.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
compatible = "atmel,at91sam9g45-ssc";
reg = <0xf0010000 0x4000>;
interrupts = <28 4 5>;
status = "disable";
status = "disabled";
};

tcb0: timer@f8008000 {
Expand Down
1 change: 0 additions & 1 deletion include/sound/soc-dai.h
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ struct snd_soc_dai {
unsigned int symmetric_rates:1;
struct snd_pcm_runtime *runtime;
unsigned int active;
unsigned char pop_wait:1;
unsigned char probed:1;

struct snd_soc_dapm_widget *playback_widget;
Expand Down
1 change: 1 addition & 0 deletions include/sound/soc.h
Original file line number Diff line number Diff line change
Expand Up @@ -1039,6 +1039,7 @@ struct snd_soc_pcm_runtime {
struct snd_soc_dpcm_runtime dpcm[2];

long pmdown_time;
unsigned char pop_wait:1;

/* runtime devices */
struct snd_pcm *pcm;
Expand Down
4 changes: 2 additions & 2 deletions sound/pci/hda/hda_intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -2876,7 +2876,7 @@ static int azx_free(struct azx *chip)
azx_notifier_unregister(chip);

chip->init_failed = 1; /* to be sure */
complete(&chip->probe_wait);
complete_all(&chip->probe_wait);

if (use_vga_switcheroo(chip)) {
if (chip->disabled && chip->bus)
Expand Down Expand Up @@ -3504,7 +3504,7 @@ static int azx_probe(struct pci_dev *pci,
pm_runtime_put_noidle(&pci->dev);

dev++;
complete(&chip->probe_wait);
complete_all(&chip->probe_wait);
return 0;

out_free:
Expand Down
46 changes: 32 additions & 14 deletions sound/pci/hda/patch_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,9 +431,11 @@ static void hdmi_init_pin(struct hda_codec *codec, hda_nid_t pin_nid)
if (get_wcaps(codec, pin_nid) & AC_WCAP_OUT_AMP)
snd_hda_codec_write(codec, pin_nid, 0,
AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE);
/* Disable pin out until stream is active*/
/* Enable pin out: some machines with GM965 gets broken output when
* the pin is disabled or changed while using with HDMI
*/
snd_hda_codec_write(codec, pin_nid, 0,
AC_VERB_SET_PIN_WIDGET_CONTROL, 0);
AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT);
}

static int hdmi_get_channel_count(struct hda_codec *codec, hda_nid_t cvt_nid)
Expand Down Expand Up @@ -1341,7 +1343,6 @@ static int generic_hdmi_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
struct hdmi_spec *spec = codec->spec;
int pin_idx = hinfo_to_pin_index(spec, hinfo);
hda_nid_t pin_nid = spec->pins[pin_idx].pin_nid;
int pinctl;
bool non_pcm;

non_pcm = check_non_pcm_per_cvt(codec, cvt_nid);
Expand All @@ -1350,11 +1351,6 @@ static int generic_hdmi_playback_pcm_prepare(struct hda_pcm_stream *hinfo,

hdmi_setup_audio_infoframe(codec, pin_idx, non_pcm, substream);

pinctl = snd_hda_codec_read(codec, pin_nid, 0,
AC_VERB_GET_PIN_WIDGET_CONTROL, 0);
snd_hda_codec_write(codec, pin_nid, 0,
AC_VERB_SET_PIN_WIDGET_CONTROL, pinctl | PIN_OUT);

return hdmi_setup_stream(codec, cvt_nid, pin_nid, stream_tag, format);
}

Expand All @@ -1374,7 +1370,6 @@ static int hdmi_pcm_close(struct hda_pcm_stream *hinfo,
int cvt_idx, pin_idx;
struct hdmi_spec_per_cvt *per_cvt;
struct hdmi_spec_per_pin *per_pin;
int pinctl;

if (hinfo->nid) {
cvt_idx = cvt_nid_to_cvt_index(spec, hinfo->nid);
Expand All @@ -1391,11 +1386,6 @@ static int hdmi_pcm_close(struct hda_pcm_stream *hinfo,
return -EINVAL;
per_pin = &spec->pins[pin_idx];

pinctl = snd_hda_codec_read(codec, per_pin->pin_nid, 0,
AC_VERB_GET_PIN_WIDGET_CONTROL, 0);
snd_hda_codec_write(codec, per_pin->pin_nid, 0,
AC_VERB_SET_PIN_WIDGET_CONTROL,
pinctl & ~PIN_OUT);
snd_hda_spdif_ctls_unassign(codec, pin_idx);
per_pin->chmap_set = false;
memset(per_pin->chmap, 0, sizeof(per_pin->chmap));
Expand Down Expand Up @@ -1691,6 +1681,30 @@ static const struct hda_codec_ops generic_hdmi_patch_ops = {
.unsol_event = hdmi_unsol_event,
};

static void intel_haswell_fixup_connect_list(struct hda_codec *codec)
{
unsigned int vendor_param;
hda_nid_t list[3] = {0x2, 0x3, 0x4};

vendor_param = snd_hda_codec_read(codec, 0x08, 0, 0xf81, 0);
if (vendor_param == -1 || vendor_param & 0x02)
return;

/* enable DP1.2 mode */
vendor_param |= 0x02;
snd_hda_codec_read(codec, 0x08, 0, 0x781, vendor_param);

vendor_param = snd_hda_codec_read(codec, 0x08, 0, 0xf81, 0);
if (vendor_param == -1 || !(vendor_param & 0x02))
return;

/* override 3 pins connection list */
snd_hda_override_conn_list(codec, 0x05, 3, list);
snd_hda_override_conn_list(codec, 0x06, 3, list);
snd_hda_override_conn_list(codec, 0x07, 3, list);
}


static int patch_generic_hdmi(struct hda_codec *codec)
{
struct hdmi_spec *spec;
Expand All @@ -1700,6 +1714,10 @@ static int patch_generic_hdmi(struct hda_codec *codec)
return -ENOMEM;

codec->spec = spec;

if (codec->vendor_id == 0x80862807)
intel_haswell_fixup_connect_list(codec);

if (hdmi_parse_codec(codec) < 0) {
codec->spec = NULL;
kfree(spec);
Expand Down
5 changes: 3 additions & 2 deletions sound/pci/hda/patch_realtek.c
Original file line number Diff line number Diff line change
Expand Up @@ -4373,6 +4373,7 @@ static int alc_alloc_spec(struct hda_codec *codec, hda_nid_t mixer_nid)
if (!spec)
return -ENOMEM;
codec->spec = spec;
codec->single_adc_amp = 1;
spec->mixer_nid = mixer_nid;
snd_hda_gen_init(&spec->gen);
snd_array_init(&spec->kctls, sizeof(struct snd_kcontrol_new), 32);
Expand Down Expand Up @@ -6569,8 +6570,8 @@ static void alc861vd_fixup_dallas(struct hda_codec *codec,
const struct alc_fixup *fix, int action)
{
if (action == ALC_FIXUP_ACT_PRE_PROBE) {
snd_hda_override_pin_caps(codec, 0x18, 0x00001714);
snd_hda_override_pin_caps(codec, 0x19, 0x0000171c);
snd_hda_override_pin_caps(codec, 0x18, 0x00000734);
snd_hda_override_pin_caps(codec, 0x19, 0x0000073c);
}
}

Expand Down
2 changes: 1 addition & 1 deletion sound/pci/hda/patch_sigmatel.c
Original file line number Diff line number Diff line change
Expand Up @@ -1725,7 +1725,7 @@ static const struct snd_pci_quirk stac92hd83xxx_cfg_tbl[] = {
SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1658,
"HP", STAC_92HD83XXX_HP_cNB11_INTQUAD),
SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1659,
"HP", STAC_92HD83XXX_HP_cNB11_INTQUAD),
"HP Pavilion dv7", STAC_HP_DV7_4000),
SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x165A,
"HP", STAC_92HD83XXX_HP_cNB11_INTQUAD),
SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x165B,
Expand Down
Loading

0 comments on commit 03c850e

Please sign in to comment.