Commit graph

22497 commits

Author SHA1 Message Date
Julian Scheel
9430e54789 ALSA: usb-audio: Recurse before saving terminal properties
The input terminal parser recurses into the referenced clock entity to verify
it is existant and thus the terminal descriptor is valid. The actual property
values of the term instance which is initially parsed must not be overriden by
the recursion. For this to work the term properties have to be assigned after
recursing into the referenced clock entity descriptors.

Signed-off-by: Julian Scheel <julian@jusst.de>
Acked-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-19 18:05:13 +02:00
Takashi Iwai
d5cf00c7ac ALSA: hda/eld - Add const to possible places
Similar like the previous fix to hda_proc.c, adding const prefix will
save our world (a little bit).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-17 15:12:14 +02:00
Takashi Iwai
1d260d7b3b ALSA: hda/proc - Fix racy string access for power states
The power states in a proc file are printed in a racy manner on a
single static string buffer.  Fix it by calling snd_iprintf() directly
for each state instead of processing on a temporary buffer.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-17 15:12:04 +02:00
Takashi Iwai
cc75cdfe1d ALSA: hda/proc - Add const to possible places
Many arrays in hda_proc.c are string arrays that should be covered by
const prefix for increasing the safety and reducing the size.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-17 15:11:31 +02:00
Takashi Iwai
d2c6b63df5 ALSA: hda - Make some helper functions local
A few helper functions to convert the pin information to strings have
been exported with assumption that they were used by other drivers.
But they are referred only in the proc interface in the end.

Let's make them local so that we can get rid of a few exports.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-17 15:10:15 +02:00
Pierre-Louis Bossart
395ae54bd8 ALSA: usb: handle descriptor with SYNC_NONE illegal value
The M-Audio Transit exposes an interface with a SYNC_NONE attribute.
This is not a valid value according to the USB audio classspec. However
there is a sync endpoint associated to this record. Changing the logic to
try to use this sync endpoint allows for seamless transitions between
altset 2 and altset 3. If any errors happen, the behavior remains the same.

$ more /proc/asound/card1/stream0
M-Audio Transit USB at usb-0000:00:14.0-2, full speed : USB Audio

Playback:
  Status: Stop
  Interface 1
    Altset 1
    Format: S24_3LE
    Channels: 2
    Endpoint: 3 OUT (ADAPTIVE)
    Rates: 48001 - 96000 (continuous)
  Interface 1
    Altset 2
    Format: S24_3LE
    Channels: 2
    Endpoint: 3 OUT (NONE)
    Rates: 8000 - 48000 (continuous)
  Interface 1
    Altset 3
    Format: S16_LE
    Channels: 2
    Endpoint: 3 OUT (ASYNC)
    Rates: 8000 - 48000 (continuous)

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-16 08:48:47 +02:00
Pierre-Louis Bossart
630184477e ALSA: usb: fix corrupted pointers due to interface setting change
When a transition occurs between alternate settings that do not use the
same synchronization method, the substream pointers were not reset.
This prevents audio from being played during the second transition.

Identified and tested with M-Audio Transit device
(0763:2006 Midiman M-Audio Transit)

Details of the issue:

First playback to adaptive endpoint:
$ aplay -Dhw:1,0 ~/24_96.wav
Playing WAVE '/home/plb/24_96.wav' : Signed 24 bit Little Endian in 3bytes,
Rate 96000 Hz, Stereo

[ 3169.297556] usb 1-2: setting usb interface 1:1
[ 3169.297568] usb 1-2: Creating new playback data endpoint #3
[ 3169.298563] usb 1-2: Setting params for ep #3 (type 0, 3 urbs), ret=0
[ 3169.298574] usb 1-2: Starting data EP @ffff880035fc8000

first playback to asynchronous endpoint:
$ aplay -Dhw:1,0 ~/16_48.wav
Playing WAVE '/home/plb/16_48.wav' : Signed 16 bit Little Endian,
Rate 48000 Hz, Stereo

