[alsa-devel] Master Plan on rewinding

Raymond Yau superquad.vortex2 at gmail.com
Thu Sep 11 08:21:26 CEST 2014


2014-9-11 下午1:28 於 "Alexander E. Patrakov" <patrakov at gmail.com> 寫道:
>
> 11.09.2014 09:49, Raymond Yau wrote:
>>
>>
>>  >
>>  > On my desktop PC, on snd-hda-intel with analog outputs for S16LE
>> stereo, the granularity is 32 bytes (= 8 samples), and I get the pointer
>> granularity of 64 bytes (=16 samples) over HDMI. The minimum period size
>> is 32 samples in both cases.
>>
>> Do you mean hda-Intel does not support arbritray period size when you
>> say the granularity is 32 bytes ?
>>
>> However the granularity of the emulated hda sound card inside any VM
>> depend on the vm and the backend audio system and sound card
>
>
> The precise meaning is defined here:
>
> http://mailman.alsa-project.org/pipermail/alsa-devel/2014-May/076475.html

>
> Of course the VM result would be different.
>
> -

http://git.kernel.org/cgit/virt/kvm/qemu-kvm.git/plain/hw/hda-audio.c

/* audio in/out widget */
    case AC_VERB_SET_CHANNEL_STREAMID:
        st = a->st + node->stindex;
        if (st->node == NULL) {
            goto fail;
        }
        hda_audio_set_running(st, false);
        st->stream = (payload >> 4) & 0x0f;
        st->channel = payload & 0x0f;
        dprint(a, 2, "%s: stream %d, channel %d\n",
               st->node->name, st->stream, st->channel);
        hda_audio_set_running(st, a->running_real[st->output * 16 +
st->stream]);
        hda_codec_response(hda, true, 0);
        break;

It seem some vm just emulate start/stop of playback/capture  , it does not
update any hda controller registers, this mean that it won't support rewind


More information about the Alsa-devel mailing list