skypopen: refined hrtimers support to OSS audio driver
This commit is contained in:
parent
dd4bad220c
commit
299c139c3e
|
@ -250,6 +250,10 @@ static ssize_t skypopen_read(struct file *filp, char __user *buf, size_t count,
|
||||||
{
|
{
|
||||||
DEFINE_WAIT(wait);
|
DEFINE_WAIT(wait);
|
||||||
struct skypopen_dev *dev = filp->private_data;
|
struct skypopen_dev *dev = filp->private_data;
|
||||||
|
|
||||||
|
if(unload)
|
||||||
|
return -1;
|
||||||
|
|
||||||
#ifdef WANT_HRTIMER
|
#ifdef WANT_HRTIMER
|
||||||
#if 1
|
#if 1
|
||||||
if(dev->timer_inq_started == 0){
|
if(dev->timer_inq_started == 0){
|
||||||
|
@ -278,6 +282,10 @@ static ssize_t skypopen_write(struct file *filp, const char __user *buf, size_t
|
||||||
{
|
{
|
||||||
DEFINE_WAIT(wait);
|
DEFINE_WAIT(wait);
|
||||||
struct skypopen_dev *dev = filp->private_data;
|
struct skypopen_dev *dev = filp->private_data;
|
||||||
|
|
||||||
|
if(unload)
|
||||||
|
return -1;
|
||||||
|
|
||||||
#ifdef WANT_HRTIMER
|
#ifdef WANT_HRTIMER
|
||||||
#if 1
|
#if 1
|
||||||
if(dev->timer_outq_started == 0){
|
if(dev->timer_outq_started == 0){
|
||||||
|
@ -372,10 +380,14 @@ void skypopen_cleanup_module(void)
|
||||||
ret= del_timer( &lptr->device.timer_outq );
|
ret= del_timer( &lptr->device.timer_outq );
|
||||||
printk( "Stopped skypopen OSS driver write timer\n");
|
printk( "Stopped skypopen OSS driver write timer\n");
|
||||||
#else// WANT_HRTIMER
|
#else// WANT_HRTIMER
|
||||||
ret = hrtimer_cancel( &lptr->device.timer_inq );
|
if(lptr->device.timer_inq_started){
|
||||||
printk( "Stopped skypopen OSS driver read HRtimer\n");
|
ret = hrtimer_cancel( &lptr->device.timer_inq );
|
||||||
ret = hrtimer_cancel( &lptr->device.timer_outq );
|
printk( "Stopped skypopen OSS driver read HRtimer\n");
|
||||||
printk( "Stopped skypopen OSS driver write HRtimer\n");
|
}
|
||||||
|
if(lptr->device.timer_outq_started){
|
||||||
|
ret = hrtimer_cancel( &lptr->device.timer_outq );
|
||||||
|
printk( "Stopped skypopen OSS driver write HRtimer\n");
|
||||||
|
}
|
||||||
|
|
||||||
#endif// WANT_HRTIMER
|
#endif// WANT_HRTIMER
|
||||||
list_del(&lptr->list);
|
list_del(&lptr->list);
|
||||||
|
|
Loading…
Reference in New Issue