1. 13 8月, 2013 1 次提交
  2. 29 7月, 2013 1 次提交
    • T
      ALSA: hda - Fix invalid multi-io creation on VAIO-Z laptops · da96fb5b
      Takashi Iwai 提交于
      VAIO-Z laptops need to use the specific DAC for the speaker output
      by some unknown reason although the codec itself supports the flexible
      connection.  So we implemented a workaround by a new flag,
      no_primary_hp, for assigning the speaker pin first.
      
      This worked until 3.8 kernel, but it got broken because the driver
      learned for a better multi-io pin mapping, and not it can assign two
      mic pins for multi-io.  Since the multi-io requires to be the primary
      output, the hp and two mic pins are assigned in prior to the speaker
      in the end.
      
      Although the machine has two mic pins, one of them is used as a noise-
      canceling headphone, thus it's no real retaskable mic jack.  Thus, at
      best, we can disable the multi-io assignment and make the parser
      behavior back to the state before the multi-io.
      
      This patch adds again a new flag, no_multi_io, to indicate that the
      device has no multi-io capability, and set it in the fixup for
      VAIO-Z.  The no_multi_io flag itself can be used generically, added
      via a helper line, too.
      Reported-by: NTormen <my.nl.abos@gmail.com>
      Reported-by: NAdam Williamson <awilliam@redhat.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      da96fb5b
  3. 21 7月, 2013 1 次提交
    • T
      ALSA: hda - Add snd_hda_jack_detect_state() helper function · 60ea8ca2
      Takashi Iwai 提交于
      snd_hda_jack_detect() function returns a boolean value for a jack
      plugged in or not, but it also returns always true when the
      corresponding pin is phantom (i.e. fixed).  This is OK in most cases,
      but it makes the generic parser misbehaving about the auto-mute or
      auto-mic switching, e.g. when one of headphone pins is a fixed.
      Namely, the driver decides whether to mute the speaker or not, just
      depending on the headphone plug state: if one of the headphone jacks
      is seen as active, then the speaker is muted.  Thus this will result
      always in the muted speaker output.
      
      So, the problem is the function returns a boolean, after all, although
      we need to think of "phantom" jack.  Now a new function,
      snd_hda_jack_detect_state() is introduced to return these tristates.
      The generic parser uses this function for checking the headphone or
      mic jack states.
      
      Meanwhile, the behavior of snd_hda_jack_detect() is kept as is, for
      keeping compatibility in other driver codes.
      Acked-by: NDavid Henningsson <david.henningsson@canonical.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      60ea8ca2
  4. 28 6月, 2013 2 次提交
  5. 25 6月, 2013 1 次提交
    • T
      ALSA: hda - Add auto_mute_via_amp flag to generic parser · 7eebffd3
      Takashi Iwai 提交于
      Add a new flag, auto_mute_via_amp, to determine the behavior of the
      headphone / line-out auto-mute.  When this flag is set, the generic
      driver mutes the speaker and line outputs via the amp mute of each
      pin, instead of changing the pin control values.
      
      This is introduced for devices that don't work expectedly with the pin
      control values; for example, some devices are known to keep enabling
      the speaker outputs no matter which pin control values are set on the
      speaker pins.
      
      The driver doesn't check actually whether the pins have the output amp
      caps, but assumes that the proper mixer (mute) controls are created on
      all these pins.  If not the case, you can't use this flag for your
      device.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      7eebffd3
  6. 03 6月, 2013 3 次提交
    • T
      ALSA: hda/via - Clean up duplicated codes · 963afde9
      Takashi Iwai 提交于
      The previous commit was written in the way to make the backport to
      3.9.y easier, and left the duplicated open codes intentionally.
      Now let's clean up the duplicated codes.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      963afde9
    • T
      ALSA: hda - Add keep_eapd_on flag to generic parser · 05909d5c
      Takashi Iwai 提交于
      VT1802 codec seems to reset EAPD of other pins in the hardware level,
      and this was another reason of the silent headphone output on some
      machines.  As a workaround, introduce a new flag indicating to keep
      the EPAD on to the generic parser, and set it in patch_via.c.
      Reported-by: NAlex Riesen <raa.lkml@gmail.com>
      Cc: <stable@vger.kernel.org> [v3.9]
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      05909d5c
    • T
      ALSA: hda - Allow setting automute/automic hooks after parsing · 77afe0e9
      Takashi Iwai 提交于
      Some codec drivers (VIA codecs and some Realtek fixups) set the
      automute and automic hooks after calling
      snd_hda_gen_parse_auto_config().  In the current code, the hook
      pointers are referred only in snd_hda_gen_parse_auto_config() and
      passed to snd_hda_jack_detect_enable_callback(), thus changing the
      hook values won't change the actually called callbacks properly.
      
      This patch fixes this bug by setting the static functions as the
      primary callback functions for the jack detection, and let them
      calling the appropriate hooks dynamically.
      
      Cc: <stable@vger.kernel.org> [v3.9]
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      77afe0e9
  7. 16 5月, 2013 1 次提交
  8. 16 4月, 2013 2 次提交
    • T
      ALSA: hda - Use the primary DAC for all aamix outputs · 5ead56f2
      Takashi Iwai 提交于
      When setting up the aamix output paths, use the primary DAC instead of
      the individual DAC for each output as default.  Otherwise multiple
      DACs will be turned on for a single aamix widget, which results in
      doubly or more volumes, because the duplicated signals will be sent
      through all these DACs for a single stream.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      5ead56f2
    • T
      ALSA: hda - Fix aamix activation with loopback control on VIA codecs · 65033cc8
      Takashi Iwai 提交于
      When we have a loopback mixer control, this should manage the state
      whether the output paths include the aamix or not.  But the current
      code blindly initializes the output paths with aamix = true, thus the
      aamix is enabled unless the loopback mixer control is changed.
      
      Also, update_aamix_paths() called by the loopback mixer control put
      callback invokes snd_hda_activate_path() with aamix = true even for
      disabling the mixing.  This leaves the aamix path even though the
      loopback control is turned off.
      
      This patch fixes these issues:
      - Introduced aamix_default() helper to indicate whether with_aamix is
        true or false as default
      - Fix the argument in update_aamix_paths() for disabling loopback
      Reported-by: NLydia Wang <LydiaWang@viatech.com.cn>
      Cc: <stable@vger.kernel.org> [v3.9+]
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      65033cc8
  9. 11 4月, 2013 2 次提交
  10. 05 4月, 2013 1 次提交
  11. 22 3月, 2013 3 次提交
  12. 18 3月, 2013 1 次提交
  13. 11 3月, 2013 1 次提交
  14. 08 3月, 2013 5 次提交
  15. 13 2月, 2013 1 次提交
    • T
      ALSA: hda - Increase badness for missing multi-io · 1d739066
      Takashi Iwai 提交于
      The current badness value used for the missing multi-io seems too
      weak, and the multi-io tends to be skipped for desktop configurations
      when no enough DACs are available.  It's because the total badness of
      the multi-io becomes often larger than the badness with assigning an
      individual DAC to a headphone jack.  This is good for one side, but it
      seems that the surround outputs are more demanded by that.
      
      This patch increases the badness value for the missing multi-io
      slightly so that the multi-io would be preferred than the individual
      headphone DAC if they conflict.  Through the tests with hda-emu,
      mostly only desktop configurations with ALC662/663 and CMI codecs are
      affected by this change, and all look reasonable.
      Reported-by: NRaymond Yau <superquad.vortex2@gmail.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      1d739066
  16. 07 2月, 2013 2 次提交
  17. 26 1月, 2013 1 次提交
    • T
      ALSA: Make snd_printd() and snd_printdd() inline · 86b27237
      Takashi Iwai 提交于
      Because currently snd_printd() and snd_printdd() macros are expanded
      to empty when CONFIG_SND_DEBUG=n, a compile warning like below
      appears sometimes, and we had to covert it by ugly ifdefs:
        sound/pci/hda/patch_sigmatel.c: In function ‘stac92hd71bxx_fixup_hp’:
        sound/pci/hda/patch_sigmatel.c:2434:24: warning: unused variable ‘spec’ [-Wunused-variable]
      
      For "fixing" these issues better, this patch replaces snd_printd() and
      snd_printdd() definitions with empty inline functions instead of
      macros.  This should have the same effect but shut up warnings like
      above.
      
      But since we had already put ifdefs, changing to inline functions
      would trigger compile errors.  So, such ifdefs is removed in this
      patch.
      
      In addition, snd_pci_quirk name field is defined only when
      CONFIG_SND_DEBUG_VERBOSE is set, and the reference to it in
      snd_printdd() argument triggers the build errors, too.  For avoiding
      these errors, introduce a new macro snd_pci_quirk_name() that is
      defined no matter how the debug option is set.
      Reported-by: NStratos Karafotis <stratosk@semaphore.gr>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      86b27237
  18. 25 1月, 2013 1 次提交
  19. 24 1月, 2013 3 次提交
  20. 22 1月, 2013 5 次提交
  21. 21 1月, 2013 2 次提交
    • T
      ALSA: hda - Fix conflicts between Loopback Mixing and Independent HP · a1e908ed
      Takashi Iwai 提交于
      This patch eventually fixes two issues:
      - Handle the case where the primary output is a headphone and can have
        independent HP mode;
        so far we checked only the case where the headphone is the secondary
        output.
      
      - Fix the conflict of HP independent mode and aamix mode;
        when switched to aamix mode, the DAC might be also switched to
        another widget shared with other outputs.  Then even if we disable
        the DAC for the original output, it doesn't change -- because the
        active route is from another (shared) DAC to HP pin through aamix.
        So, in such a case, we have to prohibit the switch to aamix for HP
        routes.
      
      This fixes issues appearing on VT codecs.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      a1e908ed
    • T
      ALSA: hda - Check aamix-output paths from other DACs, too · f87498b6
      Takashi Iwai 提交于
      Many codecs provide routes to multiple output pins through an aamix
      widget, but most of them do it only from a single DAC.  However, the
      current generic parser checks only the aamix paths from the original
      (directly bound) DACs through aamix NID, and miss the path:
        primary DAC -> aamix -> target out pin
      
      This patch adds a more check for the routes like the above.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      f87498b6