Changeset 770


Ignore:
Timestamp:
Apr 14, 2025, 11:14:34 AM (4 months ago)
Author:
Paul Smedley
Message:

Code cleanups which correct hang at boot with HDA under virtualbox

Location:
GPL/branches/uniaud32-exp/alsa-kernel
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • GPL/branches/uniaud32-exp/alsa-kernel/core/info.c

    r767 r770  
    330330        if (next > buf->len) {
    331331                char *nbuf = kvzalloc(PAGE_ALIGN(next), GFP_KERNEL);
    332                 if (!nbuf)
    333                         return -ENOMEM;
     332                if (!nbuf) {
     333                        err = -ENOMEM;
     334                        goto error;
     335                }
    334336                kvfree(buf->buffer);
    335337                buf->buffer = nbuf;
  • GPL/branches/uniaud32-exp/alsa-kernel/core/init.c

    r767 r770  
    10941094        spin_lock(&card->files_lock);
    10951095        if (card->shutdown) {
    1096         spin_unlock(&card->files_lock);
     1096                spin_unlock(&card->files_lock);
    10971097                kfree(mfile);
    10981098                return -ENODEV;
     
    11001100        list_add(&mfile->list, &card->files_list);
    11011101        get_device(&card->card_dev);
     1102        spin_unlock(&card->files_lock);
    11021103        return 0;
    11031104}
     
    11321133                        found = mfile;
    11331134                        break;
    1134                 }
     1135                }
    11351136        }
    11361137        if (list_empty(&card->files_list))
  • GPL/branches/uniaud32-exp/alsa-kernel/core/pcm.c

    r767 r770  
    128128                                goto _error;
    129129                        }
     130                        pstr = &pcm->streams[stream];
    130131                        if (pstr->substream_count == 0) {
    131132                                err = -ENOENT;
  • GPL/branches/uniaud32-exp/alsa-kernel/core/pcm_memory.c

    r767 r770  
    198198        if (substream->runtime) {
    199199                buffer->error = -EBUSY;
    200                 return;
     200                goto unlock;
    201201        }
    202202        if (!snd_info_get_line(buffer, line, sizeof(line))) {
     
    234234                buffer->error = -EINVAL;
    235235        }
     236 unlock:
     237        mutex_unlock(&substream->pcm->open_mutex);
    236238}
    237239
  • GPL/branches/uniaud32-exp/alsa-kernel/core/seq/seq_ports.c

    r767 r770  
    5555                                break; /* deleting now */
    5656                        snd_use_lock_use(&port->use_lock);
     57                        read_unlock(&client->ports_lock);
    5758                        return port;
    5859                }
     
    653654                        err = 0;
    654655                        break;
    655                 }
    656         }
     656                }
     657        }
    657658        up_write(&dest->list_mutex);
    658659        if (err < 0)
  • GPL/branches/uniaud32-exp/alsa-kernel/core/seq/seq_prioq.c

    r767 r770  
    180180                cur = cur->next;
    181181                if (! --count) {
     182                        spin_unlock_irqrestore(&f->lock, flags);
    182183                        pr_err("ALSA: seq: cannot find a pointer.. infinite loop?\n");
    183                         spin_unlock_irqrestore(&f->lock, flags);
    184184                        return -EINVAL;
    185185                }
  • GPL/branches/uniaud32-exp/alsa-kernel/core/seq/seq_queue.c

    r767 r770  
    5252        int i;
    5353        unsigned long flags;
    54  
     54
    5555        spin_lock_irqsave(&queue_list_lock, flags);
    5656        for (i = 0; i < SNDRV_SEQ_MAX_QUEUES; i++) {
     
    7171        struct snd_seq_queue *q;
    7272        unsigned long flags;
    73  
     73
    7474        spin_lock_irqsave(&queue_list_lock, flags);
    7575        q = queue_list[id];
     
    7878                if (q->owner == client) {
    7979                        /* found */
     80                        q->klocked = 1;
    8081                        spin_unlock(&q->owner_lock);
    81                         q->klocked = 1;
    8282                        queue_list[id] = NULL;
    8383                        num_queues--;
  • GPL/branches/uniaud32-exp/alsa-kernel/core/seq/seq_timer.c

    r767 r770  
    135135        if (tmr == NULL)
    136136                return;
    137 
    138137        spin_lock_irqsave(&tmr->lock, flags);
    139138        if (!tmr->running) {
     
    148147                        (((resolution & 0xffff) * tmr->skew) >> 16);
    149148        }
    150  
     149
    151150        /* update timer */
    152151        snd_seq_inc_time_nsec(&tmr->cur_time, resolution);
  • GPL/branches/uniaud32-exp/alsa-kernel/core/sound.c

    r767 r770  
    158158                        return -ENODEV;
    159159                }
     160        }
    160161#ifndef TARGET_OS2 //code below from 3.13 crashes, using 3.8 code for now
    161162        new_fops = fops_get(mptr->f_ops);
    162163        mutex_unlock(&sound_mutex);
    163         }
    164164        if (!new_fops)
    165165                return -ENODEV;
     
    171171#else
    172172        new_fops = file->f_op;
    173         mutex_unlock(&sound_mutex);
    174         }
    175173        file->f_op = fops_get(mptr->f_ops);
    176174        if (file->f_op == NULL) {
  • GPL/branches/uniaud32-exp/alsa-kernel/pci/hda/patch_realtek.c

    r767 r770  
    78557855        if (count_devindex > 0)
    78567856                count = count_devindex;
    7857 #endif
    78587857        match = devm_kasprintf(dev, GFP_KERNEL, "-%%s:00-%s.%%d", acpi_ids[i].name);
    78597858        if (!match)
     
    78617860        codec_info(cdc, "Found %d %s on %s (%s)\n", count, acpi_ids[i].hid, bus, match);
    78627861        comp_generic_fixup(cdc, HDA_FIXUP_ACT_PRE_PROBE, bus, acpi_ids[i].hid, match, count);
     7862#else
     7863        codec_dbg(cdc, "Cirrus Amp detection not supported on OS/2\n");
     7864        return;
     7865
     7866#endif
    78637867}
    78647868
Note: See TracChangeset for help on using the changeset viewer.