OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [Documentation/] [DocBook/] [via-audio.tmpl] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1275 phoenix
2
 
3
4
 
5
  Via 686/8233/8235 Audio Driver for Linux
6
 
7
  
8
   
9
    Jeff
10
    Garzik
11
   
12
  
13
 
14
  
15
   1999-2001
16
   Jeff Garzik
17
  
18
 
19
  
20
   
21
     This documentation is free software; you can redistribute
22
     it and/or modify it under the terms of the GNU General Public
23
     License as published by the Free Software Foundation; either
24
     version 2 of the License, or (at your option) any later
25
     version.
26
   
27
 
28
   
29
     This program is distributed in the hope that it will be
30
     useful, but WITHOUT ANY WARRANTY; without even the implied
31
     warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
32
     See the GNU General Public License for more details.
33
   
34
 
35
   
36
     You should have received a copy of the GNU General Public
37
     License along with this program; if not, write to the Free
38
     Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
39
     MA 02111-1307 USA
40
   
41
 
42
   
43
     For more details see the file COPYING in the source
44
     distribution of Linux.
45
   
46
  
47
 
48
 
49
50
 
51
  
52
      Introduction
53
  
54
        The Via VT82C686A "super southbridge" chips contain
55
        AC97-compatible audio logic which features dual 16-bit stereo
56
        PCM sound channels (full duplex), plus a third PCM channel intended for use
57
        in hardware-assisted FM synthesis. The VIA VT8233/8235 extends this
58
        support to include six channel output and additional record
59
        facilities.
60
  
61
  
62
        The current Linux kernel audio driver for this family of chips
63
        supports audio playback and recording, but hardware-assisted
64
        FM features, and hardware buffer direct-access (mmap)
65
        support are not yet available.
66
  
67
  
68
        This driver supports any Linux kernel version after 2.4.10.
69
  
70
  
71
        Please send bug reports to the mailing list linux-via@gtf.org.
72
        To subscribe, e-mail majordomo@gtf.org with
73
  
74
  
75
        subscribe linux-via
76
  
77
  
78
        in the body of the message.
79
  
80
  
81
 
82
  
83
      Driver Installation
84
  
85
        To use this audio driver, select the
86
        CONFIG_SOUND_VIA82CXXX option in the section Sound during kernel configuration.
87
        Follow the usual kernel procedures for rebuilding the kernel,
88
        or building and installing driver modules.
89
  
90
  
91
        To make this driver the default audio driver, you can add the
92
        following to your /etc/conf.modules file:
93
  
94
  
95
        alias sound via82cxxx_audio
96
  
97
  
98
        Note that soundcore and ac97_codec support modules
99
        are also required for working audio, in addition to
100
        the via82cxxx_audio module itself.
101
  
102
  
103
 
104
  
105
      Submitting a bug report
106
  Description of problem
107
  
108
        Describe the application you were using to play/record sound, and how
109
        to reproduce the problem.
110
  
111
  
112
  Diagnostic output
113
  
114
        Obtain the via-audio-diag diagnostics program from
115
        http://sf.net/projects/gkernel/ and provide a dump of the
116
        audio chip's registers while the problem is occurring.  Sample command line:
117
  
118
  
119
        ./via-audio-diag -aps > diag-output.txt
120
  
121
  
122
  Driver debug output
123
  
124
        Define VIA_DEBUG at the beginning of the driver, then capture and email
125
        the kernel log output.  This can be viewed in the system kernel log (if
126
        enabled), or via the dmesg program.  Sample command line:
127
  
128
  
129
        dmesg > /tmp/dmesg-output.txt
130
  
131
  
132
  Bigger kernel message buffer
133
  
134
        If you wish to increase the size of the buffer displayed by dmesg, then
135
        change the LOG_BUF_LEN macro at the top of linux/kernel/printk.c, recompile
136
        your kernel, and pass the LOG_BUF_LEN value to dmesg.  Sample command line with
137
        LOG_BUF_LEN == 32768:
138
  
139
  
140
        dmesg -s 32768 > /tmp/dmesg-output.txt
141
  
142
  
143
  
144
 
145
  
146
     Known Bugs And Assumptions
147
  
148
  
149
    Low volume
150
    
151
    
152
        Volume too low on many systems.  Workaround:  use mixer program
153
        such as xmixer to increase volume.
154
    
155
    
156
 
157
  
158
 
159
  
160
  
161
 
162
  
163
      Thanks
164
  
165
        Via for providing e-mail support, specs, and NDA'd source code.
166
  
167
  
168
        MandrakeSoft for providing hacking time.
169
  
170
  
171
        AC97 mixer interface fixes and debugging by Ron Cemer roncemer@gte.net.
172
  
173
  
174
        Rui Sousa rui.sousa@conexant.com, for bugfixing
175
        MMAP support, and several other notable fixes that resulted from
176
        his hard work and testing.
177
  
178
  
179
        Adrian Cox adrian@humboldt.co.uk, for bugfixing