[ 3204.520251] usb 1-2: setting usb interface 1:3
[ 3204.520264] usb 1-2: Creating new playback data endpoint #3
[ 3204.520272] usb 1-2: Creating new capture sync endpoint #83
[ 3204.521162] usb 1-2: Setting params for ep #3 (type 0, 4 urbs), ret=0
[ 3204.521177] usb 1-2: Setting params for ep #83 (type 1, 4 urbs), ret=0
[ 3204.521182] usb 1-2: Starting data EP @ffff880035fce000
[ 3204.521204] usb 1-2: Starting sync EP @ffff8800bd616000

second playback to adaptive endpoint: no audio and error on terminal:
$ aplay -Dhw:1,0 ~/24_96.wav
Playing WAVE '/home/plb/24_96.wav' : Signed 24 bit Little Endian in 3bytes,
Rate 96000 Hz, Stereo
aplay: pcm_write:1939: write error: Input/output error

[ 3239.483589] usb 1-2: setting usb interface 1:1
[ 3239.483601] usb 1-2: Re-using EP 3 in iface 1,1 @ffff880035fc8000
[ 3239.484590] usb 1-2: Setting params for ep #3 (type 0, 4 urbs), ret=0
[ 3239.484606] usb 1-2: Setting params for ep #83 (type 1, 4 urbs), ret=0

This last line shows that a sync endpoint is used when it shouldn't.
The sync endpoint is no longer valid and the pointers are corrupted

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-16 08:48:35 +02:00
Julian Scheel
bc18e31c30 ALSA: usb-audio: Fix parameter block size for UAC2 control requests
USB Audio Class version 2.0 supports three different parameter block sizes for
CUR requests, which are 1 byte (5.2.3.1 Layout 1 Parameter Block), 2 bytes
(5.2.3.2 Layout 2 Parameter Block) and 4 bytes (5.2.3.3 Layout 3 Parameter
Block). Use the correct size according to the specific control as it was
already done for UACv1. The allocated block size for control requests is
increased to support the 4 byte worst case.

Signed-off-by: Julian Scheel <julian@jusst.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-14 16:26:50 +02:00
Takashi Iwai
41450b1b5b Merge branch 'for-linus' into for-next 2015-08-11 09:40:16 +02:00
Takashi Iwai
fe14f39e88 ALSA: hda - Fix pin config and mapping on Alienware 15
Alienware 15 has CA0132 codec for its onboard sound, but the pin
config and mapping seem quite different from other Creative boards.
This patch corrects them, at least, for providing the right headphone
and mic jack notification, as well as removing the non-existing SPDIF
pins.

Even with this fix, not all stuff works perfectly yet, mainly because
of the badly written ca0132 driver code -- it has too many implicit
assumptions of pin configs and maps.  Nevertheless, this is a small
good step forward.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=101981
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-10 16:53:32 +02:00
Mark Brown
3f6175ece9 ALSA: echoaudio: Use standard C definitions of true and false
The echoaudio locally defines TRUE and FALSE.  Not only is this
redundant given that C now has a boolean type it results in lots of
warnings as other headers also define these macros, causing duplicate
definitions.  Fix this by removing the local defines and converting all
local users to use the standard C true and false instead, simply
removing the macros is less safe due to implicit inclusion of the other
definitons.

[fixed overlooked replacement of FALSE by tiwai]

Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-10 14:27:16 +02:00
Andrzej Hajda
96bab82f6b ALSA: firewire: use kmemdup rather than duplicating its implementation
The patch was generated using fixed coccinelle semantic patch
scripts/coccinelle/api/memdup.cocci [1].

