unable to record using REC/ALSA

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

unable to record using REC/ALSA

ANAND ANAND KANDASAMY
I am trying to record 8 inputs using a delta 1010LT card running on RHEL
6.3.

ALSA's arecord and aplay recognizes the alsa names in my .asoundrc and
is able to record/play fine.
but, when I try the same using sox, It does not work. Here is my
.asoundrc

pcm.capt {
         type dsnoop
         ipc_key 223456
         slave {
                 pcm "hw:0,0"
                 rate 8000
                 period_time 0
                 period_size 320
                 channels 12
                 #format S32_LE
         }
}

pcm.c1 {
      type plug
      ttable.0.0 1
      slave.pcm capt
}


if I use, "arecord -D plug:c1  test.wav" it works, so I am assuming it
knows about the c1 from .asoundrc

but, when I do

rec  -t alsa c1 test.wav trim 0 10

I get,

rec FAIL formats: can't open input  `default': snd_pcm_open error:
Device or resource busy


so, why is it defaulting to "default" device, which is not defined in my
.asoundrc intentionally ?

------------------------------------------------------------------------------
The Go Parallel Website, sponsored by Intel - in partnership with Geeknet,
is your hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials, tech docs,
whitepapers, evaluation guides, and opinion stories. Check out the most
recent posts - join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: unable to record using REC/ALSA

ANAND ANAND KANDASAMY
to follow up, since I know arecord works, I wanted to see if I can pipe
the raw o/p of arecord to rec (I need to do vox eventually) and here is
what I get

arecord -D plug:c1 |rec -t raw test.mp3
rec WARN alsa: can't encode 0-bit Unknown or not applicable
Recording WAVE 'stdin' : Unsigned 8 bit, Rate 8000 Hz, Mono
rec FAIL formats: can't open input  `default': snd_pcm_open error:
Device or resource busy


it says recording from 'stdin' and then it fallsback to 'default'...

I am lost as to what is going on.

On Mon, Feb 18, 2013 at 8:12 AM, ANAND ANAND KANDASAMY wrote:

> I am trying to record 8 inputs using a delta 1010LT card running on
> RHEL 6.3.
>
> ALSA's arecord and aplay recognizes the alsa names in my .asoundrc and
> is able to record/play fine.
> but, when I try the same using sox, It does not work. Here is my
> .asoundrc
>
> pcm.capt {
>          type dsnoop
>          ipc_key 223456
>          slave {
>                  pcm "hw:0,0"
>                  rate 8000
>                  period_time 0
>                  period_size 320
>                  channels 12
>                  #format S32_LE
>          }
> }
>
> pcm.c1 {
>       type plug
>       ttable.0.0 1
>       slave.pcm capt
> }
>
>
> if I use, "arecord -D plug:c1  test.wav" it works, so I am assuming it
> knows about the c1 from .asoundrc
>
> but, when I do
>
> rec  -t alsa c1 test.wav trim 0 10
>
> I get,
>
> rec FAIL formats: can't open input  `default': snd_pcm_open error:
> Device or resource busy
>
>
> so, why is it defaulting to "default" device, which is not defined in
> my .asoundrc intentionally ?
>
>
> ------------------------------------------------------------------------------
> The Go Parallel Website, sponsored by Intel - in partnership with
> Geeknet, is your hub for all things parallel software development,
> from weekly thought leadership blogs to news, videos, case studies,
> tutorials, tech docs, whitepapers, evaluation guides, and opinion
> stories. Check out the most recent posts - join the conversation now.
> http://goparallel.sourceforge.net/
> _______________________________________________
> Sox-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/sox-users

------------------------------------------------------------------------------
The Go Parallel Website, sponsored by Intel - in partnership with Geeknet,
is your hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials, tech docs,
whitepapers, evaluation guides, and opinion stories. Check out the most
recent posts - join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: unable to record using REC/ALSA

Pascal Giard
In reply to this post by ANAND ANAND KANDASAMY
Hi,

On Mon, Feb 18, 2013 at 8:12 AM, ANAND ANAND KANDASAMY
<[hidden email]> wrote:
> I am trying to record 8 inputs using a delta 1010LT card running on RHEL
> 6.3.
>
[...]

> if I use, "arecord -D plug:c1  test.wav" it works, so I am assuming it
> knows about the c1 from .asoundrc
>
> but, when I do
>
> rec  -t alsa c1 test.wav trim 0 10
>
> I get,
>
> rec FAIL formats: can't open input  `default': snd_pcm_open error:
> Device or resource busy

Shouldn't you try the following instead?

rec  -t alsa plug:c1 test.wav trim 0 10

Cheers,

