Commit Graph

6641 Commits

Author SHA1 Message Date
Eliot Blennerhassett 5bc91f5b3c ALSA: asihpi: Turn off msg/resp logging after DSP has crashed.
Prevents spewing of useless messages if app keeps trying to
access the card.

Signed-off-by: Eliot Blennerhassett <eliot@blennerhassett.gen.nz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-22 22:33:25 +01:00
Eliot Blennerhassett f9a376c3f6 ALSA: asihpi: Add support for stream interrupt.
Some cards have a so-called low-latency mode, in which they present
a single multichannel stream with no mixing or samplerate conversion.
In this mode the card can generate an interrupt per internal processing
block (typically 32 or 64 frames)

Signed-off-by: Eliot Blennerhassett <eliot@blennerhassett.gen.nz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-22 22:33:13 +01:00
Eliot Blennerhassett c1464a8854 ALSA: asihpi: Refactor control cache code.
Signed-off-by: Eliot Blennerhassett <eliot@blennerhassett.gen.nz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-22 22:29:58 +01:00
Eliot Blennerhassett e51c58c982 ALSA: asihpi: Use CONFIG_64BIT directly
Signed-off-by: Eliot Blennerhassett <eliot@blennerhassett.gen.nz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-22 22:28:36 +01:00
Eliot Blennerhassett 35a8dc1f66 ALSA: asihpi: Logging format improvements
Signed-off-by: Eliot Blennerhassett <eliot@blennerhassett.gen.nz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-22 22:27:04 +01:00
Eliot Blennerhassett 3872f19d96 ALSA: asihpi: New I/O types - AVB & BLUlink, DAB Rf receiver
Audio cards wth have AVB or BLU Link IO.
Tuner card with DAB receiver

Signed-off-by: Eliot Blennerhassett <eliot@blennerhassett.gen.nz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-22 22:25:51 +01:00
Eliot Blennerhassett e9886ab06c ALSA: asihpi: Minor string and dead code cleanup
Signed-off-by: Eliot Blennerhassett <eliot@blennerhassett.gen.nz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-22 22:25:02 +01:00
Kailang Yang eaa8e5ef18 ALSA: hda/realtek - Supported HP mute Led for ALC286
New HP machine supported output mute led and input mute led.
ALC286:
GPIO1 to control output mute led.
GPIO5 to control input mute led.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-21 10:56:52 +01:00
Takashi Iwai 0f32fd1900 ALSA: hda/realtek - Clean up mute/mic GPIO LED handling
There are a few duplicated codes handling the mute and mic-mute LEDs
via GPIO pins.  Let's consolidate to single helpers.  Here we
introduced two new fields to alc_spec, gpio_mute_led_mask and
gpio_mic_led_mask, to contain the bit mask to set/clear.  Also,
mute_led_polarity is evaluated as well.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-20 11:02:18 +01:00
Markus Elfring c283661018 ALSA: hdsp: Deletion of an unnecessary check before the function call "release_firmware"
The release_firmware() function tests whether its argument is NULL and then
return immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-17 13:46:46 +01:00
Markus Elfring 6da95e1ea8 ALSA: lola: Deletion of an unnecessary check before the function call "vfree"
The vfree() function performs also input parameter validation. Thus the test
around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-17 13:46:23 +01:00
Markus Elfring ae1b22658e ALSA: ice17xx: Deletion of unnecessary checks before the function call "snd_ac97_resume"
The snd_ac97_resume() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-17 13:45:51 +01:00
Markus Elfring f0acd28c87 ALSA: hda: Deletion of unnecessary checks before two function calls
The functions kfree() and release_firmware() test whether their argument
is NULL and then return immediately. Thus the test around the call
is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-17 13:45:23 +01:00
Sudip Mukherjee b8eca77e54 ALSA: ice1712: consider error value
earlier we were ignoring the return value of snd_ak4114_create and
always returning 0.
now we are returning the actual status. revo_init is calling this
function, and revo_init is checking the return value.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-14 14:16:47 +01:00
Sudip Mukherjee b393df0145 ALSA: ice1712: remove unused variable
buf_size was initialized with snd_pcm_lib_buffer_bytes,
but never used. and so it is safe to be deleted.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-14 14:16:43 +01:00
Sudip Mukherjee 387417b562 ALSA: ice1712: remove unneeded return statement
the functions:
        snd_ice1712_akm4xxx_build_controls
        snd_ice1712_build_pro_mixer
        snd_ctl_add
        snd_ak4114_build
        prodigy192_ak4114_init
        snd_ak4113_build
