History log of /linux-master/sound/pci/lx6464es/lx_core.c
Revision Date Author Comments
# 5dac9f8d 31-Jan-2023 Dan Carpenter <error27@gmail.com>

ALSA: pci: lx6464es: fix a debug loop

This loop accidentally reuses the "i" iterator for both the inside and
the outside loop. The value of MAX_STREAM_BUFFER is 5. I believe that
chip->rmh.stat_len is in the 2-12 range. If the value of .stat_len is
4 or more then it will loop exactly one time, but if it's less then it
is a forever loop.

It looks like it was supposed to combined into one loop where
conditions are checked.

Fixes: 8e6320064c33 ("ALSA: lx_core: Remove useless #if 0 .. #endif")
Signed-off-by: Dan Carpenter <error27@gmail.com>
Link: https://lore.kernel.org/r/Y9jnJTis/mRFJAQp@kili
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b5c2e2c7 26-May-2021 Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

ALSA: pci: lx6464es: remove useless self-comparison

Sparse throws the following warning:

sound/pci/lx6464es/lx_core.c:677:34: error: self-comparison always
evaluates to false

This comparison and error message make no sense, let's remove them.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210526192957.449515-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 2f200ce2 05-Jan-2020 Takashi Iwai <tiwai@suse.de>

ALSA: lx6464es: More constifications

Apply const prefix to the static tables for the DSP command and the
peak map.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-56-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d670d445 31-May-2019 YueHaibing <yuehaibing@huawei.com>

ALSA: lx6464es - Remove set but not used variables 'orun_mask, urun_mask'

Fixes gcc '-Wunused-but-set-variable' warning:

sound/pci/lx6464es/lx_core.c: In function 'lx_interrupt_handle_async_events':
sound/pci/lx6464es/lx_core.c:990:6: warning:
variable 'urun_mask' set but not used [-Wunused-but-set-variable]
sound/pci/lx6464es/lx_core.c:989:6: warning:
variable 'orun_mask' set but not used [-Wunused-but-set-variable]

They are never used, so can be removed.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 77f5075a 20-May-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 29

Based on 1 normalized pattern(s):

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later version this program is distributed in the
hope that it will be useful but without any warranty without even
the implied warranty of merchantability or fitness for a particular
purpose see the gnu general public license for more details you
should have received a copy of the gnu general public license along
with this program see the file copying if not write to the free
software foundation inc 59 temple place suite 330 boston ma 02111
1307 usa

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 5 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190520170856.913346514@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# a19c921f 15-Apr-2016 Takashi Iwai <tiwai@suse.de>

ALSA: lx646es: Fix possible uninitialized variable reference

lx_pipe_state() checks the return value from lx_message_send_atomic()
and breaks the loop only when it's a negative value. However,
lx_message_send_atomic() may return a positive error code (as the
return code from the hardware), and then lx_pipe_state() tries to
compare the uninitialized current_state variable.

Fix this behavior by checking the positive non-zero error code as
well.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6336c20c 10-Sep-2014 Takashi Iwai <tiwai@suse.de>

ALSA: lx6464es: Use nonatomic PCM ops

Like the other previous changes, this patch for lx6464es takes the
same strategy for converting to nonatomic PCM ops: replacing spinlock
with mutex, converting the irq tasklet to the threaded irq, and
merging the trigger tasklets back to the trigger callback.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 38137a06 17-Apr-2014 Maxime Ripard <mripard@kernel.org>

ALSA: lx_core: Translate comments from french to english

For some reason, some of the comments were actually in poorly encoded french.
Translate them in english like they should have been in the first place.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8e632006 17-Apr-2014 Maxime Ripard <mripard@kernel.org>

ALSA: lx_core: Remove useless #if 0 .. #endif

The code contained in these sections are only dev_dbg calls, that are already
removed whenever DEBUG isn't defined.

Remove the redundant constructs.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 48992102 17-Apr-2014 Maxime Ripard <mripard@kernel.org>

ALSA: lx_core: Remove dead code

Some code was never compiled because hidden between an #if 0 .. #endif
structure, and even when removing these, it was never actually used elsewhere.
Remove it entirely.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 68e440bb 17-Apr-2014 Maxime Ripard <mripard@kernel.org>

ALSA: lx_core: Fix dev_dbg typo

Commit be4e6d3c0fa0 ("ALSA: lx6464es: Use standard printk helpers") converted
the custom printk helpers that were used before to standard dev_* functions.
One of the dev_dbg calls had a typo, that was hidden away by an #if 0 .. #endif

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c546ca95 17-Apr-2014 Maxime Ripard <mripard@kernel.org>

