diff mbox

ALSA: bebob: fix to processing in big-endian machine for sending cue

Message ID 1428509703-28938-1-git-send-email-o-takashi@sakamocchi.jp (mailing list archive)
State Accepted
Commit a053fc318bc5d28cd25168c948255fd48a29ea26
Headers show

Commit Message

Takashi Sakamoto April 8, 2015, 4:15 p.m. UTC
Some M-Audio devices require to receive bootup command just after
powering on, while codes in BeBoB driver doesn't work properly in
big-endian machine because the command should be aligned by
little-endian.

This commit fixes this bug. This fix should go to stable kernel.

Cc: Takayuki Shiroma <t.shiroma.oki@gmail.com>
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
---
 sound/firewire/bebob/bebob_maudio.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Takashi Iwai April 8, 2015, 4:26 p.m. UTC | #1
At Thu,  9 Apr 2015 01:15:03 +0900,
Takashi Sakamoto wrote:
> 
> Some M-Audio devices require to receive bootup command just after
> powering on, while codes in BeBoB driver doesn't work properly in
> big-endian machine because the command should be aligned by
> little-endian.
> 
> This commit fixes this bug. This fix should go to stable kernel.
> 
> Cc: Takayuki Shiroma <t.shiroma.oki@gmail.com>
> Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>

Applied, thanks.


Takashi

> ---
>  sound/firewire/bebob/bebob_maudio.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/sound/firewire/bebob/bebob_maudio.c b/sound/firewire/bebob/bebob_maudio.c
> index a422aaa..9ee25a6 100644
> --- a/sound/firewire/bebob/bebob_maudio.c
> +++ b/sound/firewire/bebob/bebob_maudio.c
> @@ -96,10 +96,10 @@ int snd_bebob_maudio_load_firmware(struct fw_unit *unit)
>  	struct fw_device *device = fw_parent_device(unit);
>  	int err, rcode;
>  	u64 date;
> -	__be32 cues[3] = {
> -		MAUDIO_BOOTLOADER_CUE1,
> -		MAUDIO_BOOTLOADER_CUE2,
> -		MAUDIO_BOOTLOADER_CUE3
> +	__le32 cues[3] = {
> +		cpu_to_le32(MAUDIO_BOOTLOADER_CUE1),
> +		cpu_to_le32(MAUDIO_BOOTLOADER_CUE2),
> +		cpu_to_le32(MAUDIO_BOOTLOADER_CUE3)
>  	};
>  
>  	/* check date of software used to build */
> -- 
> 2.1.0
>
diff mbox

Patch

diff --git a/sound/firewire/bebob/bebob_maudio.c b/sound/firewire/bebob/bebob_maudio.c
index a422aaa..9ee25a6 100644
--- a/sound/firewire/bebob/bebob_maudio.c
+++ b/sound/firewire/bebob/bebob_maudio.c
@@ -96,10 +96,10 @@  int snd_bebob_maudio_load_firmware(struct fw_unit *unit)
 	struct fw_device *device = fw_parent_device(unit);
 	int err, rcode;
 	u64 date;
-	__be32 cues[3] = {
-		MAUDIO_BOOTLOADER_CUE1,
-		MAUDIO_BOOTLOADER_CUE2,
-		MAUDIO_BOOTLOADER_CUE3
+	__le32 cues[3] = {
+		cpu_to_le32(MAUDIO_BOOTLOADER_CUE1),
+		cpu_to_le32(MAUDIO_BOOTLOADER_CUE2),
+		cpu_to_le32(MAUDIO_BOOTLOADER_CUE3)
 	};
 
 	/* check date of software used to build */