are all returning either 0 or a negetive error value.
so we can easily remove the check for a negative value and return
the value instead.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-14 14:16:36 +01:00
Takashi Iwai ddcecf6b6a ALSA: Fix invalid kerneldoc markers
They are no real kerneldoc comments, so drop such markers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-11 09:39:17 +01:00
Takashi Iwai 3f60c87d12 ALSA: mixart: Fix kerneldoc comments
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-11 09:39:13 +01:00
Takashi Iwai e60b2c7fcd ALSA: hda - Fix kerneldoc errors in patch_ca0132.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-11 09:39:11 +01:00
Takashi Iwai 2a9e8df009 ALSA: vx: Fix missing kerneldoc parameter descriptions
The file isn't processed, but it's not bad to fix beforehand.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-11 09:39:10 +01:00
Takashi Iwai 1fb8510cdb ALSA: pcm: Add snd_pcm_stop_xrun() helper
Add a new helper function snd_pcm_stop_xrun() to the standard sequnce
lock/snd_pcm_stop(XRUN)/unlock by a single call, and replace the
existing open codes with this helper.

The function checks the PCM running state to prevent setting the wrong
state, too, for more safety.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-09 18:20:40 +01:00
Takashi Iwai 19566b0bd9 Merge branch 'for-linus' into for-next
This merges the USB-audio disconnect fix and resolves the conflicts
so that we can continue working on development of usb-audio stuff.

Conflicts:
	sound/usb/card.c
2014-11-05 15:37:22 +01:00
Sudip Mukherjee 9161bd0d1c ALSA: echoaudio: cleanup of unnecessary messages
commit "b5b4a41b392960010fccf1f9ccf8334d612bd450" was dereferencing
chip after it has been freed. This patch fixes that and at the same
time removes some debugging messages, which are unnecessary, as they
are just printing information about entry and exit from a function,
and which switch-case it is executing.
we can easily get from ftrace the information about the entry and exit
from a function.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-05 15:35:57 +01:00
Hui Wang c922c4e87b ALSA: hda - fix mute led problem for three HP laptops
Without the fix, the mute led can't work on these three machines.

After apply this fix, these three machines will fall back on the led
control quirk as below, and through testing, the mute led works very
well.
PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED,
            ALC282_STANDARD_PINS,
            {0x12, 0x90a60140},
            ...

BugLink: https://bugs.launchpad.net/bugs/1389497
Tested-by: TieFu Chen <tienfu.chen@canonical.com>
Cc: Kailang Yang <kailang@realtek.com>
Cc: stable@vger.kernel.org
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-05 07:42:15 +01:00
Markus Elfring 31604d35db ALSA: emu10k1: Deletion of unnecessary checks before three function calls
The functions kfree(), release_firmware() and snd_util_memhdr_free() test
whether their argument is NULL and then return immediately. Thus the test
around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-03 15:16:14 +01:00
Sudip Mukherjee b5b4a41b39 ALSA: echoaudio: remove all snd_printk
removed all references of snd_printk with the standard dev_* macro.

