[alsa-devel] [PATCH - [hdspm] RayDAT/AIO 1/2] ALSA: Add support for RME RayDAT and AIO

Jaroslav Kysela perex at perex.cz
Thu Jan 27 09:09:05 CET 2011


On Thu, 27 Jan 2011, Takashi Iwai wrote:

> At Wed, 26 Jan 2011 19:32:14 +0100,
> Adrian Knoth wrote:
>>
>> diff --git a/include/sound/hdspm.h b/include/sound/hdspm.h
>> index 81990b2..c3f1819 100644
>> --- a/include/sound/hdspm.h
>> +++ b/include/sound/hdspm.h
>> @@ -131,4 +225,175 @@ typedef struct hdspm_version hdspm_version_t;
>>  typedef struct hdspm_channelfader snd_hdspm_channelfader_t;
>>  typedef struct hdspm_mixer hdspm_mixer_t;
>>
>> -#endif				/* __SOUND_HDSPM_H */
>> +/* These tables map the ALSA channels 1..N to the channels that we
>> +   need to use in order to find the relevant channel buffer. RME
>> +   refers to this kind of mapping as between "the ADAT channel and
>> +   the DMA channel." We index it using the logical audio channel,
>> +   and the value is the DMA channel (i.e. channel buffer number)
>> +   where the data for that channel can be read/written from/to.
>> +*/
>> +
>> +char channel_map_unity_ss[HDSPM_MAX_CHANNELS] = {
>
> Err, no, array definitions should be never in a header file.
> It doesn't matter whether it's static or not.  The definition should
> be in *.c file where it's used.
>
> So, simply move these array definitions to hdspm.c.

I think that the reason is to share these arrays with hdspmixer.
But I agree, that it's better to move these static values to .c files.

Note that hdsm/hdspmixer issues are last ones to resolve before 1.0.24 
release. I am waiting for the driver update.

 						Jaroslav

-----
Jaroslav Kysela <perex at perex.cz>
Linux Kernel Sound Maintainer
ALSA Project, Red Hat, Inc.


More information about the Alsa-devel mailing list