[1]: http://permalink.gmane.org/gmane.linux.kernel/2014320

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-07 14:52:07 +02:00
Takashi Iwai
6ac7ada210 ASoC: Fixes for v4.2
There are a couple of small driver specific fixes here but the
 overwhelming bulk of these changes are fixes to the topology ABI that
 has been newly introduced in v4.2.  Once this makes it into a release we
 will have to firm this up but for now getting enhancements in before
 they've made it into a release is the most expedient thing.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJVxJsBAAoJECTWi3JdVIfQHUIH/2NeQyG7bL3TSIm0qK9RdmaT
 UrWyGm6AwhOrg9j9jnZkXag1v4Fsmo4nnslaDbmCKaWJPs7ol94NuWJK7z3He3nr
 47yxl2m8OhxsS7aBDACa4gJFQce+JSjKs1ADnKR7QzY9c1/nTAWLO/LE/I5Ca18u
 tZg77hviip2ftfLYdNXDZvz3HzuCcRnIouc4izTs16DXwU3aYpqcctFrcqU3nNmp
 /+5zPwIoLA7KDwPqdYhSPNRuCnFtjVbI8hTzq+aWFlxFBZYlKmSCTSwpCN2aQDgF
 1oCOP4dlv7s9Xavd2TOMJ8g3Fuyb/gjX2DhIEm7QCYxwBxdkpwm0na6gMrRJqsg=
 =NEOq
 -----END PGP SIGNATURE-----

Merge tag 'asoc-fix-v4.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v4.2

There are a couple of small driver specific fixes here but the
overwhelming bulk of these changes are fixes to the topology ABI that
has been newly introduced in v4.2.  Once this makes it into a release we
will have to firm this up but for now getting enhancements in before
they've made it into a release is the most expedient thing.
2015-08-07 13:53:41 +02:00
Mark Brown
d00a9e0217 Merge remote-tracking branches 'asoc/fix/cs4265', 'asoc/fix/intel' and 'asoc/fix/topology' into asoc-linus 2015-08-06 12:39:07 +01:00
Mark Brown
78be55af0d Merge remote-tracking branch 'asoc/fix/rt5645' into asoc-linus 2015-08-06 12:39:07 +01:00
Mengdong Lin
28a87eebca ASoC: topology: Update TLV support so we can support more TLV types
Currently the TLV topology structure is targeted at only supporting the
DB scale data. This patch extends support for the other TLV types so they
can be easily added at a later stage.

TLV structure is moved to common topology control header since it's a
common field for controls and can be processed in a general way.

Users must set a proper access flag for a control since it's used to
decide if the TLV field is valid and if a TLV callback is needed.

Removed the following fields from topology TLV struct:
- size/count: type can decide the size.
- numid: not needed to initialize TLV for kcontrol.
- data: replaced by the type specific struct.

Added TLV structure to generic control header and removed TLV structure
from mixer control.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-06 12:34:46 +01:00
Mark Brown
113adf21cf ASoC: Fixes for v4.2
A lot of small fixes here, a few to the core:
 
  - Fix for binding DAPM stream widgets on devices with prefixes assigned
    to them
  - Minor fixes for the newly added topology interfaces
  - Locking and memory leak fixes for DAPM
  - Driver specific fixes
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJVsnNFAAoJECTWi3JdVIfQH9cH/1ddueDFikvXSCyntuJcHAwJ
 a7X5kCVdegMnaMK5fnAbTlJBpDIX/F1UBvsFQQ38eKWeneP44XnkXeh/32fGJzQO
 L730dqy0tkgQdWJkQg0yxaP5/k0BfhnXeRc3ATUG3LBgUBrWRYLTIvaM+G+H3Kf5
 K88QL7cKmeY0Kt6+cms3nnBj9x5oFgbHIW7Y3K/pza+XPVecZ7N3/5gpV+VQDUXh
 Oz3cZOsC5h4+IpxkOrLXY7zgLvrt/HfRTO2QF/3Ntub81anAk190pVAquM+r/CTn
 tQ3sPNGLglQ4VRXNP6yBKJOp5CUTBLt5XWlJ+Kg9p2OiiuOPla4wkhuGDS5AM64=
 =nJJl
 -----END PGP SIGNATURE-----

Merge tag 'asoc-fix-v4.2-rc3' into asoc-fix-topology

ASoC: Fixes for v4.2

A lot of small fixes here, a few to the core:

 - Fix for binding DAPM stream widgets on devices with prefixes assigned
   to them
 - Minor fixes for the newly added topology interfaces
 - Locking and memory leak fixes for DAPM
 - Driver specific fixes