180
        MMAP support, and several other notable fixes that resulted from
181
        his hard work and testing.
182
  
183
  
184
        Thomas Sailer for further bugfixes.
185
  
186
  
187
 
188
  
189
     Random Notes
190
  
191
        Two /proc pseudo-files provide diagnostic information.  This is generally
192
        not useful to most users.  Power users can disable CONFIG_SOUND_VIA82CXXX_PROCFS,
193
        and remove the /proc support code.  Once
194
        version 2.0.0 is released, the /proc support code will be disabled by
195
        default.  Available /proc pseudo-files:
196
  
197
  
198
        /proc/driver/via/0/info
199
        /proc/driver/via/0/ac97
200
  
201
  
202
        This driver by default supports all PCI audio devices which report
203
        a vendor id of 0x1106, and a device id of 0x3058.  Subsystem vendor
204
        and device ids are not examined. The 8233 support covers all devices
205
        with a device id of 0x3059 and vendor id of 0x1106. Again subsystem
206
        ids are ignored as they usually hold the AC97 codec vendor information.
207
  
208
  
209
        GNU indent formatting options:
210
  
211
-kr -i8 -ts8 -br -ce -bap -sob -l80 -pcs -cs -ss -bs -di1 -nbc -lp -psl
212
  
213
  
214
  
215
        Via has graciously donated e-mail support and source code to help further
216
        the development of this driver.  Their assistance has been invaluable
217
        in the design and coding of the next major version of this driver.
218
  
219
  
220
        The Via audio chip apparently provides a second PCM scatter-gather
221
        DMA channel just for FM data, but does not have a full hardware MIDI
222
        processor.  I haven't put much thought towards a solution here, but it
223
        might involve using SoftOSS midi wave table, or simply disabling MIDI
224
        support altogether and using the FM PCM channel as a second (input? output?)
225
  
226
  
227
 
228
  
229
      Driver ChangeLog
230
 
231
</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>232</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>Version 1.9.1-ac</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>233</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>
234
  
235
   
236
    
237
    Added VIA 8233/8235 support including six channel support. We don't
238
    yet support S/PDIF, EAPD, using the second DSP channel and FM channels
239
    as extra dsp devices, or the extra record channel. New features tested
240
    on a VIA EPIA-M kindly provided by VIA.
241
    
242
   
243
  
244
245
 
246
</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>247</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>Version 1.9.1</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>248</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>
249
  
250
   
251
    
252
    DSP read/write bugfixes from Thomas Sailer.
253
    
254
   
255
 
256
   
257
    
258
    Add new PCI id for single-channel use of Via 8233.
259
    
260
   
261
 
262
   
263
    
264
    Other bug fixes, tweaks, new ioctls.
265
    
266
   
267
 
268
  
269
270
 
271
</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>272</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>Version 1.1.15</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>273</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>
274
  
275
   
276
    
277
    Support for variable fragment size and variable fragment number (Rui
278
    Sousa)
279
    
280
   
281
 
282
   
283
    
284
    Fixes for the SPEED, STEREO, CHANNELS, FMT ioctls when in read &
285
    write mode (Rui Sousa)
286
    
287
   
288
 
289
   
290
    
291
    Mmaped sound is now fully functional. (Rui Sousa)
292
    
293
   
294
 
295
   
296
    
297
    Make sure to enable PCI device before reading any of its PCI
298
    config information. (fixes potential hotplug problems)
299
    
300
   
301
 
302
   
303
    
304
    Clean up code a bit and add more internal function documentation.
305
    
306
   
307
 
308
   
309
    
310
    AC97 codec access fixes (Adrian Cox)
311
    
312
   
313
 
314
   
315
    
316
    Big endian fixes (Adrian Cox)
317
    
318
   
319
 
320
   
321
    
322
    MIDI support (Adrian Cox)
323
    
324
   
325
 
326
   
327
    
328
    Detect and report locked-rate AC97 codecs.  If your hardware only
329
    supports 48Khz (locked rate), then your recording/playback software
330
    must upsample or downsample accordingly.  The hardware cannot do it.
331
    
332
   
333
 
334
   
335
    
336
    Use new pci_request_regions and pci_disable_device functions in
337
    kernel 2.4.6.
338
    
339
   
340
 
341
  
342
343
 
344
</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>345</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>Version 1.1.14</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>346</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>
347
  
348
   
349
    
350
    Use VM_RESERVE when available, to eliminate unnecessary page faults.
351
    
352
   
353
  
354
355
 
356
</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>357</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>Version 1.1.12</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>358</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>
359
  
360
   
361
    
362
    mmap bug fixes from Linus.
363
    
364
   
365
  
366
367
 
368
</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>369</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>Version 1.1.11</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>370</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>
371
  
372
   
373
    
374
    Many more bug fixes.  mmap enabled by default, but may still be buggy.
375
    
376
   
377
 
378
   
379
    