[a few places degraded to dev_dbg(), too -- tiwai]

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-03 14:07:25 +01:00
Sudip Mukherjee e369086968 ALSA: echoaudio: add reference of struct echoaudio
added reference of struct echoaudio to free_firmware function.
this structure will be later used to get a reference of the card
when converting snd_printk to dev_* in the next patch of the series.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-03 14:02:33 +01:00
Takashi Iwai 4c41421657 Merge branch 'topic/kerneldoc' into for-next 2014-10-31 09:31:06 +01:00
Takashi Iwai dda42bd0c3 ALSA: hda - Add kerneldoc comments to hda_generic.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-30 12:04:50 +01:00
Kailang Yang 1df8874bfa ALSA: hda/realtek - Update Initial AMP for EAPD control
The default EAPD control uses verb command to control EAPD. Some codec
does not have verb command for EAPD. It needs to control by hidden
register.

This update will avoid wrong behavior for some codec.  This patch will
fix double setup for EAPD.  It just needs to turn on by one site for
verb command or hidden register controlled.

Detailed changes:
- alc889_coef_init() is replaced with alc_update_coef_idx() with a
  correct COEF value.
- for ALC262, ALC887 and ALC900, the EAPD setup via the hidden
  register is removed because this rather conflicts with the EAPD verb
  setup.
-  For ALC888-VC, also the hidden register access is removed in
  alc888_coef_init().
- Remove the dead #if 0 code for ALC267/ALC268.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-30 09:01:17 +01:00
David Henningsson cf51eb9d0c ALSA: hda - change three SSID quirks to one pin quirk
These three HP machines all have the same pin config, so we can
change it to a pin quirk.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-30 08:59:53 +01:00
David Henningsson 7a5255f17d ALSA: hda - Set GPIO 4 low for a few HP machines
These HP machines needs GPIO 4 low to enable the headphone amplifier.
In addition, we still need to control LEDs via vref and GPIO.

Cc: stable@vger.kernel.org
BugLink: https://bugs.launchpad.net/bugs/1387128
Tested-by: TienFu Chen <tienfu.chen@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-30 08:59:52 +01:00
Takashi Iwai ce40a6d3ad Merge branch 'topic/kerneldoc' into for-next 2014-10-30 08:05:12 +01:00
Tina Ruchandani eafe8404c1 ALSA: es1968: Replace timeval with ktime_t
es1968_measure_clock uses struct timeval, which on 32-bit systems will overflow
in 2038, leading to incorrect interpretation of time.This patch changes the
function to use ktime_t instead of struct timeval, which implies:
- no y2038: ktime_t uses a 64-bit datatype explicitly.
- efficent subtraction: The earlier version computes the difference in usecs
  while dealing with secs and nsecs. It requires checks to see if the nsecs of
  stop is less than start. This patch uses a direct subtract of ktime_t and
  converts to usecs.
- use of monotonic clock (ktime_get) over real time (do_gettimeofday),
  which simplifies timekeeping, as it does not have to deal with cases
  where stop_time is less than start_time.

Signed-off-by: Tina Ruchandani <ruchandani.tina@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-30 08:04:33 +01:00
Lukas Bossard 7c21539c45 ALSA: hda - Add ultra dock support for Thinkpad X240.
Adding ultra doch support for Lenovo Thinkpad X240 (17aa:2214).
[Actually replaced the entry with ALC292_FIXUP_TPT440_DOCK -- tiwai]

Signed-off-by: Lukas Bossard <mr.bobukas@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-30 08:03:29 +01:00
Takashi Iwai 3b70bdba2f ALSA: hda - Add workaround for CMI8888 snoop behavior
CMI8888 shows the stuttering playback when the snooping is disabled
on the audio buffer.  Meanwhile, we've got reports that CORB/RIRB
doesn't work in the snooped mode.  So, as a compromise, disable the
snoop only for CORB/RIRB and enable the snoop for the stream buffers.

The resultant patch became a bit ugly, unfortunately, but we still can
live with it.

