Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 283820
b: refs/heads/master
c: a4c1d7e
h: refs/heads/master
v: v3
  • Loading branch information
Lars-Peter Clausen authored and Mark Brown committed Nov 29, 2011
1 parent a0fc91e commit 0032d61
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 40 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 48afc5272eec2e1a7cf17aee0d2949810a45994a
refs/heads/master: a4c1d7e66719b326431c6e617da07cab0caedbca
36 changes: 36 additions & 0 deletions trunk/sound/soc/codecs/sigmadsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,42 @@

#include "sigmadsp.h"

#define SIGMA_MAGIC "ADISIGM"

struct sigma_firmware_header {
unsigned char magic[7];
u8 version;
__le32 crc;
} __packed;

enum {
SIGMA_ACTION_WRITEXBYTES = 0,
SIGMA_ACTION_WRITESINGLE,
SIGMA_ACTION_WRITESAFELOAD,
SIGMA_ACTION_DELAY,
SIGMA_ACTION_PLLWAIT,
SIGMA_ACTION_NOOP,
SIGMA_ACTION_END,
};

struct sigma_action {
u8 instr;
u8 len_hi;
__le16 len;
__be16 addr;
unsigned char payload[];
} __packed;

struct sigma_firmware {
const struct firmware *fw;
size_t pos;
};

static inline u32 sigma_action_len(struct sigma_action *sa)
{
return (sa->len_hi << 16) | le16_to_cpu(sa->len);
}

static size_t sigma_action_size(struct sigma_action *sa)
{
size_t payload = 0;
Expand Down
39 changes: 0 additions & 39 deletions trunk/sound/soc/codecs/sigmadsp.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,47 +9,8 @@
#ifndef __SIGMA_FIRMWARE_H__
#define __SIGMA_FIRMWARE_H__

#include <linux/firmware.h>
#include <linux/types.h>

struct i2c_client;

#define SIGMA_MAGIC "ADISIGM"

struct sigma_firmware {
const struct firmware *fw;
size_t pos;
};

struct sigma_firmware_header {
unsigned char magic[7];
u8 version;
__le32 crc;
};

enum {
SIGMA_ACTION_WRITEXBYTES = 0,
SIGMA_ACTION_WRITESINGLE,
SIGMA_ACTION_WRITESAFELOAD,
SIGMA_ACTION_DELAY,
SIGMA_ACTION_PLLWAIT,
SIGMA_ACTION_NOOP,
SIGMA_ACTION_END,
};

struct sigma_action {
u8 instr;
u8 len_hi;
__le16 len;
__be16 addr;
unsigned char payload[];
};

static inline u32 sigma_action_len(struct sigma_action *sa)
{
return (sa->len_hi << 16) | le16_to_cpu(sa->len);
}

extern int process_sigma_firmware(struct i2c_client *client, const char *name);

#endif

0 comments on commit 0032d61

Please sign in to comment.