Commit graph

6612 commits

Author SHA1 Message Date
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
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
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
Takashi Iwai
930352862e Merge branch 'topic/enum-info-cleanup' into for-next
this is a series of patches to just convert the plain info callback
for enum ctl elements to snd_ctl_elem_info().  Also, it includes the
extension of snd_ctl_elem_info(), for catching the unexpected string
cut-off and handling the zero items.
2014-10-22 12:19:57 +02:00
Takashi Iwai
b46882b6eb Merge branch 'topic/hda-lo-jack' into for-next 2014-10-22 07:57:12 +02:00
Sudip Mukherjee
cf6814f2b5 ALSA: ctxfi: remove unused variable
As of now the pointer to struct dai is not being used anywhere in the
function. So it is safe to remove the variable.
If we are ever doing anything with the container_of(daio, struct dai, daio),
then at that time we can again add the variable.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21 16:06:13 +02:00
Takashi Iwai
9883ab91e3 ALSA: via82xx: Use snd_ctl_enum_info()
... and reduce the open codes.  Also add missing const to the text array.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21 09:13:24 +02:00
Takashi Iwai
3e4bc5b78e ALSA: sonicvibes: Use snd_ctl_enum_info()
... and reduce the open codes.  Also add missing const to the text array.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21 09:12:51 +02:00
Takashi Iwai
7298ece7a2 ALSA: rme9652: Use snd_ctl_enum_info()
... and reduce the open codes.  Also add missing const to text arrays.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21 09:12:11 +02:00
Takashi Iwai
c69a637b4d ALSA: hdspm: Use snd_ctl_enum_info()
... and reduce the open codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21 09:10:58 +02:00
Takashi Iwai
8d678da9f0 ALSA: hdsp: Use snd_ctl_enum_info()
... and reduce the open codes.  Also add missing const to text arrays.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21 09:10:53 +02:00
Takashi Iwai
9c30d46a0f ALSA: rme96: Use snd_ctl_enum_info()
... and reduce the open codes.  Also add missing const to text arrays.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21 09:07:50 +02:00
Takashi Iwai
11c6ef7c8d ALSA: rme32: Use snd_ctl_enum_info()
... and reduce the open codes.  Also add missing const to text arrays.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21 09:05:24 +02:00
Takashi Iwai
08455ace3c ALSA: pcxhr: Use snd_ctl_enum_info()
... and reduce the open codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21 09:04:18 +02:00
Takashi Iwai
f861237c80 ALSA: korg1212: Use snd_ctl_enum_info()
... and reduce the open codes.  Also add missing const to text arrays.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21 09:04:07 +02:00
Takashi Iwai
597da2e4df ALSA: ice1724: Use snd_ctl_enum_info()
... and reduce the open codes.  Also add missing const to text arrays.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21 09:02:50 +02:00
Takashi Iwai
c4fa251f6f ALSA: ice1712: Use snd_ctl_enum_info()
... and reduce the open codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21 09:01:06 +02:00
Takashi Iwai
3ff7221932 ALSA: hda: Use snd_ctl_enum_info()
... and reduce the open codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21 09:00:49 +02:00
Takashi Iwai
ca776a28ae ALSA: fm801: Use snd_ctl_enum_info()
... and reduce the open codes.  Also add missing const to the text array.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21 09:00:29 +02:00
Takashi Iwai
6b6b295e80 ALSA: es1938: Use snd_ctl_enum_info()
... and reduce the open codes.  Also add missing const to the text array.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21 08:59:59 +02:00
Takashi Iwai
1541c66d3b ALSA: emu10k1: Use snd_ctl_enum_info()
... and reduce the open codes.  Also add missing const to text arrays.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21 08:59:23 +02:00
Takashi Iwai
c69a4f3046 ALSA: echoaudio: Use snd_ctl_enum_info()
... and reduce the open codes.  Also add missing const to text arrays.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21 08:56:28 +02:00
Takashi Iwai
de95eae25a ALSA: ca0106: Use snd_ctl_enum_info()
... and reduce the open codes.  Also correct the array size and add
missing const to text arrays.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21 08:55:04 +02:00
Takashi Iwai
9b311a0ad9 ALSA: azt3328: Use snd_ctl_enum_info()
... and reduce the open codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21 08:53:54 +02:00
Takashi Iwai
4d765e48c5 ALSA: aw2: Use snd_ctl_enum_info()
... and reduce the open codes.  Also add missing const to the text array.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21 08:53:43 +02:00
Takashi Iwai
30d0ae425a ALSA: asihpi: Use snd_ctl_enum_info()
... and reduce the open codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21 08:52:13 +02:00
Takashi Iwai
1bc10bb68d ALSA: ac97: Constify more text arrays
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21 08:51:45 +02:00
Takashi Iwai
3b7a00dc9e ALSA: ac97: Use snd_ctl_enum_info()
... and reduce the open codes.  Also add missing const to text arrays.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21 08:49:43 +02:00
David Henningsson
3abb4f4d0e ALSA: hda - Use "Line Out" name instead of "PCM" when there are other outputs
In case there are speakers or headphones as well, anything that only
covers the line out should not be labelled "PCM". Let's name it
"Line Out" instead for clarity.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-20 13:38:10 +02:00
David Henningsson
03ad6a8c93 ALSA: hda - Fix "PCM" name being used on one DAC when there are two DACs
In the scenario where there is one "Line Out", one "Speaker" and one
"Headphone", and there are only two DACs, two outputs will share a DAC.
Currently any mixer on such a DAC will get the "PCM" name, which is
misleading. Instead use "Headphone+LO" or "Speaker+LO" to better
specify what the volume actually controls.

[fixed missing slave string additions by tiwai]

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-20 13:37:50 +02:00
Takashi Iwai
b1974f965a ALSA: hda - Fix inverted LED gpio setup for Lenovo Ideapad
We implemented in a wrong way for mute LED on Lenovo Ideapad; the bit
must be flipped.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=16373
Fixes: 3e887f379d ('ALSA: hda - Add mute LED support to Lenovo Ideapad')
Cc: <stable@vger.kernel.org> # 3.15+
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-20 11:31:40 +02:00
Takashi Iwai
e200953673 Merge branch 'topic/cleanup' into for-next 2014-10-20 08:44:25 +02:00