ALSA: lx_core: Switch to using BIT macro

Move to using the BIT macro for a few defines. It also allows to discard the
french comment that was saying exactly what the BIT macro is now pointing out.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7b3b3026 17-Apr-2014 Maxime Ripard <mripard@kernel.org>

ALSA: lx_core: Remove unused defines

Commit f9367f3fbe3c ("ALSA: lx6464es: Remove unused
function in pci/lx6464es/lx_core.c") removed the
lx_dsp_es_check_pipeline function that was the only user
of these defines.

Since they're useless now, simply remove them.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# be4e6d3c 25-Feb-2014 Takashi Iwai <tiwai@suse.de>

ALSA: lx6464es: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f9367f3f 07-Feb-2014 Rashika Kheria <rashika.kheria@gmail.com>

ALSA: lx6464es: Remove unused function in pci/lx6464es/lx_core.c

Remove unused function in pci/lx6464es/lx_core.c.

This eliminates the following warning in pci/lx6464es/lx_core.c:
sound/pci/lx6464es/lx_core.c:144:5: warning: no previous prototype for ‘lx_plx_mbox_read’ [-Wmissing-prototypes]
sound/pci/lx6464es/lx_core.c:172:5: warning: no previous prototype for ‘lx_plx_mbox_write’ [-Wmissing-prototypes]
sound/pci/lx6464es/lx_core.c:494:5: warning: no previous prototype for ‘lx_dsp_es_check_pipeline’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 293db842 06-Nov-2013 Takashi Iwai <tiwai@suse.de>

ALSA: lx6464es: Fix pointer cast compile warnings

The warnings are really harmless but annoying. Since they are only
about debug prints, and it's at most 32bit DMA, let's just cast to
unsigned long.

sound/pci/lx6464es/lx6464es.c:457:22: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
sound/pci/lx6464es/lx_core.c:1195:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e23e7a14 05-Dec-2012 Bill Pemberton <wfp5p@virginia.edu>

ALSA: pci: remove __dev* attributes

CONFIG_HOTPLUG is going away as an option. As result the __dev*
markings will be going away.

Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst,
and __devexit.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a2987855 22-Nov-2011 Tim Blechmann <tim@klingt.org>

ALSA: lx6464es - fix device communication via command bus

commit 6175ddf06b6172046a329e3abfd9c901a43efd2e optimized the mem*io
functions that have been used to send commands to the device. these
optimizations somehow corrupted the communication with the lx6464es,
that resulted the device to be unusable with kernels after 2.6.33.

this patch emulates the memcpy_*_io functions via a loop to avoid these
problems.

Signed-off-by: Tim Blechmann <tim@klingt.org>
LKML-Reference: <4ECB5257.4040600@ladisch.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# afd00d72 22-Nov-2011 Tim Blechmann <tim@klingt.org>

ALSA: lx6464es - command buffer API cleanup

the command buffer is only accessed from one file, so we can declare the
specific functions as static in that file

Signed-off-by: Tim Blechmann <tim@klingt.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 80b52490 24-Jun-2011 Tim Blechmann <tim@klingt.org>

ALSA: lx6464es - include mac address in device name

each device has a unique mac address, which can be used to distinguish
multiple devices in the same machine. we therefore include the full mac
address in the device shortname and the last 6 bytes in the device id.

Signed-off-by: Tim Blechmann <tim@klingt.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f7467452 31-Oct-2010 Tim Blechmann <tim@klingt.org>

ALSA: lx6464es - make 1 bit signed bitfield unsigned

converts a 1 bit signed bitfield to an unsigned.

Reported-by: Dr. David Alan Gilbert <linux@treblig.org>
Signed-off-by: Tim Blechmann <tim@klingt.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 95eff499 21-Sep-2009 Tim Blechmann <tim@klingt.org>

ALSA: lx6464es - cleanup of rmh message bus function

the rmh bus is not used asynchronously, so it is safe to remove the
specific code pieces.

Signed-off-by: Tim Blechmann <tim@klingt.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d7dee4d7 13-Apr-2009 Takashi Iwai <tiwai@suse.de>

ALSA: lx6464es - Disable lx_message_send()

Disable lx_message_send() function temporarily as it's not used
anywhere.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 02bec490 23-Mar-2009 Tim Blechmann <tim@klingt.org>

ALSA: lx6464es - driver for the digigram lx6464es interface

prototype of a driver for the digigram lx6464es 64 channel ethersound
interface.

Signed-off-by: Tim Blechmann <tim@klingt.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>