mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-22 09:22:37 +00:00
ALSA: maestro3: Proper endian notations
The ASSP data passed to maestro3 driver is in little-endian format, hence the data pointer should be with __le16. Spotted by sparse, warnings like: sound/pci/maestro3.c:2128:35: warning: cast to restricted __le16 Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
7752a7de25
commit
8c0ab942e0
@ -2103,7 +2103,7 @@ static const u16 minisrc_lpf[MINISRC_LPF_LEN] = {
|
|||||||
static void snd_m3_assp_init(struct snd_m3 *chip)
|
static void snd_m3_assp_init(struct snd_m3 *chip)
|
||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
const u16 *data;
|
const __le16 *data;
|
||||||
|
|
||||||
/* zero kernel data */
|
/* zero kernel data */
|
||||||
for (i = 0; i < (REV_B_DATA_MEMORY_UNIT_LENGTH * NUM_UNITS_KERNEL_DATA) / 2; i++)
|
for (i = 0; i < (REV_B_DATA_MEMORY_UNIT_LENGTH * NUM_UNITS_KERNEL_DATA) / 2; i++)
|
||||||
@ -2121,7 +2121,7 @@ static void snd_m3_assp_init(struct snd_m3 *chip)
|
|||||||
KDATA_DMA_XFER0);
|
KDATA_DMA_XFER0);
|
||||||
|
|
||||||
/* write kernel into code memory.. */
|
/* write kernel into code memory.. */
|
||||||
data = (const u16 *)chip->assp_kernel_image->data;
|
data = (const __le16 *)chip->assp_kernel_image->data;
|
||||||
for (i = 0 ; i * 2 < chip->assp_kernel_image->size; i++) {
|
for (i = 0 ; i * 2 < chip->assp_kernel_image->size; i++) {
|
||||||
snd_m3_assp_write(chip, MEMTYPE_INTERNAL_CODE,
|
snd_m3_assp_write(chip, MEMTYPE_INTERNAL_CODE,
|
||||||
REV_B_CODE_MEMORY_BEGIN + i,
|
REV_B_CODE_MEMORY_BEGIN + i,
|
||||||
@ -2134,7 +2134,7 @@ static void snd_m3_assp_init(struct snd_m3 *chip)
|
|||||||
* drop it there. It seems that the minisrc doesn't
|
* drop it there. It seems that the minisrc doesn't
|
||||||
* need vectors, so we won't bother with them..
|
* need vectors, so we won't bother with them..
|
||||||
*/
|
*/
|
||||||
data = (const u16 *)chip->assp_minisrc_image->data;
|
data = (const __le16 *)chip->assp_minisrc_image->data;
|
||||||
for (i = 0; i * 2 < chip->assp_minisrc_image->size; i++) {
|
for (i = 0; i * 2 < chip->assp_minisrc_image->size; i++) {
|
||||||
snd_m3_assp_write(chip, MEMTYPE_INTERNAL_CODE,
|
snd_m3_assp_write(chip, MEMTYPE_INTERNAL_CODE,
|
||||||
0x400 + i, le16_to_cpu(data[i]));
|
0x400 + i, le16_to_cpu(data[i]));
|
||||||
|
Loading…
Reference in New Issue
Block a user