-Pascal
--
Homepage (http://organact.mine.nu)
Debian GNU/Linux (http://www.debian.org)
COMunité/LACIME: École de technologie supérieure (http://www.comunite.ca)
Integrated Microsystems Laboratory: McGill (http://www.iml.ece.mcgill.ca)

------------------------------------------------------------------------------
The Go Parallel Website, sponsored by Intel - in partnership with Geeknet,
is your hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials, tech docs,
whitepapers, evaluation guides, and opinion stories. Check out the most
recent posts - join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: unable to record using REC/ALSA

ANAND ANAND KANDASAMY
In reply to this post by ANAND ANAND KANDASAMY
did that too: still tries to use 'default' as shown below

> rec  -t alsa plug:c1 test.wav trim 0 10
rec WARN alsa: can't encode 0-bit Unknown or not applicable
rec FAIL formats: can't open input  `default': snd_pcm_open error:
Device or resource busy

> arecord -D plug:c1 -d 4 4.wav
Recording WAVE '4.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono




On Mon, Feb 18, 2013 at 9:33 AM, Pascal Giard wrote:

> Hi,
>
> On Mon, Feb 18, 2013 at 8:12 AM, ANAND ANAND KANDASAMY
> <[hidden email]> wrote:
>> I am trying to record 8 inputs using a delta 1010LT card running on
>> RHEL
>> 6.3.
>>
> [...]
>> if I use, "arecord -D plug:c1  test.wav" it works, so I am assuming
>> it
>> knows about the c1 from .asoundrc
>>
>> but, when I do
>>
>> rec  -t alsa c1 test.wav trim 0 10
>>
>> I get,
>>
>> rec FAIL formats: can't open input  `default': snd_pcm_open error:
>> Device or resource busy
>
> Shouldn't you try the following instead?
>
> rec  -t alsa plug:c1 test.wav trim 0 10
>
> Cheers,
>
> -Pascal
> --
> Homepage (http://organact.mine.nu)
> Debian GNU/Linux (http://www.debian.org)
> COMunité/LACIME: École de technologie supérieure
> (http://www.comunite.ca)
> Integrated Microsystems Laboratory: McGill
> (http://www.iml.ece.mcgill.ca)
>
>
> ------------------------------------------------------------------------------
> The Go Parallel Website, sponsored by Intel - in partnership with
> Geeknet, is your hub for all things parallel software development,
> from weekly thought leadership blogs to news, videos, case studies,
> tutorials, tech docs, whitepapers, evaluation guides, and opinion
> stories. Check out the most recent posts - join the conversation now.
> http://goparallel.sourceforge.net/
> _______________________________________________
> Sox-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/sox-users

------------------------------------------------------------------------------
The Go Parallel Website, sponsored by Intel - in partnership with Geeknet,
is your hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials, tech docs,
whitepapers, evaluation guides, and opinion stories. Check out the most
recent posts - join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: unable to record using REC/ALSA

Ulrich Klauer-2
Anand Anand Kandasamy <[hidden email]>:

> did that too: still tries to use 'default' as shown below

"rec X" is shorthand for "sox -d X", so that is expected. Use "sox -t alsa plug:c1 test.wav trim 0 10".

Ulrich

------------------------------------------------------------------------------
The Go Parallel Website, sponsored by Intel - in partnership with Geeknet,
is your hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials, tech docs,
whitepapers, evaluation guides, and opinion stories. Check out the most
recent posts - join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: unable to record using REC/ALSA

Jan Stary
In reply to this post by ANAND ANAND KANDASAMY
On Feb 18 08:12:29, [hidden email] wrote:

> I am trying to record 8 inputs using a delta 1010LT card running on RHEL
> 6.3.
>
> ALSA's arecord and aplay recognizes the alsa names in my .asoundrc and
> is able to record/play fine.
> but, when I try the same using sox, It does not work. Here is my
> .asoundrc
>
> pcm.capt {
>          type dsnoop
>          ipc_key 223456
>          slave {
>                  pcm "hw:0,0"
>                  rate 8000
>                  period_time 0
>                  period_size 320
>                  channels 12
>                  #format S32_LE
>          }
> }
>
> pcm.c1 {
>       type plug
>       ttable.0.0 1
>       slave.pcm capt
> }
>
>
> if I use, "arecord -D plug:c1  test.wav" it works, so I am assuming it
> knows about the c1 from .asoundrc
>
> but, when I do
>
> rec  -t alsa c1 test.wav trim 0 10
>
> I get,
>
> rec FAIL formats: can't open input  `default': snd_pcm_open error:
> Device or resource busy

What happens if you try this:

        rec -V file.wav trim 0 10

> so, why is it defaulting to "default" device, which is not defined in my
> .asoundrc intentionally ?
>
> ------------------------------------------------------------------------------
> The Go Parallel Website, sponsored by Intel - in partnership with Geeknet,
> is your hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials, tech docs,
> whitepapers, evaluation guides, and opinion stories. Check out the most
> recent posts - join the conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> Sox-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/sox-users

------------------------------------------------------------------------------
The Go Parallel Website, sponsored by Intel - in partnership with Geeknet,
is your hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials, tech docs,
whitepapers, evaluation guides, and opinion stories. Check out the most
recent posts - join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: unable to record using REC/ALSA

Ulrich Klauer-2
In reply to this post by ANAND ANAND KANDASAMY
Anand Anand Kandasamy <[hidden email]>:

> arecord -D plug:c1 |rec -t raw test.mp3
> rec WARN alsa: can't encode 0-bit Unknown or not applicable
> Recording WAVE 'stdin' : Unsigned 8 bit, Rate 8000 Hz, Mono
> rec FAIL formats: can't open input  `default': snd_pcm_open error:
> Device or resource busy

> it says recording from 'stdin' and then it fallsback to 'default'...

The line "Recording WAVE ..." is arecord's output.

Ulrich

------------------------------------------------------------------------------
The Go Parallel Website, sponsored by Intel - in partnership with Geeknet,
is your hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials, tech docs,
whitepapers, evaluation guides, and opinion stories. Check out the most
recent posts - join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: unable to record using REC/ALSA

ANAND ANAND KANDASAMY
In reply to this post by ANAND ANAND KANDASAMY
ok, If I use
sox -t alsa plug:c1 test.wav trim 0 10

it records , the channel

if I use
rec -t alsa plug:c1 instead, it throws the error., I guess I can use sox
to do my recordings


On Mon, Feb 18, 2013 at 9:53 AM, Ulrich Klauer wrote:

> Anand Anand Kandasamy <[hidden email]>:
>
>> did that too: still tries to use 'default' as shown below
>
> "rec X" is shorthand for "sox -d X", so that is expected. Use "sox -t
> alsa plug:c1 test.wav trim 0 10".
>
> Ulrich
>
>
> ------------------------------------------------------------------------------
> The Go Parallel Website, sponsored by Intel - in partnership with
> Geeknet, is your hub for all things parallel software development,
> from weekly thought leadership blogs to news, videos, case studies,
> tutorials, tech docs, whitepapers, evaluation guides, and opinion
> stories. Check out the most recent posts - join the conversation now.
> http://goparallel.sourceforge.net/
> _______________________________________________
> Sox-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/sox-users

------------------------------------------------------------------------------
The Go Parallel Website, sponsored by Intel - in partnership with Geeknet,
is your hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials, tech docs,
whitepapers, evaluation guides, and opinion stories. Check out the most
recent posts - join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: unable to record using REC/ALSA

ANAND ANAND KANDASAMY
In reply to this post by ANAND ANAND KANDASAMY
records 12 tracks, with
rec -V


On Mon, Feb 18, 2013 at 9:55 AM, Jan Stary wrote:

> On Feb 18 08:12:29, [hidden email] wrote:
>> I am trying to record 8 inputs using a delta 1010LT card running on
>> RHEL 6.3.
>>
>> ALSA's arecord and aplay recognizes the alsa names in my .asoundrc
>> and is able to record/play fine.
>> but, when I try the same using sox, It does not work. Here is my
>> .asoundrc
>>
>> pcm.capt {
>>          type dsnoop
>>          ipc_key 223456
>>          slave {
>>                  pcm "hw:0,0"
>>                  rate 8000
>>                  period_time 0
>>                  period_size 320
>>                  channels 12
>>                  #format S32_LE
>>          }
>> }
>>
>> pcm.c1 {
>>       type plug
>>       ttable.0.0 1
>>       slave.pcm capt
>> }
>>
>>
>> if I use, "arecord -D plug:c1  test.wav" it works, so I am assuming
>> it knows about the c1 from .asoundrc
>>
>> but, when I do
>>
>> rec  -t alsa c1 test.wav trim 0 10
>>
>> I get,
>>
>> rec FAIL formats: can't open input  `default': snd_pcm_open error:
>> Device or resource busy
>
> What happens if you try this:
>
> rec -V file.wav trim 0 10
>
>> so, why is it defaulting to "default" device, which is not defined in
>> my .asoundrc intentionally ?
>>
>>
>> ------------------------------------------------------------------------------
>> The Go Parallel Website, sponsored by Intel - in partnership with
>> Geeknet, is your hub for all things parallel software development,
>> from weekly thought leadership blogs to news, videos, case studies,
>> tutorials, tech docs, whitepapers, evaluation guides, and opinion
>> stories. Check out the most recent posts - join the conversation now.
>> http://goparallel.sourceforge.net/
>> _______________________________________________
>> Sox-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/sox-users
>
>
> ------------------------------------------------------------------------------
> The Go Parallel Website, sponsored by Intel - in partnership with
> Geeknet, is your hub for all things parallel software development,
> from weekly thought leadership blogs to news, videos, case studies,
> tutorials, tech docs, whitepapers, evaluation guides, and opinion
> stories. Check out the most recent posts - join the conversation now.
> http://goparallel.sourceforge.net/
> _______________________________________________
> Sox-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/sox-users

------------------------------------------------------------------------------
The Go Parallel Website, sponsored by Intel - in partnership with Geeknet,
is your hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials, tech docs,
whitepapers, evaluation guides, and opinion stories. Check out the most
recent posts - join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users