2015-08-06 12:34:41 +01:00
Subhransu S. Prusty
6dc6db790a ASoC: topology: Add subsequence in topology
Some widgets may need sorting within, So add this support in topology.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-06 12:33:53 +01:00
Lars-Peter Clausen
f6af5df0c7 ALSA: aoa-soundbus: Switch to dev_pm_ops
Update the aoa-soundbus framework to use dev_pm_ops rather than the
deprecated legacy suspend and resume callbacks.

Since there isn't anything special to do at the bus level the bus driver
does not have to implement any callbacks. The device driver core will
automatically pick up and execute the device's PM ops.

As there is only a single aoa-soundbus driver implementing suspend and
resume, update both the core and driver at the same time to avoid
unnecessary code churn.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-05 16:47:47 +02:00
Takashi Iwai
9f502ff553 ALSA: hda - yet another fix for Dell headset mic with ALC3266
It turned out that there are three variants of pin config values of
NID 0x17 on Dell laptops with ALC3266 (alias of ALC298): 0x90170110,
0x90170140 and 0x90170150.  The first two have been already covered by
commits 703867e2f2 and 977e627684, so this commit adds the missing
last entry.

While we're at it, rearrange the three entries in the order of pincfg
values.

Reported-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-05 12:09:45 +02:00
Hui Wang
73851b36fe ALSA: hda - one Dell machine needs the headphone white noise fixup
The fixup ALC292_FIXUP_DISABLE_AAMIX can fix the white noise of
the headphone on this Dell machine.

Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-05 12:08:16 +02:00
Takashi Sakamoto
18f5ed365d ALSA: fireworks/firewire-lib: add support for recent firmware quirk
Fireworks uses TSB43CB43(IceLynx-Micro) as its IEC 61883-1/6 interface.
This chip includes ARM7 core, and loads and runs program. The firmware
is stored in on-board memory and loaded every powering-on from it.

Echo Audio ships several versions of firmwares for each model. These
firmwares have each quirk and the quirk changes a sequence of packets.

As long as I investigated, AudioFire2/AudioFire4/AudioFirePre8 have a
quirk to transfer a first packet with 0x02 in its dbc field. This causes
ALSA Fireworks driver to detect discontinuity. In this case, firmware
version 5.7.0, 5.7.3 and 5.8.0 are used.

Payload  CIP      CIP
quadlets header1  header2
02       00050002 90ffffff <-
42       0005000a 90013000
42       00050012 90014400
42       0005001a 90015800
02       0005001a 90ffffff
42       00050022 90019000
42       0005002a 9001a400
42       00050032 9001b800
02       00050032 90ffffff
42       0005003a 9001d000
42       00050042 9001e400
42       0005004a 9001f800
02       0005004a 90ffffff
(AudioFire2 with firmware version 5.7.)

$ dmesg
snd-fireworks fw1.0: Detect discontinuity of CIP: 00 02

These models, AudioFire8 (since Jul 2009 ) and Gibson Robot Interface
Pack series uses the same ARM binary as their firmware. Thus, this
quirk may be observed among them.

This commit adds a new member for AMDTP structure. This member represents
the value of dbc field in a first AMDTP packet. Drivers can set it with
a preferred value according to model's quirk.

Tested-by: Johannes Oertei <johannes.oertel@uni-due.de>
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-05 07:52:39 +02:00
Takashi Sakamoto
c85523d1d9 Revert "ALSA: fireworks: add support for AudioFire2 quirk"
This reverts commit 9c6893e0be.

The fix is superseded by the next commit as a better implementation
for supporting AudioFire2/AudioFire4/AudioFirePre8 quirks.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-05 07:51:53 +02:00
Woodrow Shen
703867e2f2 ALSA: hda - Fix Dell laptop for internal mic/headset mic
The new Dell laptop with ALC3266 can't use internal microphone to
record. Also, the 3 ring headset mic doesn't work on it. For src of
patch_realtek.c, only the pin cfg of Nid 0x17 is different, so the
Nid 0x17 is added into pin quirk, and others are defined to macro
ALC298_STANDARD_PINS in common use.

