forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 1f93a7dfd1f8d5ff7a5c53246c7534fe2332d6f4
kernel/sound/pci/echoaudio/echoaudio.h
....@@ -298,7 +298,12 @@
298298 * the current dma position
299299 * (lower 32 bits only)
300300 */
301
- u32 last_counter; /* The last position, which is used
301
+ u32 last_period; /* Counter position last time a
302
+ * period elapsed
303
+ */
304
+ u32 last_counter; /* Used exclusively by pcm_pointer
305
+ * under PCM core locks.
306
+ * The last position, which is used
302307 * to compute...
303308 */
304309 u32 position; /* ...the number of bytes tranferred
....@@ -332,11 +337,10 @@
332337 struct echoaudio {
333338 spinlock_t lock;
334339 struct snd_pcm_substream *substream[DSP_MAXPIPES];
335
- int last_period[DSP_MAXPIPES];
336340 struct mutex mode_mutex;
337341 u16 num_digital_modes, digital_mode_list[6];
338342 u16 num_clock_sources, clock_source_list[10];
339
- atomic_t opencount;
343
+ unsigned int opencount; /* protected by mode_mutex */
340344 struct snd_kcontrol *clock_src_ctl;
341345 struct snd_pcm *analog_pcm, *digital_pcm;
342346 struct snd_card *card;
....@@ -353,8 +357,8 @@
353357 struct timer_list timer;
354358 char tinuse; /* Timer in use */
355359 char midi_full; /* MIDI output buffer is full */
356
- char can_set_rate;
357
- char rate_set;
360
+ char can_set_rate; /* protected by mode_mutex */
361
+ char rate_set; /* protected by mode_mutex */
358362
359363 /* This stuff is used mainly by the lowlevel code */
360364 struct comm_page *comm_page; /* Virtual address of the memory
....@@ -415,7 +419,7 @@
415419 short asic_code; /* Current ASIC code */
416420 u32 comm_page_phys; /* Physical address of the
417421 * memory seen by DSP */
418
- volatile u32 __iomem *dsp_registers; /* DSP's register base */
422
+ u32 __iomem *dsp_registers; /* DSP's register base */
419423 u32 active_mask; /* Chs. active mask or
420424 * punks out */
421425 #ifdef CONFIG_PM_SLEEP