1. 18 10月, 2013 3 次提交
  2. 17 10月, 2013 2 次提交
  3. 10 10月, 2013 1 次提交
  4. 08 10月, 2013 1 次提交
    • A
      ALSA: hda - hdmi: Fix channel map switch not taking effect · 39edac70
      Anssi Hannula 提交于
      Currently hdmi_setup_audio_infoframe() reprograms the HDA channel
      mapping only when the infoframe is not up-to-date or the non-PCM flag
      has changed.
      
      However, when just the channel map has been changed, the infoframe may
      still be up-to-date and non-PCM flag may not have changed, so the new
      channel map is not actually programmed into the HDA codec.
      
      Notably, this failing case is also always triggered when the device is
      already in a prepared state and a new channel map is configured while
      changing only the channel positions (for example, plain
      "speaker-test -c2 -m FR,FL").
      
      Fix that by always programming the channel map in
      hdmi_setup_audio_infoframe(). Tested on Intel HDMI.
      Signed-off-by: NAnssi Hannula <anssi.hannula@iki.fi>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      39edac70
  5. 07 10月, 2013 8 次提交
    • A
      ALSA: hda - hdmi: Tweak debug messages to be more useful · 980b2495
      Anssi Hannula 提交于
      Allow channel map debugging for both automatic and manual channel maps,
      and print CA always when updating infoframe.
      Signed-off-by: NAnssi Hannula <anssi.hannula@iki.fi>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      980b2495
    • A
      ALSA: hda - hdmi: Fix available channel maps missing from TLV · bb731f21
      Anssi Hannula 提交于
      Currently the available channel maps TLV only contains channel maps that
      are limited to the traditional 7.1 speakers.
      
      Since the other HDMI channel mapping functions have been fixed to
      properly handle all CEA-861-E specified speakers, allow them to be
      listed.
      Signed-off-by: NAnssi Hannula <anssi.hannula@iki.fi>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      bb731f21
    • A
      ALSA: hda - hdmi: Fix channel maps with less common speakers · a5b7d510
      Anssi Hannula 提交于
      For some speakers and slots the CEA slot <-> speaker assignment depends
      on the used CEA Channel Allocation value.
      
      Therefore the from_cea_slot() and to_cea_slot() helpers currently only
      work correctly for the regular 7.1 speakers.
      
      Fix them to work with all speakers, taking the re-ordered CA index as
      input and adapting use sites accordingly.
      
      This change allows manual channel mapping to actually work for all CEA
      allocated speakers. Additionally, this fixes incorrect channel map
      reporting in automatic channel mapping mode when an affected speaker
      position is used (e.g. 6.1 map which contains an RC speaker).
      Signed-off-by: NAnssi Hannula <anssi.hannula@iki.fi>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      a5b7d510
    • A
      ALSA: hda - hdmi: Fix unused slots being enabled in manual and non-PCM mappings · 11f7c52d
      Anssi Hannula 提交于
      hdmi_manual_setup_channel_mapping() and hdmi_std_setup_channel_mapping
      try to assign ALSA channels to HDMI channel slots and disable (i.e.
      silence) other slots.
      
      However, they try to disable a slot by using AC_VERB_SET_CHAN_SLOT with
      parameter ((alsa_ch << 8) | 0xf), while the correct parameter is
      ((0xf << 8) | hdmi_slot), i.e. the slot should be unassigned, not the
      ALSA channel.
      
      Fix that by actually disabling the unused slots.
      
      Note that this bug did not cause any (reported) issues because slots
      incorrectly having audio are normally ignored by a receiver if the CEA
      channel allocation used does not map that slot to any speaker.
      Additionally, the converter channel count configuration limits the
      number of actually active channels in any case.
      Signed-off-by: NAnssi Hannula <anssi.hannula@iki.fi>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      11f7c52d
    • A
      ALSA: hda - hdmi: Fix programmed active channel count · 1df5a06a
      Anssi Hannula 提交于
      Currently the converter channel count is set to the number of actual
      input channels. The audio infoframe channel count field is set
      similarly.
      
      However, sometimes the used channel map does not map all input channels
      to outputs. Notably, 3 channel modes (e.g. 2.1) require a dummy input
      channel so there are 4 input channels. According to the HDA
      specification, converter channel count should be programmed according to
      the number of _active_ channels.
      
      On Intel HDMI codecs (but not on NVIDIA), setting the converter channel
      to a higher value than there are actually mapped channels to HDMI slots
      will cause no audio to be output at all.
      
      Note that the effects of this issue are currently partially masked by
      other bugs that prevent the driver from actually unmapping channels in
      certain cases. For example, if a 4 channel stream is first created and
      prepared, it gets a FL,FR,RL,RR mapping (ALSA->HDMI slot mapping 0->0,
      1->1, 2->4, 3->5). If one thereafter assigns a FR,FL,FC mapping to it,
      the driver will remap 2->3 but fail to unmap 2->4 and 3->5, so there are
      still 4 active channels and the issue will not trigger in this case.
      These bugs will be fixed separately.
      
      Fix the channel counts in the converter channel count field and in the
      audio infoframe channel count field to match the actual number of active
      channels.
      Signed-off-by: NAnssi Hannula <anssi.hannula@iki.fi>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      1df5a06a
    • A
      ALSA: hda - hdmi: Fix incorrect default channel mapping for unusual CAs · 90f28002
      Anssi Hannula 提交于
      hdmi_std_setup_channel_mapping() selects a Channel Allocation according
      to the sink reported speaker mask, preferring the ALSA standard layouts.
      
      If the channel allocation is not one of the ALSA standard layouts, the
      ALSA channels are mapped directly to HDMI channels in order. However,
      the function does not take into account that there a holes in the HDMI
      channel map.
      
      Additionally, the function tries to disable a slot by using
      AC_VERB_SET_CHAN_SLOT with parameter ((alsa_ch << 8) | 0xf), while the
      correct parameter is ((0xf << 8) | hdmi_slot), i.e. the slot should be
      unassigned, not the ALSA channel.
      
      Fix both of the issues for non-ALSA-default layouts.
      
      Tested on Intel HDMI with a speaker mask of FL | FR | FC | RC, which
      causes CA 0x06 to be selected for 4-channel audio, which causes
      incorrect output (sound destined to RC goes to FC and FC goes nowhere)
      without the patch.
      Signed-off-by: NAnssi Hannula <anssi.hannula@iki.fi>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      90f28002
    • A
      ALSA: hda - hdmi: Fix reported channel map on common default layouts · 56cac413
      Anssi Hannula 提交于
      hdmi_setup_fake_chmap() is supposed to set the reported channel map when
      the channel map is not specified by the user.
      
      However, the function indexes channel_allocations[] with a wrong value
      and extracts the wrong nibble from hdmi_channel_mapping[], causing wrong
      channel maps to be shown.
      
      Fix those issues.
      
      Tested on Intel HDMI to correctly generate various channel maps, for
      example 3,4,14,15,7,8,5,6 (instead of incorrect 3,4,8,7,5,6,14,0) for
      standard 7.1 channel audio. (Note that the side and rear channels are
      reported as RL/RR and RLC/RRC, respectively, as per the CEA-861
      standard, instead of the more traditional SL/SR and RL/RR.)
      
      Note that this only fixes the layouts that only contain traditional 7.1
      speakers (2.0, 2.1, 4.0, 5.1, 7.1, etc.). E.g. the rear center of 6.1
      is still being shown wrongly due to an issue with from_cea_slot()
      which will be fixed in a later patch.
      Signed-off-by: NAnssi Hannula <anssi.hannula@iki.fi>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      56cac413
    • D
      ALSA: hda - Fix mono speakers and headset mic on Dell Vostro 5470 · 338cae56
      David Henningsson 提交于
      On this machine, DAC on node 0x03 seems to give mono output.
      
      Also, it needs additional patches for headset mic support.
      It supports CTIA style headsets only.
      
      Alsa-info available at the bug link below.
      
      Cc: stable@kernel.org (v3.10+)
      BugLink: https://bugs.launchpad.net/bugs/1236228Signed-off-by: NDavid Henningsson <david.henningsson@canonical.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      338cae56
  6. 30 9月, 2013 1 次提交
  7. 27 9月, 2013 3 次提交
  8. 26 9月, 2013 1 次提交
  9. 13 9月, 2013 1 次提交
  10. 09 9月, 2013 2 次提交
  11. 07 9月, 2013 2 次提交
  12. 06 9月, 2013 1 次提交
    • T
      ALSA: hda - Add dock speaker support for ASUS TX300 · 7bba2157
      Takashi Iwai 提交于
      ASUS TX300 has a built-in speaker in the tablet part and in the dock
      part, and the tablet speaker is supposed to be unused while the
      machine is docked.  The current HD-audio driver, however, doesn't
      support the dock speaker, partly because BIOS doesn't set up the pin
      for the corresponding output.
      
      But, not only the missing pin config, also the missing unsol event
      handling is another issue.  Otherwise the automatic switching via
      dock/undock won't work.
      
      Through debugging sessions, we found out that the dock speaker pin is
      NID 0x1b, and it generates an unsol event at docking/undocking, the
      docking state can be inquired via the normal pin detection verb.
      Also, it's turned out that GPIO 2 is needed as an amp.  So, all
      materials are ready to cook.
      
      This patch provides the basic dock speaker support with TX300:
      - The dock speaker is turned on/off via "Dock Speaker" mixer mute.
      - The dock speaker is automatically muted when docked.  This is
        independently from the mixer mute switch, just like the headphone
        auto-mute function.
      
      The implementation is a bit tricky.  Since we want to handle it as a
      secondary speaker, we set it up a pin as a speaker with a jack
      detection.  Then, the fixup function registers the own unsol callback
      for this pin because the standard automute can't handle the thing like
      a "speaker jack".  In the own automute hook, we apply the mute of the
      tablet speaker in addition by checking the dock state.
      
      Also, the speaker control names are slightly shuffled because the
      generic parser doesn't give good names but blindly assumes a bass
      speaker as a secondary speaker.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=59791Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      7bba2157
  13. 03 9月, 2013 1 次提交
    • T
      ALSA: hda - Re-setup HDMI pin and audio infoframe on stream switches · b054087d
      Takashi Iwai 提交于
      When the transcoder:port mapping on Haswell HDMI/DP audio is changed
      during the stream playback, the sound gets lost.  Typically this
      problem is seen when the user switches the graphics mode from eDP+DP
      to DP-only configuration, where CRTC 1 is used for DP in the former
      while CRTC 0 is used for the latter.
      
      The graphics controller notifies the change via the normal ELD update
      procedure, so we get the intrinsic event.  For enabling the sound
      again, the HDMI audio driver needs to reset the pin and set up the
      audio infoframe again.
      
      This patch achieves it by:
      - keep the current status of channels and info frame setup in per_pin
        struct,
      - check the reconnection in the intrinsic event handler,
      - reset the pin and the re-invoke hdmi_setup_audio_infoframe()
        accordingly.
      
      The hdmi_setup_audio_infoframe() function has been changed, too, so
      that it can be invoked without passing the substream instance.
      
      The patch is mostly based on the work by Mengdong Lin.
      
      Cc: Mengdong Lin <mengdong.lin@intel.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      b054087d
  14. 02 9月, 2013 1 次提交
    • A
      ALSA: hda - hdmi: Fallback to ALSA allocation when selecting CA · 18e39186
      Anssi Hannula 提交于
      hdmi_channel_allocation() tries to find a HDMI channel allocation that
      matches the number channels in the playback stream and contains only
      speakers that the HDMI sink has reported as available via EDID. If no
      such allocation is found, 0 (stereo audio) is used.
      
      Using CA 0 causes the audio causes the sink to discard everything except
      the first two channels (front left and front right).
      
      However, the sink may be capable of receiving more channels than it has
      speakers (and then perform downmix or discard the extra channels), in
      which case it is preferable to use a CA that contains extra channels
      than to use CA 0 which discards all the non-stereo channels.
      
      Additionally, it seems that HBR (HD) passthrough output does not work on
      Intel HDMI codecs when CA is set to 0 (possibly the codec zeroes
      channels not present in CA). This happens with all receivers that report
      a 5.1 speaker mask since a HBR stream is carried on 8 channels to the
      codec.
      
      Add a fallback in the CA selection so that the CA channel count at least
      matches the stream channel count, even if the stream contains channels
      not present in the sink speaker descriptor.
      
      Thanks to GrimGriefer at OpenELEC forums for discovering that changing
      the sink speaker mask allowed HBR output.
      
      Reported-by: GrimGriefer
      Reported-by: Ashecrow
      Reported-by: NFrank Zafka <kafkaesque1978@gmail.com>
      Reported-by: NPeter Frühberger <fritsch@xbmc.org>
      Signed-off-by: NAnssi Hannula <anssi.hannula@iki.fi>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      18e39186
  15. 29 8月, 2013 1 次提交
    • D
      snd/hda: add runtime suspend/resume on optimus support (v4) · 246efa4a
      Dave Airlie 提交于
      Add support for HDMI audio device on VGA cards that powerdown
      to D3cold using non-standard ACPI/PCI infrastructure (optimus).
      
      This does a couple of things to make it work:
      
      a) add a set of power ops for the hdmi domain, and enables them
      via vga_switcheroo when we are a switcheroo controlled card. This
      just replaces the runtime resume operation so that when the card
      is in D3cold the userspace pci config space access via sysfs,
      the vga switcheroon runtime resume gets called first and it calls
      the GPU resume callback before calling the sound card runtime
      resume.
      
      b) standard ACPI/PCI stacks won't put a device into D3cold without
      an ACPI handle, but since the hdmi audio devices on gpus don't have
      an ACPI handle, we need to manually force the device into D3cold
      after suspend from the switcheroo path only.
      
      c) don't try and do runtime s/r when the GPU is off.
      
      d) call runtime suspend/resume during switcheroo suspend/resume
      this is to make sure the runtime stack knows to try and resume
      the hdmi audio device for pci config space access.
      
      v2: fix incorrect runtime call suspend->resume.
      
      v3: rework irq handler to avoid false irq when we are resuming
      but haven't runtime resumed yet, don't bother trying D3cold,
      it won't work, just set it manually ourselves, move runtime s/r
      calls outside the main s/r hook. enable dnyamic pm properly by
      dropping reference.
      
      v4: put back irq handler check just wrap it with cap check
      Acked-by: NTakashi Iwai <tiwai@suse.de>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      246efa4a
  16. 27 8月, 2013 5 次提交
  17. 23 8月, 2013 1 次提交
  18. 22 8月, 2013 2 次提交
  19. 20 8月, 2013 1 次提交
  20. 19 8月, 2013 2 次提交