Skip to contentSkip to conversation

snd_pcm_ops - .copy

DISCUSSION Harsha priya gupta 2 participants 3 messages Apr 21, 2008 – Apr 22, 2008 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hi,
I am trying to implement the .copy function of playack_ops in my driver. But when I try playing an mp3 file, my .copy's function code path was executing. Suddenly I do not see that function being called. Can anyone help me understand when the following code path will be executed

snd_pcm_lib_write_transfer
substream->ops->copy

-Harsha

#1 lore raw

At Mon, 21 Apr 2008 19:27:45 +0530,

Quoted 9 lines · Harsha priya gupta

Hi,
I am trying to implement the .copy function of playack_ops in my driver. But when I try playing an mp3 file, my .copy's function code path was executing. Suddenly I do not see that function being called. Can anyone help me understand when the following code path will be executed

snd_pcm_lib_write_transfer
substream->ops->copy

Do you use a mmap method? If so, the copy callback won't be called. The copy callback is only for copying the data from the user-space buffer to the driver buffer, which is skipped via mmap.

Takashi

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 32 lines · Harsha priya gupta

I am not using the mmap method. How can i make sure that everytime a user buffer is passed to driver, my copy function would be called?

Quoted 14 lines · Takashi Iwai

At Mon, 21 Apr 2008 19:27:45 +0530,

Quoted 3 lines · Harsha priya gupta

Hi,
I am trying to implement the .copy function of playack_ops in my

driver. But

Quoted 1 line

when I try playing an mp3 file, my .copy's function code path was

executing.

Quoted 5 lines

Suddenly I do not see that function being called. Can anyone help me understand when the following code path will be executed

snd_pcm_lib_write_transfer
substream->ops->copy

Quoted 7 lines

Do you use a mmap method? If so, the copy callback won't be called. The copy callback is only for copying the data from the user-space buffer to the driver buffer, which is skipped via mmap.

Takashi

--
-Harsha

Signature · 1 line
-Harsha