| .. | .. |
|---|
| 298 | 298 | * the current dma position |
|---|
| 299 | 299 | * (lower 32 bits only) |
|---|
| 300 | 300 | */ |
|---|
| 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 |
|---|
| 302 | 307 | * to compute... |
|---|
| 303 | 308 | */ |
|---|
| 304 | 309 | u32 position; /* ...the number of bytes tranferred |
|---|
| .. | .. |
|---|
| 332 | 337 | struct echoaudio { |
|---|
| 333 | 338 | spinlock_t lock; |
|---|
| 334 | 339 | struct snd_pcm_substream *substream[DSP_MAXPIPES]; |
|---|
| 335 | | - int last_period[DSP_MAXPIPES]; |
|---|
| 336 | 340 | struct mutex mode_mutex; |
|---|
| 337 | 341 | u16 num_digital_modes, digital_mode_list[6]; |
|---|
| 338 | 342 | u16 num_clock_sources, clock_source_list[10]; |
|---|
| 339 | | - atomic_t opencount; |
|---|
| 343 | + unsigned int opencount; /* protected by mode_mutex */ |
|---|
| 340 | 344 | struct snd_kcontrol *clock_src_ctl; |
|---|
| 341 | 345 | struct snd_pcm *analog_pcm, *digital_pcm; |
|---|
| 342 | 346 | struct snd_card *card; |
|---|
| .. | .. |
|---|
| 353 | 357 | struct timer_list timer; |
|---|
| 354 | 358 | char tinuse; /* Timer in use */ |
|---|
| 355 | 359 | 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 */ |
|---|
| 358 | 362 | |
|---|
| 359 | 363 | /* This stuff is used mainly by the lowlevel code */ |
|---|
| 360 | 364 | struct comm_page *comm_page; /* Virtual address of the memory |
|---|
| .. | .. |
|---|
| 415 | 419 | short asic_code; /* Current ASIC code */ |
|---|
| 416 | 420 | u32 comm_page_phys; /* Physical address of the |
|---|
| 417 | 421 | * memory seen by DSP */ |
|---|
| 418 | | - volatile u32 __iomem *dsp_registers; /* DSP's register base */ |
|---|
| 422 | + u32 __iomem *dsp_registers; /* DSP's register base */ |
|---|
| 419 | 423 | u32 active_mask; /* Chs. active mask or |
|---|
| 420 | 424 | * punks out */ |
|---|
| 421 | 425 | #ifdef CONFIG_PM_SLEEP |
|---|