Codec: Realtek ALC3266
Vendor Id: 0x10ec0298
Subsystem Id: 0x102806e5

BugLink: https://bugs.launchpad.net/bugs/1481575
Signed-off-by: Woodrow Shen <woodrow.shen@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-05 07:47:42 +02:00
Mengdong Lin
5406898354 ASoC: topology: fix typo in soc_tplg_kcontrol_bind_io()
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-04 16:45:00 +01:00
Jeeja KP
5d942ce63c ALSA: HDA: Dont check return for snd_hdac_chip_readl
The snd_hdac_chip_readl return can never be less than zeros,
so no point in checking for the return value

This fixes following static checker warnings in
snd_hdac_ext_bus_parse_capabilities

       sound/hda/ext/hdac_ext_controller.c:47
 snd_hdac_ext_bus_parse_capabilities()
       warn: unsigned 'offset' is never less than zero.

       sound/hda/ext/hdac_ext_controller.c:54
 snd_hdac_ext_bus_parse_capabilities()
       warn: unsigned 'cur_cap' is never less than zero.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-04 07:04:46 +02:00
Jeeja KP
9b06dc9394 ALSA: HDA: Fix stream assignment for host in decoupled mode
This fixes issue in assigning host stream in case of
decoupled mode. The check to verify if the stream is already
in use was wrong so fix that

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-04 07:04:35 +02:00
Bard Liao
a094935e4e ASoC: rt5645: Fix lost pin setting for DMIC1
I2S2_DAC pin can be used for I2S or GPIO. We should set it as GPIO
if we use GPIO5 as DMIC1 data pin.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-03 17:02:45 +01:00
Hui Wang
1158029733 ALSA: hda - remove no physical connection pins from pin_quirk table
To cleanup the pin_quirk table:
 - rewrite the pin_config_match(), comparing all pins on the machine
   with the corresponding pins in the quirk table.
 - remove all 0x4xxxxxxx pin configurations from pin_quirk table
 - after removing the 0x4xxxxxxx pin configurations, some pin tables
   are exactly same, so removing the redudant pin tables.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-03 10:16:20 +02:00
Tomer Barletz
8ec7cfce37 ALSA: oxygen: Fix logical-not-parentheses warning
This fixes the following warning, that is seen with gcc 5.1:
warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses].

Signed-off-by: Tomer Barletz <barletz@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-03 10:15:09 +02:00
Takashi Iwai
649ccd0853 ALSA: hda - Fix MacBook Pro 5,2 quirk
MacBook Pro 5,2 with ALC889 codec had already a fixup entry, but this
seems not working correctly, a fix for pin NID 0x15 is needed in
addition.  It's equivalent with the fixup for MacBook Air 1,1, so use
this instead.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=102131
Reported-and-tested-by: Jeffery Miller <jefferym@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-30 22:30:29 +02:00
U. Artie Eoff
342e844905 ALSA: hda - Fix race between PM ops and HDA init/probe
PM ops could be triggered before HDA is done initializing
and cause PM to set HDA controller to D3Hot.  This can result
in "CORB reset timeout#2, CORBRP = 65535" and "no codecs
initialized".  Additionally, PM ops can be triggered before
azx_probe_continue finishes (async probe).  This can result
in a NULL deref kernel crash.

To fix this, avoid PM ops if !chip->running.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-29 19:37:26 +02:00
Jie Yang
45f503df1b ASoC: Intel: sst_byt: fix initialize 'NULL device *' issue
Add initialization for sst_byt.dev at init stage, which fix the
'NULL device *' warning issues.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-29 14:55:16 +01:00
Jie Yang
4b563ea317 ASoC: Intel: haswell: fix initialize 'NULL device *' issue
Add initialization for sst_hsw.dev at init stage, which fix the
'NULL device *' warning issues.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-29 14:55:06 +01:00
Yao-Wen Mao
2d1cb7f658 ALSA: usb-audio: add dB range mapping for some devices
Add the correct dB ranges of Bose Companion 5 and Drangonfly DAC 1.2.

