1. 07 Oct, 2013 12 commits
    • Anssi Hannula's avatar
      ALSA: hda - hdmi: Fix channel maps with less common speakers · a5b7d510
      Anssi Hannula authored
      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: default avatarAnssi Hannula <anssi.hannula@iki.fi>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      a5b7d510
    • Anssi Hannula's avatar
      ALSA: hda - hdmi: Fix unused slots being enabled in manual and non-PCM mappings · 11f7c52d
      Anssi Hannula authored
      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: default avatarAnssi Hannula <anssi.hannula@iki.fi>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      11f7c52d
    • Anssi Hannula's avatar
      ALSA: hda - hdmi: Fix programmed active channel count · 1df5a06a
      Anssi Hannula authored
      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: default avatarAnssi Hannula <anssi.hannula@iki.fi>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      1df5a06a
    • Anssi Hannula's avatar
      ALSA: hda - hdmi: Fix incorrect default channel mapping for unusual CAs · 90f28002
      Anssi Hannula authored
      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: default avatarAnssi Hannula <anssi.hannula@iki.fi>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      90f28002
    • Anssi Hannula's avatar
      ALSA: hda - hdmi: Fix reported channel map on common default layouts · 56cac413
      Anssi Hannula authored
      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: default avatarAnssi Hannula <anssi.hannula@iki.fi>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      56cac413
    • Eldad Zack's avatar
      ALSA: usb-audio: remove unused endpoint flag EP_FLAG_ACTIVATED · 05c79b77
      Eldad Zack authored
      EP_FLAG_ACTIVATED is never tested for, remove it.
      Signed-off-by: default avatarEldad Zack <eldad@fogrefinery.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      05c79b77
    • Eldad Zack's avatar
      ALSA: usb-audio: rename alt_idx to altsetting · df23a246
      Eldad Zack authored
      As Clemens Ladisch kindly explained:
       "Please note that there are two methods to identify alternate settings:
        the number, which is the value in bAlternateSetting, and the index,
        which is the index in the descriptor array.  There might be some wording
        in the USB spec that these two values must be the same, but in reality,
        [insert standard rant about firmware writers], bAlternateSetting
        must be treated as a random ID value."
      
      This patch changes the name to express the correct usage semantics.
      No functional change.
      Signed-off-by: default avatarEldad Zack <eldad@fogrefinery.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      df23a246
    • Eldad Zack's avatar
      ALSA: usb-audio: clear SUBSTREAM_FLAG_SYNC_EP_STARTED on error · 06613f54
      Eldad Zack authored
      If setting the interface fails, the SUBSTREAM_FLAG_SYNC_EP_STARTED
      should be cleared.
      Signed-off-by: default avatarEldad Zack <eldad@fogrefinery.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      06613f54
    • Eldad Zack's avatar
      ALSA: usb-audio: void return type of snd_usb_endpoint_deactivate() · 9b7c552b
      Eldad Zack authored
      The return value of snd_usb_endpoint_deactivate() is not used,
      make the function have no return value.
      Update the documentation to reflect what the function is actually
      doing.
      Signed-off-by: default avatarEldad Zack <eldad@fogrefinery.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      9b7c552b
    • Eldad Zack's avatar
      ALSA: usb-audio: don't deactivate URBs on in-use EP · 239b9f79
      Eldad Zack authored
      If an endpoint in use, its associated URBs should not be
      deactivated.
      Signed-off-by: default avatarEldad Zack <eldad@fogrefinery.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      239b9f79
    • Eldad Zack's avatar
      ALSA: usb-audio: remove deactivate_endpoints() · 26de5d0a
      Eldad Zack authored
      The only call site for deactivate_endpoints() at snd_usb_hw_free().
      The return value is not checked there, as it is irrelevant if it
      fails on hw_free.
      This patch moves the deactivation of the endpoints directly into
      snd_usb_hw_free().
      Signed-off-by: default avatarEldad Zack <eldad@fogrefinery.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      26de5d0a
    • Eldad Zack's avatar
      ALSA: usb-audio: remove unused parameter from sync_ep_set_params · 93721039
      Eldad Zack authored
      Since the format is not actually used in sync_ep_set_params(),
      there is no need to pass it down.
      Signed-off-by: default avatarEldad Zack <eldad@fogrefinery.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      93721039
  2. 30 Sep, 2013 1 commit
  3. 26 Sep, 2013 6 commits
    • Takashi Sakamoto's avatar
      ALSA: firewire-lib: use inlune function to calculate frame bytes · e84841f9
      Takashi Sakamoto authored
      Calculating frame bytes can be replaced with inline function in
      include/sound/pcm.h.
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      e84841f9
    • Alan Stern's avatar
      ALSA: improve buffer size computations for USB PCM audio · 976b6c06
      Alan Stern authored
      This patch changes the way URBs are allocated and their sizes are
      determined for PCM playback in the snd-usb-audio driver.  Currently
      the driver allocates too few URBs for endpoints that don't use
      implicit sync, making underruns more likely to occur.  This may be a
      holdover from before I/O delays could be measured accurately; in any
      case, it is no longer necessary.
      
      The patch allocates as many URBs as possible, subject to four
      limitations:
      
      	The total number of URBs for the endpoint is not allowed to
      	exceed MAX_URBS (which the patch increases from 8 to 12).
      
      	The total number of packets per URB is not allowed to exceed
      	MAX_PACKS (or MAX_PACKS_HS for high-speed devices), which is
      	decreased from 20 to 6.
      
      	The total duration of queued data is not allowed to exceed
      	MAX_QUEUE, which is decreased from 24 ms to 18 ms.
      
      	The total number of ALSA frames in the output queue is not
      	allowed to exceed the ALSA buffer size.
      
      The last requirement is the hardest to implement.  Currently the
      number of URBs needed to fill a buffer cannot be determined in
      advance, because a buffer contains a fixed number of frames whereas
      the number of frames in an URB varies to match shifts in the device's
      clock rate.  To solve this problem, the patch changes the logic for
      deciding how many packets an URB should contain.  Rather than using as
      many as possible without exceeding an ALSA period boundary, now the
      driver uses only as many packets as needed to transfer a predetermined
      number of frames.  As a result, unless the device's clock has an
      exceedingly variable rate, the number of URBs making up each period
      (and hence each buffer) will remain constant.
      
      The overall effect of the patch is that playback works better in
      low-latency settings.  The user can still specify values for
      frames/period and periods/buffer that exceed the capabilities of the
      hardware, of course.  But for values that are within those
      capabilities, the performance will be improved.  For example, testing
      shows that a high-speed device can handle 32 frames/period and 3
      periods/buffer at 48 KHz, whereas the current driver starts to get
      glitchy at 64 frames/period and 2 periods/buffer.
      
      A side effect of these changes is that the "nrpacks" module parameter
      is no longer used.  The patch removes it.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      CC: Clemens Ladisch <clemens@ladisch.de>
      Tested-by: default avatarDaniel Mack <zonque@gmail.com>
      Tested-by: default avatarEldad Zack <eldad@fogrefinery.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      976b6c06
    • Takashi Iwai's avatar
      Merge branch 'for-linus' into for-next · e8bc9942
      Takashi Iwai authored
      * for-linus:
        ALSA : hda - not use assigned converters for all unused pins
        ALSA: compress: Make sure we trigger STOP before closing the stream.
      e8bc9942
    • Mengdong Lin's avatar
      ALSA : hda - not use assigned converters for all unused pins · f82d7d16
      Mengdong Lin authored
      BIOS can mark a pin as "no physical connection" if the port is used by an
      integrated display which is not audio capable. And audio driver will overlook
      such pins.
      
      On Haswell, such a disconneted pin will keep muted and connected to the 1st
      converter by default. But if the 1st convertor is assigned to a connected pin
      for audio streaming. The muted disconnected pin can make the connected pin
      no sound output.
      
      So this patch avoids using assigned converters for all unused pins for Haswell,
      including the disconected pins.
      Signed-off-by: default avatarMengdong Lin <mengdong.lin@intel.com>
      Reviewed-by: default avatarDavid Henningsson <david.henningsson@canonical.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      f82d7d16
    • Peter Senna Tschudin's avatar
      ALSA: Fix assignment of 0/1 to bool variables · e0f17c75
      Peter Senna Tschudin authored
      Convert 0 to false and 1 to true when assigning values to bool
      variables. Inspired by commit 3db1cd5c.
      
      The simplified semantic patch that find this problem is as
      follows (http://coccinelle.lip6.fr/):
      
      @@
      bool b;
      @@
      (
      -b = 0
      +b = false
      |
      -b = 1
      +b = true
      )
      Signed-off-by: default avatarPeter Senna Tschudin <peter.senna@gmail.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      e0f17c75
    • Liam Girdwood's avatar
      ALSA: compress: Make sure we trigger STOP before closing the stream. · b26d19e4
      Liam Girdwood authored
      Currently we assume that userspace will shut down the compressed stream
      correctly. However, if userspcae dies (e.g. cplay & ctrl-C) we dont
      stop the stream before freeing it.
      
      This now checks that the stream is stopped before freeing.
      Signed-off-by: default avatarLiam Girdwood <liam.r.girdwood@linux.intel.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      b26d19e4
  4. 19 Sep, 2013 2 commits
  5. 16 Sep, 2013 5 commits
  6. 15 Sep, 2013 7 commits
    • Linus Torvalds's avatar
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus · d8efd82e
      Linus Torvalds authored
      Pull MIPS fixes from Ralf Baechle:
       "These are four patches for three construction sites:
      
         - Fix register decoding for the combination of multi-core processors
           and multi-threading.
      
         - Two more fixes that are part of the ongoing DECstation resurrection
           work.  One of these touches a DECstation-only network driver.
      
         - Finally Markos' trivial build fix for the AP/SP support.
      
        (With this applied now all MIPS defconfigs are building again)"
      
      * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
        MIPS: kernel: vpe: Make vpe_attrs an array of pointers.
        MIPS: Fix SMP core calculations when using MT support.
        MIPS: DECstation I/O ASIC DMA interrupt handling fix
        MIPS: DECstation HRT initialization rearrangement
      d8efd82e
    • Linus Torvalds's avatar
      Merge branch 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86 · cd619e21
      Linus Torvalds authored
      Pull x86 platform updates from Matthew Garrett:
       "Nothing amazing here, almost entirely cleanups and minor bugfixes and
        one bit of hardware enablement in the amilo-rfkill driver"
      
      * 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86:
        platform/x86: panasonic-laptop: reuse module_acpi_driver
        samsung-laptop: fix config build error
        platform: x86: remove unnecessary platform_set_drvdata()
        amilo-rfkill: Enable using amilo-rfkill with the FSC Amilo L1310.
        wmi: parse_wdg() should return kernel error codes
        hp_wmi: Fix unregister order in hp_wmi_rfkill_setup()
        platform: replace strict_strto*() with kstrto*()
        x86: irst: use module_acpi_driver to simplify the code
        x86: smartconnect: use module_acpi_driver to simplify the code
        platform samsung-q10: use ACPI instead of direct EC calls
        thinkpad_acpi: add the ability setting TPACPI_LED_NONE by quirk
        thinkpad_acpi: return -NODEV while operating uninitialized LEDs
      cd619e21
    • Linus Torvalds's avatar
      Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 0375ec58
      Linus Torvalds authored
      Pull misc SCSI driver updates from James Bottomley:
       "This patch set is a set of driver updates (megaraid_sas, fnic, lpfc,
        ufs, hpsa) we also have a couple of bug fixes (sd out of bounds and
        ibmvfc error handling) and the first round of esas2r checker fixes and
        finally the much anticipated big endian additions for megaraid_sas"
      
      * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (47 commits)
        [SCSI] fnic: fnic Driver Tuneables Exposed through CLI
        [SCSI] fnic: Kernel panic while running sh/nosh with max lun cfg
        [SCSI] fnic: Hitting BUG_ON(io_req->abts_done) in fnic_rport_exch_reset
        [SCSI] fnic: Remove QUEUE_FULL handling code
        [SCSI] fnic: On system with >1.1TB RAM, VIC fails multipath after boot up
        [SCSI] fnic: FC stat param seconds_since_last_reset not getting updated
        [SCSI] sd: Fix potential out-of-bounds access
        [SCSI] lpfc 8.3.42: Update lpfc version to driver version 8.3.42
        [SCSI] lpfc 8.3.42: Fixed issue of task management commands having a fixed timeout
        [SCSI] lpfc 8.3.42: Fixed inconsistent spin lock usage.
        [SCSI] lpfc 8.3.42: Fix driver's abort loop functionality to skip IOs already getting aborted
        [SCSI] lpfc 8.3.42: Fixed failure to allocate SCSI buffer on PPC64 platform for SLI4 devices
        [SCSI] lpfc 8.3.42: Fix WARN_ON when driver unloads
        [SCSI] lpfc 8.3.42: Avoided making pci bar ioremap call during dual-chute WQ/RQ pci bar selection
        [SCSI] lpfc 8.3.42: Fixed driver iocbq structure's iocb_flag field running out of space
        [SCSI] lpfc 8.3.42: Fix crash on driver load due to cpu affinity logic
        [SCSI] lpfc 8.3.42: Fixed logging format of setting driver sysfs attributes hard to interpret
        [SCSI] lpfc 8.3.42: Fixed back to back RSCNs discovery failure.
        [SCSI] lpfc 8.3.42: Fixed race condition between BSG I/O dispatch and timeout handling
        [SCSI] lpfc 8.3.42: Fixed function mode field defined too small for not recognizing dual-chute mode
        ...
      0375ec58
    • Linus Torvalds's avatar
      Merge branch 'slab/next' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/linux · bff157b3
      Linus Torvalds authored
      Pull SLAB update from Pekka Enberg:
       "Nothing terribly exciting here apart from Christoph's kmalloc
        unification patches that brings sl[aou]b implementations closer to
        each other"
      
      * 'slab/next' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/linux:
        slab: Use correct GFP_DMA constant
        slub: remove verify_mem_not_deleted()
        mm/sl[aou]b: Move kmallocXXX functions to common code
        mm, slab_common: add 'unlikely' to size check of kmalloc_slab()
        mm/slub.c: beautify code for removing redundancy 'break' statement.
        slub: Remove unnecessary page NULL check
        slub: don't use cpu partial pages on UP
        mm/slub: beautify code for 80 column limitation and tab alignment
        mm/slub: remove 'per_cpu' which is useless variable
      bff157b3
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · 8bf5e36d
      Linus Torvalds authored
      Pull input update from Dmitry Torokhov:
       "The only change is David Hermann's new EVIOCREVOKE evdev ioctl that
        allows safely passing file descriptors to input devices to session
        processes and later being able to stop delivery of events through
        these fds so that inactive sessions will no longer receive user input
        that does not belong to them"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Input: evdev - add EVIOCREVOKE ioctl
      8bf5e36d
    • Linus Torvalds's avatar
      vfs: fix typo in comment in recent dentry work · 05a8252b
      Linus Torvalds authored
      Sedat points out that I transposed some letters in "LRU" and wrote "RLU"
      instead in one of the new comments explaining the flow.  Let's just fix
      it.
      Reported-by: default avatarSedat Dilek <sedat.dilek@jpberlin.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      05a8252b
    • Davidlohr Bueso's avatar
      partitions/efi: loosen check fot pmbr size in lba · 6b02fa59
      Davidlohr Bueso authored
      Matt found that commit 27a7c642 ("partitions/efi: account for pmbr
      size in lba") caused his GPT formatted eMMC device not to boot.  The
      reason is that this commit enforced Linux to always check the lesser of
      the whole disk or 2Tib for the pMBR size in LBA.  While most disk
      partitioning tools out there create a pMBR with these characteristics,
      Microsoft does not, as it always sets the entry to the maximum 32-bit
      limitation - even though a drive may be smaller than that[1].
      
      Loosen this check and only verify that the size is either the whole disk
      or 0xFFFFFFFF.  No tool in its right mind would set it to any value
      other than these.
      
      [1] http://thestarman.pcministry.com/asm/mbr/GPT.htm#GPTPTReported-and-tested-by: default avatarMatt Porter <matt.porter@linaro.org>
      Signed-off-by: default avatarDavidlohr Bueso <davidlohr@hp.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6b02fa59
  7. 14 Sep, 2013 2 commits
  8. 13 Sep, 2013 5 commits