* [PATCH 1/6] sound: lx_core: Remove unused defines
@ 2014-04-17 9:51 Maxime Ripard
2014-04-17 9:51 ` [PATCH 2/6] sound: lx_core: Switch to using BIT macro Maxime Ripard
` (5 more replies)
0 siblings, 6 replies; 8+ messages in thread
From: Maxime Ripard @ 2014-04-17 9:51 UTC (permalink / raw)
To: perex, iwai; +Cc: alsa-devel, linux-kernel, Maxime Ripard
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>
---
sound/pci/lx6464es/lx_core.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/sound/pci/lx6464es/lx_core.c b/sound/pci/lx6464es/lx_core.c
index 2d8e95e9fbe5..6a1d90a308ea 100644
--- a/sound/pci/lx6464es/lx_core.c
+++ b/sound/pci/lx6464es/lx_core.c
@@ -429,11 +429,6 @@ int lx_dsp_read_async_events(struct lx6464es *chip, u32 *data)
return ret;
}
-#define CSES_TIMEOUT 100 /* microseconds */
-#define CSES_CE 0x0001
-#define CSES_BROADCAST 0x0002
-#define CSES_UPDATE_LDSV 0x0004
-
#define PIPE_INFO_TO_CMD(capture, pipe) \
((u32)((u32)(pipe) | ((capture) ? ID_IS_CAPTURE : 0L)) << ID_OFFSET)
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/6] sound: lx_core: Switch to using BIT macro
2014-04-17 9:51 [PATCH 1/6] sound: lx_core: Remove unused defines Maxime Ripard
@ 2014-04-17 9:51 ` Maxime Ripard
2014-04-17 9:51 ` [PATCH 3/6] sound: lx_core: Fix dev_dbg typo Maxime Ripard
` (4 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Maxime Ripard @ 2014-04-17 9:51 UTC (permalink / raw)
To: perex, iwai; +Cc: alsa-devel, linux-kernel, Maxime Ripard
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>
---
sound/pci/lx6464es/lx_core.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/sound/pci/lx6464es/lx_core.c b/sound/pci/lx6464es/lx_core.c
index 6a1d90a308ea..652f6dfc7e1a 100644
--- a/sound/pci/lx6464es/lx_core.c
+++ b/sound/pci/lx6464es/lx_core.c
@@ -24,6 +24,7 @@
/* #define RMH_DEBUG 1 */
+#include <linux/bitops.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/delay.h>
@@ -966,9 +967,9 @@ int lx_level_peaks(struct lx6464es *chip, int is_capture, int channels,
/* interrupt handling */
#define PCX_IRQ_NONE 0
-#define IRQCS_ACTIVE_PCIDB 0x00002000L /* Bit nø 13 */
-#define IRQCS_ENABLE_PCIIRQ 0x00000100L /* Bit nø 08 */
-#define IRQCS_ENABLE_PCIDB 0x00000200L /* Bit nø 09 */
+#define IRQCS_ACTIVE_PCIDB BIT(13)
+#define IRQCS_ENABLE_PCIIRQ BIT(8)
+#define IRQCS_ENABLE_PCIDB BIT(9)
static u32 lx_interrupt_test_ack(struct lx6464es *chip)
{
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/6] sound: lx_core: Fix dev_dbg typo
2014-04-17 9:51 [PATCH 1/6] sound: lx_core: Remove unused defines Maxime Ripard
2014-04-17 9:51 ` [PATCH 2/6] sound: lx_core: Switch to using BIT macro Maxime Ripard
@ 2014-04-17 9:51 ` Maxime Ripard
2014-04-17 9:51 ` [PATCH 4/6] sound: lx_core: Remove dead code Maxime Ripard
` (3 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Maxime Ripard @ 2014-04-17 9:51 UTC (permalink / raw)
To: perex, iwai; +Cc: alsa-devel, linux-kernel, Maxime Ripard
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>
---
sound/pci/lx6464es/lx_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/pci/lx6464es/lx_core.c b/sound/pci/lx6464es/lx_core.c
index 652f6dfc7e1a..9e0acba82751 100644
--- a/sound/pci/lx6464es/lx_core.c
+++ b/sound/pci/lx6464es/lx_core.c
@@ -1197,7 +1197,7 @@ irqreturn_t lx_interrupt(int irq, void *dev_id)
#if 0
if (irqsrc & MASK_SYS_STATUS_EOBI)
- dev_dgg(chip->card->dev, "interrupt: EOBI\n");
+ dev_dbg(chip->card->dev, "interrupt: EOBI\n");
if (irqsrc & MASK_SYS_STATUS_EOBO)
dev_dbg(chip->card->dev, "interrupt: EOBO\n");
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 4/6] sound: lx_core: Remove dead code
2014-04-17 9:51 [PATCH 1/6] sound: lx_core: Remove unused defines Maxime Ripard
2014-04-17 9:51 ` [PATCH 2/6] sound: lx_core: Switch to using BIT macro Maxime Ripard
2014-04-17 9:51 ` [PATCH 3/6] sound: lx_core: Fix dev_dbg typo Maxime Ripard
@ 2014-04-17 9:51 ` Maxime Ripard
2014-04-17 9:51 ` [PATCH 5/6] sound: lx_core: Remove useless #if 0 .. #endif Maxime Ripard
` (2 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Maxime Ripard @ 2014-04-17 9:51 UTC (permalink / raw)
To: perex, iwai; +Cc: alsa-devel, linux-kernel, Maxime Ripard
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>
---
sound/pci/lx6464es/lx_core.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/sound/pci/lx6464es/lx_core.c b/sound/pci/lx6464es/lx_core.c
index 9e0acba82751..0ad6358b5fe2 100644
--- a/sound/pci/lx6464es/lx_core.c
+++ b/sound/pci/lx6464es/lx_core.c
@@ -1041,10 +1041,6 @@ static int lx_interrupt_handle_async_events(struct lx6464es *chip, u32 irqsrc,
u64 orun_mask;
u64 urun_mask;
-#if 0
- int has_underrun = (irqsrc & MASK_SYS_STATUS_URUN) ? 1 : 0;
- int has_overrun = (irqsrc & MASK_SYS_STATUS_ORUN) ? 1 : 0;
-#endif
int eb_pending_out = (irqsrc & MASK_SYS_STATUS_EOBO) ? 1 : 0;
int eb_pending_in = (irqsrc & MASK_SYS_STATUS_EOBI) ? 1 : 0;
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 5/6] sound: lx_core: Remove useless #if 0 .. #endif
2014-04-17 9:51 [PATCH 1/6] sound: lx_core: Remove unused defines Maxime Ripard
` (2 preceding siblings ...)
2014-04-17 9:51 ` [PATCH 4/6] sound: lx_core: Remove dead code Maxime Ripard
@ 2014-04-17 9:51 ` Maxime Ripard
2014-04-17 9:51 ` [PATCH 6/6] sound: lx_core: Translate comments from french to english Maxime Ripard
2014-04-18 8:01 ` [alsa-devel] [PATCH 1/6] sound: lx_core: Remove unused defines Takashi Iwai
5 siblings, 0 replies; 8+ messages in thread
From: Maxime Ripard @ 2014-04-17 9:51 UTC (permalink / raw)
To: perex, iwai; +Cc: alsa-devel, linux-kernel, Maxime Ripard
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>
---
sound/pci/lx6464es/lx_core.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/sound/pci/lx6464es/lx_core.c b/sound/pci/lx6464es/lx_core.c
index 0ad6358b5fe2..7c070864dc62 100644
--- a/sound/pci/lx6464es/lx_core.c
+++ b/sound/pci/lx6464es/lx_core.c
@@ -515,7 +515,6 @@ int lx_buffer_ask(struct lx6464es *chip, u32 pipe, int is_capture,
*r_needed += 1;
}
-#if 0
dev_dbg(chip->card->dev,
"CMD_08_ASK_BUFFERS: needed %d, freed %d\n",
*r_needed, *r_freed);
@@ -526,7 +525,6 @@ int lx_buffer_ask(struct lx6464es *chip, u32 pipe, int is_capture,
chip->rmh.stat[i],
chip->rmh.stat[i] & MASK_DATA_SIZE);
}
-#endif
}
spin_unlock_irqrestore(&chip->msg_lock, flags);
@@ -1191,7 +1189,6 @@ irqreturn_t lx_interrupt(int irq, void *dev_id)
if (irqsrc & MASK_SYS_STATUS_CMD_DONE)
goto exit;
-#if 0
if (irqsrc & MASK_SYS_STATUS_EOBI)
dev_dbg(chip->card->dev, "interrupt: EOBI\n");
@@ -1203,7 +1200,6 @@ irqreturn_t lx_interrupt(int irq, void *dev_id)
if (irqsrc & MASK_SYS_STATUS_ORUN)
dev_dbg(chip->card->dev, "interrupt: ORUN\n");
-#endif
if (async_pending) {
u64 notified_in_pipe_mask = 0;
@@ -1230,7 +1226,6 @@ irqreturn_t lx_interrupt(int irq, void *dev_id)
}
if (async_escmd) {
-#if 0
/* backdoor for ethersound commands
*
* for now, we do not need this
@@ -1238,7 +1233,6 @@ irqreturn_t lx_interrupt(int irq, void *dev_id)
* */
dev_dbg(chip->card->dev, "interrupt requests escmd handling\n");
-#endif
}
exit:
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 6/6] sound: lx_core: Translate comments from french to english
2014-04-17 9:51 [PATCH 1/6] sound: lx_core: Remove unused defines Maxime Ripard
` (3 preceding siblings ...)
2014-04-17 9:51 ` [PATCH 5/6] sound: lx_core: Remove useless #if 0 .. #endif Maxime Ripard
@ 2014-04-17 9:51 ` Maxime Ripard
2014-04-18 8:01 ` [alsa-devel] [PATCH 1/6] sound: lx_core: Remove unused defines Takashi Iwai
5 siblings, 0 replies; 8+ messages in thread
From: Maxime Ripard @ 2014-04-17 9:51 UTC (permalink / raw)
To: perex, iwai; +Cc: alsa-devel, linux-kernel, Maxime Ripard
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>
---
sound/pci/lx6464es/lx_core.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/sound/pci/lx6464es/lx_core.c b/sound/pci/lx6464es/lx_core.c
index 7c070864dc62..e8f38e5df10a 100644
--- a/sound/pci/lx6464es/lx_core.c
+++ b/sound/pci/lx6464es/lx_core.c
@@ -1024,17 +1024,17 @@ static int lx_interrupt_handle_async_events(struct lx6464es *chip, u32 irqsrc,
int err;
u32 stat[9]; /* answer from CMD_04_GET_EVENT */
- /* On peut optimiser pour ne pas lire les evenements vides
- * les mots de réponse sont dans l'ordre suivant :
- * Stat[0] mot de status général
- * Stat[1] fin de buffer OUT pF
- * Stat[2] fin de buffer OUT pf
- * Stat[3] fin de buffer IN pF
- * Stat[4] fin de buffer IN pf
- * Stat[5] underrun poid fort
- * Stat[6] underrun poid faible
- * Stat[7] overrun poid fort
- * Stat[8] overrun poid faible
+ /* We can optimize this to not read dumb events.
+ * Answer words are in the following order:
+ * Stat[0] general status
+ * Stat[1] end of buffer OUT pF
+ * Stat[2] end of buffer OUT pf
+ * Stat[3] end of buffer IN pF
+ * Stat[4] end of buffer IN pf
+ * Stat[5] MSB underrun
+ * Stat[6] LSB underrun
+ * Stat[7] MSB overrun
+ * Stat[8] LSB overrun
* */
u64 orun_mask;
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [alsa-devel] [PATCH 1/6] sound: lx_core: Remove unused defines
2014-04-17 9:51 [PATCH 1/6] sound: lx_core: Remove unused defines Maxime Ripard
` (4 preceding siblings ...)
2014-04-17 9:51 ` [PATCH 6/6] sound: lx_core: Translate comments from french to english Maxime Ripard
@ 2014-04-18 8:01 ` Takashi Iwai
2014-04-18 9:45 ` Maxime Ripard
5 siblings, 1 reply; 8+ messages in thread
From: Takashi Iwai @ 2014-04-18 8:01 UTC (permalink / raw)
To: Maxime Ripard; +Cc: perex, alsa-devel, linux-kernel
At Thu, 17 Apr 2014 11:51:16 +0200,
Maxime Ripard wrote:
>
> 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>
Thanks, applied all patches now.
But, at the next time, please put my correct address to Cc.
Also, for ALSA stuff (except for ASoC), we usually use "ALSA:"
prefix.
Takashi
> ---
> sound/pci/lx6464es/lx_core.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/sound/pci/lx6464es/lx_core.c b/sound/pci/lx6464es/lx_core.c
> index 2d8e95e9fbe5..6a1d90a308ea 100644
> --- a/sound/pci/lx6464es/lx_core.c
> +++ b/sound/pci/lx6464es/lx_core.c
> @@ -429,11 +429,6 @@ int lx_dsp_read_async_events(struct lx6464es *chip, u32 *data)
> return ret;
> }
>
> -#define CSES_TIMEOUT 100 /* microseconds */
> -#define CSES_CE 0x0001
> -#define CSES_BROADCAST 0x0002
> -#define CSES_UPDATE_LDSV 0x0004
> -
> #define PIPE_INFO_TO_CMD(capture, pipe) \
> ((u32)((u32)(pipe) | ((capture) ? ID_IS_CAPTURE : 0L)) << ID_OFFSET)
>
> --
> 1.9.1
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [alsa-devel] [PATCH 1/6] sound: lx_core: Remove unused defines
2014-04-18 8:01 ` [alsa-devel] [PATCH 1/6] sound: lx_core: Remove unused defines Takashi Iwai
@ 2014-04-18 9:45 ` Maxime Ripard
0 siblings, 0 replies; 8+ messages in thread
From: Maxime Ripard @ 2014-04-18 9:45 UTC (permalink / raw)
To: Takashi Iwai; +Cc: perex, alsa-devel, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 855 bytes --]
Hi,
On Fri, Apr 18, 2014 at 10:01:22AM +0200, Takashi Iwai wrote:
> At Thu, 17 Apr 2014 11:51:16 +0200,
> Maxime Ripard wrote:
> >
> > 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>
>
> Thanks, applied all patches now.
> But, at the next time, please put my correct address to Cc.
Hmmm, yes, look like it was a typo on my side.. Sorry.
> Also, for ALSA stuff (except for ASoC), we usually use "ALSA:"
> prefix.
Ok, I will.
Thanks!
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-04-18 9:50 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-17 9:51 [PATCH 1/6] sound: lx_core: Remove unused defines Maxime Ripard
2014-04-17 9:51 ` [PATCH 2/6] sound: lx_core: Switch to using BIT macro Maxime Ripard
2014-04-17 9:51 ` [PATCH 3/6] sound: lx_core: Fix dev_dbg typo Maxime Ripard
2014-04-17 9:51 ` [PATCH 4/6] sound: lx_core: Remove dead code Maxime Ripard
2014-04-17 9:51 ` [PATCH 5/6] sound: lx_core: Remove useless #if 0 .. #endif Maxime Ripard
2014-04-17 9:51 ` [PATCH 6/6] sound: lx_core: Translate comments from french to english Maxime Ripard
2014-04-18 8:01 ` [alsa-devel] [PATCH 1/6] sound: lx_core: Remove unused defines Takashi Iwai
2014-04-18 9:45 ` Maxime Ripard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).