Signed-off-by: Yao-Wen Mao <yaowen@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-29 09:28:02 +02:00
Takashi Iwai
3a05d12f46 ALSA: hda - Apply a fixup to Dell Vostro 5480
Dell Vostro 5480 (1028:069a) needs the very same quirk used for Vostro
5470 model to make bass speakers properly working.

Reported-and-tested-by: Paulo Roberto de Oliveira Castro <p.oliveira.castro@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-29 09:04:52 +02:00
Takashi Iwai
527c465a3c Merge branch 'for-linus' into for-next
... to make easier developing HDA ext code.
2015-07-27 14:43:29 +02:00
Woodrow Shen
5ce000b297 ALSA: hda - Add pin quirk for the headset mic jack detection on Dell laptop
The new Dell laptop with codec 256 can't detect headset mic when
headset was inserted on the machine. From alsa-info, we check
init_pin_configs and need to define the new register value for pin
0x1d & 0x1e because the original macro ALC256_STANDARD_PINS can't
match pin definition. Also, the macro ALC256_STANDARD_PINS is
simplified by removing them. This makes headset mic works on laptop.

Codec: Realtek ALC256
Vendor Id: 0x10ec0256
Subsystem Id: 0x102806f2

BugLink: https://bugs.launchpad.net/bugs/1478497
Signed-off-by: Woodrow Shen <woodrow.shen@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-27 12:48:40 +02:00
Takashi Iwai
b9d9c9efc2 ALSA: hda - Apply fixup for another Toshiba Satellite S50D
Toshiba Satellite S50D has another model with a different PCI SSID
(1179:fa93) while the previous fixup was for 1179:fa91.  Adjust the
fixup entry with SND_PCI_QUIRK_MASK() to match with both devices.

Reported-by: Tim Sample <timsample@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-27 10:18:21 +02:00
Takashi Sakamoto
9c6893e0be ALSA: fireworks: add support for AudioFire2 quirk
Fireworks uses TSB43CB43(IceLynx-Micro) as its IEC 61883-1/6 interface.
This chip includes ARM7 core, and loads and runs program. The firmware
is stored in on-board memory and loaded every powering-on.

Echo Audio ships several versions of firmwares for each model. These
firmwares have each quirk and the quirk changes a sequence of packets.

AudioFire2 has a quirk to transfer a first packet with non-zero in
its dbc field. This causes ALSA Fireworks driver to detect discontinuity.
As long as I investigated, firmware 5.7, 5.7.6 and 5.8 have this quirk.

This commit adds a support for the quirk to handle AudioFire2 packets.
For safe, CIP_SKIP_INIT_DBC_CHECK is applied to all versions of
AudioFire2's firmwares.

02 00050002 90ffffff <-
42 0005000a 90013000
42 00050012 90014400
42 0005001a 90015800
02 0005001a 90ffffff
42 00050022 90019000
42 0005002a 9001a400
42 00050032 9001b800
02 00050032 90ffffff
42 0005003a 9001d000
42 00050042 9001e400
42 0005004a 9001f800
02 0005004a 90ffffff

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-27 10:12:25 +02:00
Woodrow Shen
e9c28e16a0 ALSA: hda - Fix the headset mic that will not work on Dell desktop machine
When the headset was plugged in the Dell desktop, the mic of headset
can't be detected and workable.
According to the alsa-info, we found the differece between alsa and
init_pin_configs on the machine, so we need to add the pin configs to
make headset work.

Codec: Realtek ALC3234
Vendor Id: 0x10ec0255
Subsystem Id: 0x102806bb

BugLink: https://bugs.launchpad.net/bugs/1477900
Signed-off-by: Woodrow Shen <woodrow.shen@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-25 08:19:41 +02:00
Dan Carpenter
44008f0896 ALSA: hda - fix cs4210_spdif_automute()
Smatch complains that we have nested checks for "spdif_present".  It
turns out the current behavior isn't correct, we should remove the first
check and keep the second.

