1. 07 10月, 2013 10 次提交
    • 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
    • E
      ALSA: usb-audio: remove unused endpoint flag EP_FLAG_ACTIVATED · 05c79b77
      Eldad Zack 提交于
      EP_FLAG_ACTIVATED is never tested for, remove it.
      Signed-off-by: NEldad Zack <eldad@fogrefinery.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      05c79b77
    • E
      ALSA: usb-audio: rename alt_idx to altsetting · df23a246
      Eldad Zack 提交于
      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: NEldad Zack <eldad@fogrefinery.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      df23a246
    • E
      ALSA: usb-audio: clear SUBSTREAM_FLAG_SYNC_EP_STARTED on error · 06613f54
      Eldad Zack 提交于
      If setting the interface fails, the SUBSTREAM_FLAG_SYNC_EP_STARTED
      should be cleared.
      Signed-off-by: NEldad Zack <eldad@fogrefinery.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      06613f54
    • E
      ALSA: usb-audio: void return type of snd_usb_endpoint_deactivate() · 9b7c552b
      Eldad Zack 提交于
      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: NEldad Zack <eldad@fogrefinery.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      9b7c552b
    • E
      ALSA: usb-audio: don't deactivate URBs on in-use EP · 239b9f79
      Eldad Zack 提交于
      If an endpoint in use, its associated URBs should not be
      deactivated.
      Signed-off-by: NEldad Zack <eldad@fogrefinery.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      239b9f79
    • E
      ALSA: usb-audio: remove deactivate_endpoints() · 26de5d0a
      Eldad Zack 提交于
      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: NEldad Zack <eldad@fogrefinery.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      26de5d0a
    • E
      ALSA: usb-audio: remove unused parameter from sync_ep_set_params · 93721039
      Eldad Zack 提交于
      Since the format is not actually used in sync_ep_set_params(),
      there is no need to pass it down.
      Signed-off-by: NEldad Zack <eldad@fogrefinery.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      93721039
  2. 30 9月, 2013 1 次提交
  3. 26 9月, 2013 6 次提交
    • T
      ALSA: firewire-lib: use inlune function to calculate frame bytes · e84841f9
      Takashi Sakamoto 提交于
      Calculating frame bytes can be replaced with inline function in
      include/sound/pcm.h.
      Signed-off-by: NTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      e84841f9
    • A
      ALSA: improve buffer size computations for USB PCM audio · 976b6c06
      Alan Stern 提交于
      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: NAlan Stern <stern@rowland.harvard.edu>
      CC: Clemens Ladisch <clemens@ladisch.de>
      Tested-by: NDaniel Mack <zonque@gmail.com>
      Tested-by: NEldad Zack <eldad@fogrefinery.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      976b6c06
    • T
      Merge branch 'for-linus' into for-next · e8bc9942
      Takashi Iwai 提交于
      * for-linus:
        ALSA : hda - not use assigned converters for all unused pins
        ALSA: compress: Make sure we trigger STOP before closing the stream.
      e8bc9942
    • M
      ALSA : hda - not use assigned converters for all unused pins · f82d7d16
      Mengdong Lin 提交于
      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: NMengdong Lin <mengdong.lin@intel.com>
      Reviewed-by: NDavid Henningsson <david.henningsson@canonical.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      f82d7d16
    • P
      ALSA: Fix assignment of 0/1 to bool variables · e0f17c75
      Peter Senna Tschudin 提交于
      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: NPeter Senna Tschudin <peter.senna@gmail.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      e0f17c75
    • L
      ALSA: compress: Make sure we trigger STOP before closing the stream. · b26d19e4
      Liam Girdwood 提交于
      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: NLiam Girdwood <liam.r.girdwood@linux.intel.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      b26d19e4
  4. 20 9月, 2013 2 次提交
  5. 17 9月, 2013 5 次提交
  6. 16 9月, 2013 3 次提交
    • L
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus · d8efd82e
      Linus Torvalds 提交于
      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
    • L
      Merge branch 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86 · cd619e21
      Linus Torvalds 提交于
      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
    • L
      Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 0375ec58
      Linus Torvalds 提交于
      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
  7. 15 9月, 2013 4 次提交
  8. 14 9月, 2013 8 次提交
  9. 13 9月, 2013 1 次提交