void Sound_SpeakerR_SetVolLevel(int level) { PRINTK(" Sound_SpeakerR_SetVolLevel level=%d\n",level); }
/* * Copy a buffer to the adapter transmit page memory. * Start sending. */ static int de600_start_xmit(struct sk_buff *skb, struct net_device *dev) { unsigned long flags; int transmit_from; int len; int tickssofar; byte *buffer = skb->data; int i; if (free_tx_pages <= 0) { /* Do timeouts, to avoid hangs. */ tickssofar = jiffies - dev->trans_start; if (tickssofar < 5) return 1; /* else */ printk("%s: transmit timed out (%d), %s?\n", dev->name, tickssofar, "network cable problem" ); /* Restart the adapter. */ if (adapter_init(dev)) { return 1; } } /* Start real output */ PRINTK(("de600_start_xmit:len=%d, page %d/%d\n", skb->len, tx_fifo_in, free_tx_pages)); if ((len = skb->len) < RUNT) len = RUNT; save_flags(flags); cli(); select_nic(); tx_fifo[tx_fifo_in] = transmit_from = tx_page_adr(tx_fifo_in) - len; tx_fifo_in = (tx_fifo_in + 1) % TX_PAGES; /* Next free tx page */ #ifdef CHECK_LOST_DE600 /* This costs about 40 instructions per packet... */ de600_setup_address(NODE_ADDRESS, RW_ADDR); de600_read_byte(READ_DATA, dev); if (was_down || (de600_read_byte(READ_DATA, dev) != 0xde)) { if (adapter_init(dev)) { restore_flags(flags); return 1; } } #endif de600_setup_address(transmit_from, RW_ADDR); for (i = 0; i < skb->len ; ++i, ++buffer) de600_put_byte(*buffer); for (; i < len; ++i) de600_put_byte(0); if (free_tx_pages-- == TX_PAGES) { /* No transmission going on */ dev->trans_start = jiffies; netif_start_queue(dev); /* allow more packets into adapter */ /* Send page and generate a faked interrupt */ de600_setup_address(transmit_from, TX_ADDR); de600_put_command(TX_ENABLE); } else { if (free_tx_pages) netif_start_queue(dev); else netif_stop_queue(dev); select_prn(); } restore_flags(flags); #ifdef FAKE_SMALL_MAX /* This will "patch" the socket TCP proto at an early moment */ if (skb->sk && (skb->sk->protocol == IPPROTO_TCP) && (skb->sk->prot->rspace != &de600_rspace)) skb->sk->prot->rspace = de600_rspace; /* Ugh! */ #endif dev_kfree_skb (skb); return 0; }
void AudioAMPDevice_mute(void) { PRINTK("AudioDevice_mute\n"); if(gsk_on) Sound_Speaker_Turnoff(Channel_Stereo); }
/* * for now just a placeholder -- just calls kfree for bitmap pages */ static void bitmap_free_page(struct bitmap *bitmap, unsigned char *page) { PRINTK("%s: bitmap_free_page: free page %p\n", bmname(bitmap), page); kfree(page); }
/* * we write to our peer's buf. when we connected we ref'd this peer so we * are safe that the buffer remains, even after the peer has disconnected, * which we check other ways. */ static int unix_proto_write(struct socket *sock, char *ubuf, int size, int nonblock) { struct unix_proto_data *pupd; int todo, space; if ((todo = size) <= 0) return 0; if (sock->state != SS_CONNECTED) { PRINTK("unix_proto_write: socket not connected\n"); if (sock->state == SS_DISCONNECTING) { send_sig(SIGPIPE,current,1); return -EINTR; } return -EINVAL; } pupd = UN_DATA(sock)->peerupd; /* safer than sock->conn */ while (!(space = UN_BUF_SPACE(pupd))) { PRINTK("unix_proto_write: no space left...\n"); if (nonblock) return -EAGAIN; interruptible_sleep_on(sock->wait); if (current->signal & ~current->blocked) { PRINTK("unix_proto_write: interrupted\n"); return -ERESTARTSYS; } if (sock->state == SS_DISCONNECTING) { PRINTK("unix_proto_write: disconnected (SIGPIPE)\n"); send_sig(SIGPIPE,current,1); return -EINTR; } } /* * copy from the user's buffer to the write buffer, watching for * wraparound. then we wake up the reader */ do { int part, cando; if (space <= 0) { PRINTK("unix_proto_write: SPACE IS NEGATIVE!!!\n"); send_sig(SIGKILL,current,1); return -EINTR; } /* * we may become disconnected inside this loop, so watch * for it (peerupd is safe until we close) */ if (sock->state == SS_DISCONNECTING) { send_sig(SIGPIPE,current,1); return -EINTR; } if ((cando = todo) > space) cando = space; if (cando > (part = BUF_SIZE - pupd->bp_head)) cando = part; PRINTK("unix_proto_write: space=%d, todo=%d, cando=%d\n", space, todo, cando); verify_area(ubuf, cando); memcpy_fromfs(pupd->buf + pupd->bp_head, ubuf, cando); pupd->bp_head = (pupd->bp_head + cando) & (BUF_SIZE-1); ubuf += cando; todo -= cando; if (sock->state == SS_CONNECTED) wake_up(sock->conn->wait); space = UN_BUF_SPACE(pupd); } while (todo && space); return size - todo; }
static inline void unix_data_ref(struct unix_proto_data *upd) { ++upd->refcnt; PRINTK("unix_data_ref: refing data 0x%x (%d)\n", upd, upd->refcnt); }