380
    Uses new and spiffy method of mmap'ing the DMA buffer, based
381
    on a suggestion from Linus.
382
    
383
   
384
  
385
386
 
387
</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>388</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>Version 1.1.10</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>389</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>
390
  
391
   
392
    
393
    Many bug fixes.  mmap enabled by default, but may still be buggy.
394
    
395
   
396
  
397
398
 
399
</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>400</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>Version 1.1.9</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>401</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>
402
  
403
   
404
    
405
    Redesign and rewrite audio playback implementation.  (faster and smaller, hopefully)
406
    
407
   
408
 
409
   
410
    
411
    Implement recording and full duplex (DSP_CAP_DUPLEX) support.
412
    
413
   
414
 
415
   
416
    
417
    Make procfs support optional.
418
    
419
   
420
 
421
   
422
    
423
    Quick interrupt status check, to lessen overhead in interrupt
424
    sharing situations.
425
    
426
   
427
 
428
   
429
    
430
    Add mmap(2) support.  Disabled for now, it is still buggy and experimental.
431
    
432
   
433
 
434
   
435
    
436
    Surround all syscalls with a semaphore for cheap and easy SMP protection.
437
    
438
   
439
 
440
   
441
    
442
    Fix bug in channel shutdown (hardware channel reset) code.
443
    
444
   
445
 
446
   
447
    
448
    Remove unnecessary spinlocks (better performance).
449
    
450
   
451
 
452
   
453
    
454
    Eliminate "unknown AFMT" message by using a different method
455
    of selecting the best AFMT_xxx sound sample format for use.
456
    
457
   
458
 
459
   
460
    
461
    Support for realtime hardware pointer position reporting
462
    (DSP_CAP_REALTIME, SNDCTL_DSP_GETxPTR ioctls)
463
    
464
   
465
 
466
   
467
    
468
    Support for capture/playback triggering
469
    (DSP_CAP_TRIGGER, SNDCTL_DSP_SETTRIGGER ioctls)
470
    
471
   
472
 
473
   
474
    
475
    SNDCTL_DSP_SETDUPLEX and SNDCTL_DSP_POST ioctls now handled.
476
    
477
   
478
 
479
   
480
    
481
    Rewrite open(2) and close(2) logic to allow only one user at
482
    a time.  All other open(2) attempts will sleep until they succeed.
483
    FIXME: open(O_RDONLY) and open(O_WRONLY) should be allowed to succeed.
484
    
485
   
486
 
487
   
488
    
489
    Reviewed code to ensure that SMP and multiple audio devices
490
    are fully supported.
491
    
492
   
493
 
494
  
495
496
 
497
</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>498</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>Version 1.1.8</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>499</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>
500
  
501
   
502
    
503
        Clean up interrupt handler output.  Fixes the following kernel error message:
504
    
505
        
506
        unhandled interrupt ...
507
        
508
   
509
 
510
   
511
    
512
        Convert documentation to DocBook, so that PDF, HTML and PostScript (.ps) output is readily
513
        available.
514
    
515
   
516
 
517
  
518
519
 
520
</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>521</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>Version 1.1.7</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>522</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>
523
  
524
   
525
    
526
 Fix module unload bug where mixer device left registered
527
  after driver exit
528
    
529
   
530
  
531
532
 
533
</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>534</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>Version 1.1.6</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>535</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>
536
  
537
   
538
    
539
 Rewrite via_set_rate to mimic ALSA basic AC97 rate setting
540
    
541
   
542
   
543
    
544
 Remove much dead code
545
    
546
   
547
   
548
    
549
 Complete spin_lock_irqsave -> spin_lock_irq conversion in via_dsp_ioctl
550
    
551
   
552
   
553
    
554
 Fix build problem in via_dsp_ioctl
555
    
556
   
557
   
558
    
559
 Optimize included headers to eliminate headers found in linux/drivers/sound
560
        
561
   
562
  
563
564
 
565
</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>566</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>Version 1.1.5</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>567</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>
568
  
569
   
570
    
571
 Disable some overly-verbose debugging code
572
    
573
   
574
   
575
    
576
 Remove unnecessary sound locks
577
   
578
   
579
   
580
    
581
 Fix some ioctls for better time resolution
582
    
583
   
584
   
585
    
586
 Begin spin_lock_irqsave -> spin_lock_irq conversion in via_dsp_ioctl
587
    
588
   
589
  
590
591
 
592
</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>593</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>Version 1.1.4</code></pre></td>
      </tr>
      <tr valign="middle">
         <td>594</td>
         <td></td>
         <td></td>
         <td class="code"><pre><code>
595
  
596
   
597
    
598
 Completed rewrite of driver.  Eliminated SoundBlaster compatibility
599
  completely, and now uses the much-faster scatter-gather DMA engine.
600
    
601
   
602
  
603
604
 
605
  
606
 
607
  
608
     Internal Functions
609
!Idrivers/sound/via82cxxx_audio.c
610
  
611
 
612

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.