Reported-and-tested-by: Geoffrey McRae <geoff@spacevs.com>
Cc: <stable@vger.kernel.org> # 3.17+
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-29 16:16:29 +01:00
Sudip Mukherjee df57de172a ALSA: hdspm: remove unused variable
removed the unused variables. These variables were only being
assigned some value, but the values were never being used.

it has been build tested after removing the variables.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-29 16:12:32 +01:00
Takashi Iwai 95a962c36f ALSA: hda - More kerneldoc comments
Put more kerneldoc comments to the exported functions.
Still the generic parser code and the HD-audio controller code aren't
covered yet, though.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-29 16:03:58 +01:00
Takashi Iwai a11e9b1686 ALSA: hda - Correct kerneldoc comments
Complete the missing parameters and fix anything wrong there.
Just comment changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-29 15:06:54 +01:00
Takashi Iwai f994cb3a09 ALSA: au88x0: Kill the rest snd_print*()
Use the standard dev_*() instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-28 17:40:45 +01:00
Takashi Iwai f48a6df282 ALSA: pcxhr: Kill the rest snd_print*()
Use the standard dev_*() instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-28 17:40:43 +01:00
Takashi Iwai 2e6705c090 ALSA: ctxfi: Kill the rest snd_print*()
Use the standard dev_*() instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-28 17:40:42 +01:00
Aya Mahfouz 326f0480b7 ALSA: pcxhr: convert timeval to ktime_t
This patch is concerned with migrating the time variables in the pcxhr
module found in the sound driver. The changes are concerend with the
y2038 problem where timeval will overflow in the year 2038. ktime_t
was used instead of timeval to get the wall time. The difference
is displayed now in nanoseconds instead of microseconds.

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-28 15:07:25 +01:00
Takashi Iwai 66797f36fd ALSA: hda - Pass printf argument directly to request_module()
request_module() handles the printf style arguments, so we don't have
to render strings in the caller side.  Not only it reduces the
unnecessary temporary string buffer, it's even safer from the security
POV.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-27 15:17:54 +01:00
Takashi Iwai 85c24cd8d3 Merge branch 'for-linus' into for-next
Merged upstream branch to make further fireworks development easier
(and avoid conflicts earlier).

Conflicts:
	sound/firewire/bebob/bebob_focusrite.c
2014-10-27 14:11:07 +01:00
Kailang Yang 6a98e34b58 ALSA: hda/realtek - New SSID for Headset quirk
It is lite version of AIO machine(0x0626).
The audio layout of this machine was similar with SSID 0x0626.
The audio was same as commit ad8ff99e6b.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-27 09:54:23 +01:00
Joe Perches ccbec5ea0d ALSA: ad1889: Fix probable mask then right shift defects
Precedence of & and >> is not the same and is not left to right.
shift has higher precedence and should be done after the mask.

Add parentheses around the mask.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-27 08:40:18 +01:00
Kailang Yang 56779864f1 ALSA: hda/realtek - Update restore default value for ALC283
Update two records for ALC283 for restore default value.

[The update doesn't seem to have high impact on the existing machines,
 but it fixes possible issues, especially expected in BIOS changes on
 new machines, according to Realtek -- tiwai]

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-24 15:55:53 +02:00
Kailang Yang 32fa7e4977 ALSA: hda/realtek - Update restore default value for ALC282
Update default value for ALC282 for COEF.

[The update doesn't seem to have high impact on the existing machines,
 but it fixes possible issues, especially expected in BIOS changes on
 new machines, according to Realtek -- tiwai]

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-24 15:54:29 +02:00
David Henningsson fb54a645b2 ALSA: hda - Add missing terminating entry to SND_HDA_PIN_QUIRK macro
Without this terminating entry, the pin matching would continue
across random memory until a zero or a non-matching entry was found.

The result being that in some cases, the pin quirk would not be
applied correctly.

Cc: stable@vger.kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-24 10:04:29 +02:00