1. 30 Aug, 2012 4 commits
    • Takashi Iwai's avatar
      ALSA: hda - Optimize bitfield usage in struct hda_codec · 4b927345
      Takashi Iwai authored
      Move up a few bitfields to be packed into a single int.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      4b927345
    • Takashi Iwai's avatar
      ALSA: hda - Clean up CONFIG_SND_HDA_POWER_SAVE · 83012a7c
      Takashi Iwai authored
      CONFIG_SND_HDA_POWER_SAVE is no longer an experimental feature and its
      behavior can be well controlled via the default value and module
      parameter.  Let's just replace it with the standard CONFIG_PM.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      83012a7c
    • Takashi Iwai's avatar
      ALSA: hda - Fix D3 clock stop check for codecs with own set_power_state op · 432c641e
      Takashi Iwai authored
      When a codec provides its own set_power_state op, the D3-clock-stop
      isn't checked correctly.  And the recent changes for repeating the
      state-setting operation isn't applied to such a codec, too.
      
      This patch fixes these issues by moving the call of codec's own op to
      the place where the generic power-set operation is done, and move the
      power-state synchronization code out of
      snd_hda_set_power_state_to_all() so that it can be called always at
      the end of power-up/down sequence, and updates the D3 clock-stop flag
      properly.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      432c641e
    • Takashi Iwai's avatar
      ALSA: hda - Fix runtime PM leftover refcounts · 68467f51
      Takashi Iwai authored
      When the HD-audio is removed, it leaves the refcounts when codecs are
      powered up (usually yes) in the destructor.  For fixing the unbalance,
      and cleaning up the code mess, this patch changes the following:
      - change pm_notify callback to take the explicit power on/off state,
      - check of D3 stop-clock and keep_link_on flags is moved to the caller
        side,
      - call pm_notify callback in snd_hda_codec_new() and snd_hda_codec_free()
        so that the refcounts are proprely updated.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      68467f51
  2. 28 Aug, 2012 6 commits
  3. 27 Aug, 2012 1 commit
  4. 24 Aug, 2012 2 commits
  5. 23 Aug, 2012 1 commit
    • Mengdong Lin's avatar
      ALSA: hda - add runtime PM support · b8dfc462
      Mengdong Lin authored
      Runtime PM can bring more power saving:
      - When the controller is suspended, its parent device will also have a chance
        to suspend.
      - PCI subsystem can choose the lowest power state the controller can signal
        wake up from. This state can be D3cold on platforms with ACPI PM support.
      And runtime PM can provide a gerneral sysfs interface for a system policy
      manager.
      
      Runtime PM support is based on current HDA power saving implementation. The user
      can enable runtime PM on platfroms that provide acceptable latency on transition
      from D3 to D0.
      
      Details:
      - When both power saving and runtime PM are enabled:
        -- If a codec supports 'stop-clock' in D3, it will request suspending the
           controller after it enters D3 and request resuming the controller before
           back to D0. Thus the controller will be suspended only when all codecs are
           suspended and support stop-clock in D3.
        -- User IO operations and HW wakeup signal can resume the controller back to
           D0.
      - If runtime PM is disabled, power saving just works as before.
      - If power saving is disabled, the controller won't be suspended because the
        power usage counter can never be 0.
      
      More about 'stop-clock' feature:
      If a codec can support targeted pass-through operations in D3 state when there
      is no BCLK present on the link, it will set CLKSTOP flag in the supported power
      states and report PS-ClkStopOk when entering D3 state. Please refer to HDA spec
      section 7.3.3.10 Power state and 7.3.4.12 Supported Power State.
      
      [Fixed CONFIG_PM_RUNTIME dependency in hda_intel.c by tiwai]
      Signed-off-by: default avatarMengdong Lin <mengdong.lin@intel.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      b8dfc462
  6. 22 Aug, 2012 2 commits
  7. 21 Aug, 2012 2 commits
    • Ondrej Zary's avatar
      ALSA: introduce snd-cmi8328: C-Media CMI8328 driver · f9933487
      Ondrej Zary authored
      Introduce snd-cmi8328 driver for C-Media CMI8328-based sound cards, such as
      AudioExcel AV500.
      
      It supports PCM playback and capture (full-duplex) through wss_lib, gameport,
      OPL3 and MPU401. The AV500 card has onboard Dream wavetable synth connected
      to the MPU401 port and Aux 1 input internally which works too.
      The CDROM interface is not supported (as the drivers for these CDROMs were
      removed from the kernel some time ago).
      
      A separate driver is needed because CMI8328 is completely different chip to
      CMI8329/CMI8330. It's configured by magic registers (there's no PnP). Sound is
      provided by a real WSS codec (CS4231A) and the SB part is just a SB Pro
      emulation (for DOS games, useless for Linux).
      
      When SB is enabled, the CMI8328 chip disables access to the WSS codec,
      emulates SoundBlaster on one side and outputs sound data to the codec - so SB
      and WSS can't work together with this card. The WSS codec can do full duplex
      by itself so there's no need for crazy things like snd-cmi8330 does
      (combining SB and WSS parts into one driver).
      Signed-off-by: default avatarOndrej Zary <linux@rainbow-software.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      f9933487
    • Ondrej Zary's avatar
      ALSA: snd-als100: fix suspend/resume · 53e1719f
      Ondrej Zary authored
      snd_card_als100_probe() does not set pcm field in struct snd_sb.
      As a result, PCM is not suspended and applications don't know that they need
      to resume the playback.
      
      Tested with Labway A381-F20 card (ALS120).
      Signed-off-by: default avatarOndrej Zary <linux@rainbow-software.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      53e1719f
  8. 20 Aug, 2012 20 commits
  9. 17 Aug, 2012 2 commits