1. 20 May, 2014 3 commits
  2. 19 May, 2014 2 commits
  3. 14 May, 2014 1 commit
  4. 13 May, 2014 1 commit
  5. 07 May, 2014 1 commit
  6. 05 May, 2014 3 commits
    • Anssi Hannula's avatar
      ALSA: hda - hdmi: Set infoframe and channel mapping even without sink · 561a7d6e
      Anssi Hannula authored
      Currently infoframe contents and channel mapping are only set when a
      sink (monitor) is present.
      
      However, this does not make much sense, since
      1) We can make a very reasonable guess on CA after 18e39186 ("ALSA:
         hda - hdmi: Fallback to ALSA allocation when selecting CA") or by
         relying on a previously valid ELD (or we may be using a
         user-specified channel map).
      2) Not setting infoframe contents and channel count simply means they
         are left at a possibly incorrect state - playback is still allowed
         to proceed (with missing or wrongly mapped channels).
      
      Reasons for monitor_present being 0 include disconnected cable, video
      driver issues, or codec not being spec-compliant. Note that in
      actual disconnected-cable case it should not matter if these settings
      are wrong as they will be re-set after jack detection, though.
      
      Change the behavior to allow the infoframe contents and the channel
      mapping to be set even without a sink/monitor, either based on the
      previous valid ELD contents, if any, or based on sensible defaults
      (standard channel layouts or provided custom map, sink type HDMI).
      Signed-off-by: default avatarAnssi Hannula <anssi.hannula@iki.fi>
      Tested-by: default avatarStephan Raue <stephan@openelec.tv>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      561a7d6e
    • Takashi Iwai's avatar
      Merge branch 'for-linus' into for-next · 59991da4
      Takashi Iwai authored
      ... for applying the further HDMI fixes.
      59991da4
    • Anssi Hannula's avatar
      ALSA: hda - hdmi: Set converter channel count even without sink · f06ab794
      Anssi Hannula authored
      Since commit 1df5a06a ("ALSA: hda - hdmi: Fix programmed active channel
      count") channel count is no longer being set if monitor_present is 0.
      This is because setting the count was moved after the CA value is
      determined, which is only after the monitor_present check in
      hdmi_setup_audio_infoframe().
      
      Unfortunately, in some cases, such as with a non-spec-compliant codec or
      with a problematic video driver, monitor_present is always 0. As a
      specific example, this seems to happen with gen1 ATV (SiI1390 codec),
      causing left-channel-only stereo playback (multi-channel playback has
      apparently never worked with this codec despite it reporting 8 channels,
      reason unknown).
      
      Simply setting converter channel count without setting the pin infoframe
      and channel mapping as well does not theoretically make much sense as
      this will just mean they are out-of-sync and multichannel playback will
      have a wrong channel mapping.
      
      However, adding back just setting the converter channel count even in
      no-monitor case is the safest change which at least fixes the stereo
      playback regression on SiI1390 codec. Do that.
      Signed-off-by: default avatarAnssi Hannula <anssi.hannula@iki.fi>
      Reported-by: default avatarStephan Raue <stephan@openelec.tv>
      Tested-by: default avatarStephan Raue <stephan@openelec.tv>
      Cc: <stable@vger.kernel.org> # 3.12+
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      f06ab794
  7. 02 May, 2014 4 commits
  8. 30 Apr, 2014 1 commit
  9. 29 Apr, 2014 3 commits
  10. 28 Apr, 2014 6 commits
  11. 22 Apr, 2014 5 commits
  12. 21 Apr, 2014 1 commit
    • Jarkko Nikula's avatar
      ASoC: dapm: Fix widget double free with auto-disable DAPM kcontrol · 2697e4fb
      Jarkko Nikula authored
      Commit 9e1fda4ae158 ("ASoC: dapm: Implement mixer input auto-disable")
      is trying to free the widget it allocated by snd_soc_dapm_new_control()
      call in dapm_kcontrol_data_alloc() by adding kfree(data->widget) to
      dapm_kcontrol_free().
      
      This is causing a widget double free with auto-disabled DAPM kcontrols
      in sound card unregistration because widgets are already freed before
      dapm_kcontrol_free() is called.
      
      Reason for that is all widgets are added into dapm->card->widgets list
      in snd_soc_dapm_new_control() and freed in dapm_free_widgets() during
      execution of snd_soc_dapm_free().
      
      Now snd_soc_dapm_free() calls for different DAPM contexts happens before
      snd_card_free() call from where the call chain to dapm_kcontrol_free()
      begins:
      
      soc_cleanup_card_resources()
        soc_remove_dai_links()
          soc_remove_link_dais()
            snd_soc_dapm_free(&cpu_dai->dapm)
          soc_remove_link_components()
            soc_remove_platform()
              snd_soc_dapm_free(&platform->dapm)
            soc_remove_codec()
              snd_soc_dapm_free(&codec->dapm)
        snd_soc_dapm_free(&card->dapm)
        snd_card_free()
          snd_card_do_free()
            snd_device_free_all()
              snd_device_free()
                snd_ctl_dev_free()
                  snd_ctl_remove()
                    snd_ctl_free_one()
                      dapm_kcontrol_free()
      
      This wasn't making harm with ordinary DAPM kcontrols since data->widget is NULL for
      them.
      
      Fixes: 9e1fda4ae158 (ASoC: dapm: Implement mixer input auto-disable)
      Signed-off-by: default avatarJarkko Nikula <jarkko.nikula@linux.intel.com>
      Acked-by: default avatarLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: default avatarMark Brown <broonie@linaro.org>
      Cc: stable@vger.kernel.org
      2697e4fb
  13. 20 Apr, 2014 5 commits
  14. 19 Apr, 2014 4 commits
    • Adrien BAK's avatar
      perf tools: Improve error reporting · ffa91880
      Adrien BAK authored
      In the current version, when using perf record, if something goes
      wrong in tools/perf/builtin-record.c:375
        session = perf_session__new(file, false, NULL);
      
      The error message:
      "Not enough memory for reading per file header"
      
      is issued. This error message seems to be outdated and is not very
      helpful. This patch proposes to replace this error message by
      "Perf session creation failed"
      
      I believe this issue has been brought to lkml:
      https://lkml.org/lkml/2014/2/24/458
      although this patch only tackles a (small) part of the issue.
      
      Additionnaly, this patch improves error reporting in
      tools/perf/util/data.c open_file_write.
      
      Currently, if the call to open fails, the user is unaware of it.
      This patch logs the error, before returning the error code to
      the caller.
      Reported-by: default avatarWill Deacon <will.deacon@arm.com>
      Signed-off-by: default avatarAdrien BAK <adrien.bak@metascale.org>
      Link: http://lkml.kernel.org/r/1397786443.3093.4.camel@beast
      [ Reorganize the changelog into paragraphs ]
      [ Added empty line after fd declaration in open_file_write ]
      Signed-off-by: default avatarJiri Olsa <jolsa@redhat.com>
      ffa91880
    • Vladimir Nikulichev's avatar
      perf tools: Adjust symbols in VDSO · 922d0e4d
      Vladimir Nikulichev authored
      pert-report doesn't resolve function names in VDSO:
      
      $ perf report --stdio -g flat,0.0,15,callee --sort pid
      ...
                  8.76%
                     0x7fff6b1fe861
                     __gettimeofday
                     ACE_OS::gettimeofday()
      ...
      
      In this case symbol values should be adjusted the same way as for executables,
      relocatable objects and prelinked libraries.
      
      After fix:
      
      $ perf report --stdio -g flat,0.0,15,callee --sort pid
      ...
                  8.76%
                     __vdso_gettimeofday
                     __gettimeofday
                     ACE_OS::gettimeofday()
      Signed-off-by: default avatarVladimir Nikulichev <nvs@tbricks.com>
      Tested-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Reviewed-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Link: http://lkml.kernel.org/r/969812.163009436-sendEmail@nvsSigned-off-by: default avatarJiri Olsa <jolsa@redhat.com>
      922d0e4d
    • Alexander Yarygin's avatar
      perf kvm: Fix 'Min time' counting in report command · acb61fc8
      Alexander Yarygin authored
      Every event in the perf-kvm has a 'stats' structure, which contains
      max/min/average/etc times of handling this event.
      The problem is that the 'perf-kvm stat report' command always shows
      that 'min time' is 0us for every event. Example:
      
       # perf kvm stat report
      
       Analyze events for all VCPUs:
      
          VM-EXIT    Samples  Samples%     Time%   Min Time   Max Time Avg time
        [..]
        0xB2 MSCH         12     0.07%     0.00%        0us        8us 7.31us ( +-   2.11% )
        0xB2 CHSC         12     0.07%     0.00%        0us       18us 9.39us ( +-   9.49% )
        0xB2 STPX          8     0.05%     0.00%        0us        2us 1.88us ( +-   7.18% )
        0xB2 STSI          7     0.04%     0.00%        0us       44us 16.49us ( +-  38.20% )
        [..]
      
      This happens because the 'stats' structure is not initialized and
      stats->min equals to 0. Lets initialize the structure for every
      event after its allocation using init_stats() function. This initializes
      stats->min to -1 and makes 'Min time' statistics counting work:
      
       # perf kvm stat report
      
       Analyze events for all VCPUs:
      
          VM-EXIT    Samples  Samples%     Time%   Min Time   Max Time Avg time
        [..]
        0xB2 MSCH         12     0.07%     0.00%        6us        8us 7.31us ( +-   2.11% )
        0xB2 CHSC         12     0.07%     0.00%        7us       18us 9.39us ( +-   9.49% )
        0xB2 STPX          8     0.05%     0.00%        1us        2us 1.88us ( +-   7.18% )
        0xB2 STSI          7     0.04%     0.00%        1us       44us 16.49us ( +-  38.20% )
        [..]
      Signed-off-by: default avatarAlexander Yarygin <yarygin@linux.vnet.ibm.com>
      Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
      Reviewed-by: default avatarDavid Ahern <dsahern@gmail.com>
      Link: http://lkml.kernel.org/r/1397053319-2130-3-git-send-email-borntraeger@de.ibm.com
      [ Fixing the perf examples changelog output ]
      Signed-off-by: default avatarJiri Olsa <jolsa@redhat.com>
      acb61fc8
    • Eric Dumazet's avatar
      coredump: fix va_list corruption · 404ca80e
      Eric Dumazet authored
      A va_list needs to be copied in case it needs to be used twice.
      
      Thanks to Hugh for debugging this issue, leading to various panics.
      
      Tested:
      
        lpq84:~# echo "|/foobar12345 %h %h %h %h %h %h %h %h %h %h %h %h %h %h %h %h %h %h %h %h" >/proc/sys/kernel/core_pattern
      
      'produce_core' is simply : main() { *(int *)0 = 1;}
      
        lpq84:~# ./produce_core
        Segmentation fault (core dumped)
        lpq84:~# dmesg | tail -1
        [  614.352947] Core dump to |/foobar12345 lpq84 lpq84 lpq84 lpq84 lpq84 lpq84 lpq84 lpq84 lpq84 lpq84 lpq84 lpq84 lpq84 lpq84 lpq84 lpq84 lpq84 lpq84 lpq84 (null) pipe failed
      
      Notice the last argument was replaced by a NULL (we were lucky enough to
      not crash, but do not try this on your production machine !)
      
      After fix :
      
        lpq83:~# echo "|/foobar12345 %h %h %h %h %h %h %h %h %h %h %h %h %h %h %h %h %h %h %h %h" >/proc/sys/kernel/core_pattern
        lpq83:~# ./produce_core
        Segmentation fault
        lpq83:~# dmesg | tail -1
        [  740.800441] Core dump to |/foobar12345 lpq83 lpq83 lpq83 lpq83 lpq83 lpq83 lpq83 lpq83 lpq83 lpq83 lpq83 lpq83 lpq83 lpq83 lpq83 lpq83 lpq83 lpq83 lpq83 lpq83 pipe failed
      
      Fixes: 5fe9d8ca ("coredump: cn_vprintf() has no reason to call vsnprintf() twice")
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Diagnosed-by: default avatarHugh Dickins <hughd@google.com>
      Acked-by: default avatarOleg Nesterov <oleg@redhat.com>
      Cc: Neil Horman <nhorman@tuxdriver.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: stable@vger.kernel.org # 3.11+
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      404ca80e