Fixes: 1077a02481 ('ALSA: hda - Use generic parser for Cirrus codec driver')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-25 08:19:04 +02:00
Takashi Iwai
43cbf02e7a ASoC: Fixes for v4.2
A lot of small fixes here, a few to the core:
 
  - Fix for binding DAPM stream widgets on devices with prefixes assigned
    to them
  - Minor fixes for the newly added topology interfaces
  - Locking and memory leak fixes for DAPM
  - Driver specific fixes
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJVsnNFAAoJECTWi3JdVIfQH9cH/1ddueDFikvXSCyntuJcHAwJ
 a7X5kCVdegMnaMK5fnAbTlJBpDIX/F1UBvsFQQ38eKWeneP44XnkXeh/32fGJzQO
 L730dqy0tkgQdWJkQg0yxaP5/k0BfhnXeRc3ATUG3LBgUBrWRYLTIvaM+G+H3Kf5
 K88QL7cKmeY0Kt6+cms3nnBj9x5oFgbHIW7Y3K/pza+XPVecZ7N3/5gpV+VQDUXh
 Oz3cZOsC5h4+IpxkOrLXY7zgLvrt/HfRTO2QF/3Ntub81anAk190pVAquM+r/CTn
 tQ3sPNGLglQ4VRXNP6yBKJOp5CUTBLt5XWlJ+Kg9p2OiiuOPla4wkhuGDS5AM64=
 =nJJl
 -----END PGP SIGNATURE-----

Merge tag 'asoc-fix-v4.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v4.2

A lot of small fixes here, a few to the core:

 - Fix for binding DAPM stream widgets on devices with prefixes assigned
   to them
 - Minor fixes for the newly added topology interfaces
 - Locking and memory leak fixes for DAPM
 - Driver specific fixes
2015-07-24 20:08:13 +02:00
Axel Lin
bffc449688 ASoC: cs4265: Fix setting dai format for Left/Right Justified
The settings in current code does not match the datasheet, fix it.

DAC Control - Address 03h

DAC Digital Interface Format (Bits 5:4)
        DAC_DIF1 DAC_DIF0 Description
        0        0        Left Justified, up to 24-bit data (default)
        0        1        I²S, up to 24-bit data
        1        0        Right-Justified, 16-bit Data
        1        1        Right-Justified, 24-bit Data

Transmitter Control 2 - Address 12h

Transmitter Digital Interface Format (Bits 7:6)
        Tx_DIF1 Tx_DIF0 Description Format Figure
        0       0       Left Justified, up to 24-bit data (default)
        0       1       I²S, up to 24-bit data
        1       0       Right-Justified, 16-bit Data
        1       1       Right-Justified, 24-bit Data

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-24 18:30:46 +01:00
Mark Brown
996034b117 Merge remote-tracking branches 'asoc/fix/sgtl5000', 'asoc/fix/topology' and 'asoc/fix/zx' into asoc-linus 2015-07-24 16:18:22 +01:00
Mark Brown
c8a075ab1e Merge remote-tracking branches 'asoc/fix/fsl-ssi', 'asoc/fix/intel', 'asoc/fix/intel-kconfig' and 'asoc/fix/mediatek' into asoc-linus 2015-07-24 16:18:20 +01:00
Mark Brown
5c851ba4d5 Merge remote-tracking branch 'asoc/fix/ssm4567' into asoc-linus 2015-07-24 16:18:19 +01:00
Mark Brown
51126f6049 Merge remote-tracking branch 'asoc/fix/rt5645' into asoc-linus 2015-07-24 16:18:19 +01:00
Mark Brown
66874cc145 Merge remote-tracking branch 'asoc/fix/pcm1681' into asoc-linus 2015-07-24 16:18:18 +01:00
Mark Brown
61710a655f Merge remote-tracking branch 'asoc/fix/dapm' into asoc-linus 2015-07-24 16:18:18 +01:00