cmipci.c (d2f6409584e2c62ffad81690562330ff3bf4a458) | cmipci.c (77933d7276ee8fa0e2947641941a6f7a100a327b) |
---|---|
1/* 2 * Driver for C-Media CMI8338 and 8738 PCI soundcards. 3 * Copyright (c) 2000 by Takashi Iwai <tiwai@suse.de> 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. --- 474 unchanged lines hidden (view full) --- 483 struct gameport *gameport; 484#endif 485 486 spinlock_t reg_lock; 487}; 488 489 490/* read/write operations for dword register */ | 1/* 2 * Driver for C-Media CMI8338 and 8738 PCI soundcards. 3 * Copyright (c) 2000 by Takashi Iwai <tiwai@suse.de> 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. --- 474 unchanged lines hidden (view full) --- 483 struct gameport *gameport; 484#endif 485 486 spinlock_t reg_lock; 487}; 488 489 490/* read/write operations for dword register */ |
491inline static void snd_cmipci_write(cmipci_t *cm, unsigned int cmd, unsigned int data) | 491static inline void snd_cmipci_write(cmipci_t *cm, unsigned int cmd, unsigned int data) |
492{ 493 outl(data, cm->iobase + cmd); 494} | 492{ 493 outl(data, cm->iobase + cmd); 494} |
495inline static unsigned int snd_cmipci_read(cmipci_t *cm, unsigned int cmd) | 495 496static inline unsigned int snd_cmipci_read(cmipci_t *cm, unsigned int cmd) |
496{ 497 return inl(cm->iobase + cmd); 498} 499 500/* read/write operations for word register */ | 497{ 498 return inl(cm->iobase + cmd); 499} 500 501/* read/write operations for word register */ |
501inline static void snd_cmipci_write_w(cmipci_t *cm, unsigned int cmd, unsigned short data) | 502static inline void snd_cmipci_write_w(cmipci_t *cm, unsigned int cmd, unsigned short data) |
502{ 503 outw(data, cm->iobase + cmd); 504} | 503{ 504 outw(data, cm->iobase + cmd); 505} |
505inline static unsigned short snd_cmipci_read_w(cmipci_t *cm, unsigned int cmd) | 506 507static inline unsigned short snd_cmipci_read_w(cmipci_t *cm, unsigned int cmd) |
506{ 507 return inw(cm->iobase + cmd); 508} 509 510/* read/write operations for byte register */ | 508{ 509 return inw(cm->iobase + cmd); 510} 511 512/* read/write operations for byte register */ |
511inline static void snd_cmipci_write_b(cmipci_t *cm, unsigned int cmd, unsigned char data) | 513static inline void snd_cmipci_write_b(cmipci_t *cm, unsigned int cmd, unsigned char data) |
512{ 513 outb(data, cm->iobase + cmd); 514} 515 | 514{ 515 outb(data, cm->iobase + cmd); 516} 517 |
516inline static unsigned char snd_cmipci_read_b(cmipci_t *cm, unsigned int cmd) | 518static inline unsigned char snd_cmipci_read_b(cmipci_t *cm, unsigned int cmd) |
517{ 518 return inb(cm->iobase + cmd); 519} 520 521/* bit operations for dword register */ 522static int snd_cmipci_set_bit(cmipci_t *cm, unsigned int cmd, unsigned int flag) 523{ 524 unsigned int val, oval; --- 2551 unchanged lines hidden --- | 519{ 520 return inb(cm->iobase + cmd); 521} 522 523/* bit operations for dword register */ 524static int snd_cmipci_set_bit(cmipci_t *cm, unsigned int cmd, unsigned int flag) 525{ 526 unsigned int val, oval; --- 2551 unchanged lines hidden --- |