1. 04 12月, 2013 1 次提交
  2. 12 11月, 2013 2 次提交
  3. 07 11月, 2013 3 次提交
  4. 04 11月, 2013 2 次提交
    • M
      ALSA: hda - rename function not_share_unassigned_cvt() · 300016b9
      Mengdong Lin 提交于
      The function name not_share_unassigned_cvt() is opposite to what it does.
      This patch renames it to intel_not_share_assigned_cvt(), and addes comments
      to explain why some Intel display codecs need this workaround.
      Signed-off-by: NMengdong Lin <mengdong.lin@intel.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      300016b9
    • A
      ALSA: hda - hdmi: Disallow unsupported 2ch remapping on NVIDIA codecs · 611885bc
      Anssi Hannula 提交于
      NVIDIA HDMI codecs do not seem to follow the Audio Sample Packet (ASP)
      channel mapping (as set by verb F32h per HDA specification 7.3.3.41)
      when playing back 2-channel audio (CEA CA 0x00).
      
      Basically this means that specifying swapped channels for stereo audio
      (FR,FL) does not take effect, and e.g. this command plays back on the
      wrong channel:
      speaker-test -c2 -Dhdmi:CARD=NVidia,DEV=0 -m FR,FL -s1
      
      Multichannel audio is not affected.
      
      This issue has been confirmed to exist on codec 0x10de0015 by me and on
      0x10de0040 by Juho Teperi.
      
      Disable 2ch FL/FR channel swapping on all NVIDIA HDMI codecs that use
      the standard HDA channel mapping system. Since this is a very minor
      functionality loss, we err on the side of disabling it for newer codecs
      as well until any future testing confirms that this issue has been
      fixed.
      Signed-off-by: NAnssi Hannula <anssi.hannula@iki.fi>
      Helped-by: NJuho Teperi <juho.teperi@iki.fi>
      Cc: Aaron Plattner <aplattner@nvidia.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      611885bc
  5. 01 11月, 2013 1 次提交
  6. 25 10月, 2013 6 次提交
    • A
      ALSA: hda - hdmi: Re-setup pin and infoframe on plug-in on all codecs · 7342017f
      Anssi Hannula 提交于
      hdmi_setup_audio_infoframe() does not set up pin and infoframe if there
      is no connected sink. If a sink is connected while audio playback is
      already in progress, the pin and infoframe will not be properly set up,
      causing no audio or wrongly mapped audio.
      
      On Intel Haswell codecs the hdmi_setup_audio_infoframe() is already
      called again from hdmi_present_sense() when an ELD appears because
      transcoder:port mapping may have changed.
      
      Make the call non-Haswell-specific so that audio will be properly set up
      if the playback was started before a sink was connected.
      
      Tested on non-Haswell Intel HDMI codec by plugging sink in during
      playback.
      Signed-off-by: NAnssi Hannula <anssi.hannula@iki.fi>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      7342017f
    • A
      ALSA: hda - hdmi: Disable ramp-up/down for non-PCM on AMD codecs · 84d69e79
      Anssi Hannula 提交于
      Recent AMD HDMI codecs (revision ID 3 and later, 0x100300 as reported by
      procfs codec#0) have a configurable ramp-up/down functionality.
      
      The documentation ( http://www.x.org/docs/AMD/AMD_HDA_verbs_v2.pdf )
      specifies that 180 ("180/256 =~ 0.7") is recommended for PCM and 0 for
      non-PCM.
      
      Apply the recommended values according to provided S/PDIF AES0 settings
      since ramp-up/down does not make sense for non-PCM.
      
      v2: adapted to hdmi_ops infrastructure
      
      * More note from Anssi:
      actually, re-reading mails reveals that Olivier didn't find the
      expected difference with this setting, except for "maybe slightly
      slower startup with AES0=6" (i.e. value 0, which is unexpected).
      
      So maybe
      a) it makes too unnoticiable a difference, or
      b) only affects certain hardware (card and/or sink), or
      c) ramp-up/down is only triggered with the MUTE bit of
         ATI_VERB_SET_MULTICHANNEL_xx which is also rev3+ specific,
         but is not presently used by the driver,
      or something else.
      
      So there's a significant chance setting ramp rate is useless for us ATM,
      but probably does not do actual harm either.
      Signed-off-by: NAnssi Hannula <anssi.hannula@iki.fi>
      Tested-by: Olivier Langlois <olivier@trillion01.com> # v1
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      84d69e79
    • A
      ALSA: hda - hdmi: Add HBR bitstreaming support for ATI/AMD HDMI codecs · 461cf6b3
      Anssi Hannula 提交于
      ATI/AMD HDMI codecs do not include standard HDA HDMI HBR support (which
      is required for bitstreaming DTS-HD and Dolby TrueHD), instead they have
      custom verbs for checking and enabling it.
      
      Add support for the ATI/AMD HDMI HBR verbs.
      
      The specification is available at:
      http://www.x.org/docs/AMD/AMD_HDA_verbs_v2.pdf
      
      v2: adapted to hdmi_ops infrastructure
      Signed-off-by: NAnssi Hannula <anssi.hannula@iki.fi>
      Tested-by: Peter Frühberger <fritsch@xbmc.org> # v1
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      461cf6b3
    • A
      ALSA: hda - hdmi: Add ELD emulation for ATI/AMD codecs · 89250f84
      Anssi Hannula 提交于
      ATI/AMD HDMI/DP codecs do not include standard HDA ELD (EDID-like data)
      support.
      
      In place of providing access to an ELD buffer, various vendor-specific
      verbs are provided to provide the relevant information. Revision ID 3
      and later (0x100300 as reported by procfs codec#X) have support for
      providing more information than the previous revisions (but only if
      supported by the display driver).
      
      Generate ELD from the information provided by the vendor-specific verbs
      on ATI/AMD codecs.
      
      The specification is available at:
      http://www.x.org/docs/AMD/AMD_HDA_verbs_v2.pdf
      
      v2: moved code to hda_eld.c and cleaned it up
      v3: adapted to hdmi_ops infrastructure
      Signed-off-by: NAnssi Hannula <anssi.hannula@iki.fi>
      Tested-by: Peter Frühberger <fritsch@xbmc.org> # v2
      Tested-by: Olivier Langlois <olivier@trillion01.com> # v2
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      89250f84
    • A
      ALSA: hda - hdmi: Add ATI/AMD multi-channel audio support · 5a613584
      Anssi Hannula 提交于
      ATI/AMD codecs do not support all the standard HDA HDMI/DP functions,
      instead various vendor-specific verbs are provided.
      
      This commit addresses these missing functions:
      - standard channel mapping support
      - standard infoframe configuration support
      
      ATI/AMD provides their own verbs that allow the following:
      - setting CA for infoframe
      - setting down-mix information for infoframe
      - channel pair remapping
      - individual channel remapping (revision ID 3+, 0x100300+)
      
      The documentation for the verbs has now been released by AMD:
      http://www.x.org/docs/AMD/AMD_HDA_verbs_v2.pdf
      
      Add support for the ATI/AMD specific verbs and use them instead of the
      generic methods on ATI/AMD codecs. This allows multi-channel PCM audio
      to work.
      
      Channel remapping is restricted to pairwise mapping on codecs with
      revision ID 2 (0x100200 as reported by procfs codec#X) or lower. This
      means cards up to Radeon HD7670 as far as I know. This will not affect
      standard multi-channel modes since these codecs support automatic
      FC-LFE swapping for HDMI.
      
      ATI/AMD codecs do not advertise all of their supported rates, formats
      and channel counts, therefore that information is forced accordingly so
      that all HDMI 1.x PCM parameters are marked as supported.
      
      Support for multiple ports is also added to patch_atihdmi so that
      0x1002aa01 codecs with multiple ports will work properly when switched
      back to that patch.
      
      v2: splitted ELD emulation to a separate patch, tlv fixes
      v3: adapted to the new hdmi_ops infrastructure, fixed rev3+ vendor id
      Signed-off-by: NAnssi Hannula <anssi.hannula@iki.fi>
      Tested-by: Peter Frühberger <fritsch@xbmc.org> # v2
      Tested-by: Olivier Langlois <olivier@trillion01.com> # v2+rev3fix
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      5a613584
    • A
      ALSA: hda - hdmi: Allow HDA patches to customize more operations · 307229d2
      Anssi Hannula 提交于
      Upcoming AMD multichannel support requires many customized operations
      (channel mapping, ELD, HBR) but can otherwise share most of its code
      with the generic patch.
      
      Add a local struct hdmi_ops containing customizable HDMI-specific
      callbacks and move the current code to those callbacks. Functionality is
      unaltered.
      Signed-off-by: NAnssi Hannula <anssi.hannula@iki.fi>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      307229d2
  7. 21 10月, 2013 2 次提交
  8. 18 10月, 2013 2 次提交
  9. 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
  10. 07 10月, 2013 7 次提交
    • 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
  11. 26 9月, 2013 1 次提交
  12. 07 9月, 2013 2 次提交
  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. 27 8月, 2013 2 次提交
  16. 23 8月, 2013 1 次提交
  17. 16 7月, 2013 1 次提交
  18. 25 6月, 2013 1 次提交
  19. 24 6月, 2013 1 次提交
  20. 18 6月, 2013 2 次提交